Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E632DFD6 for ; Mon, 9 Jul 2012 07:50:02 +0000 (UTC) Received: (qmail 70956 invoked by uid 500); 9 Jul 2012 07:50:02 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 70709 invoked by uid 500); 9 Jul 2012 07:50:01 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 70658 invoked by uid 99); 9 Jul 2012 07:49:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 07:49:58 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hartmut.lang@ericsson.com designates 193.180.251.37 as permitted sender) Received: from [193.180.251.37] (HELO mailgw2.ericsson.se) (193.180.251.37) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 07:49:49 +0000 X-AuditID: c1b4fb25-b7fc16d000005db2-37-4ffa8d08fb61 Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw2.ericsson.se (Symantec Mail Security) with SMTP id 9C.13.23986.80D8AFF4; Mon, 9 Jul 2012 09:49:28 +0200 (CEST) Received: from ESESSCMS0366.eemea.ericsson.se ([169.254.1.176]) by esessmw0256.eemea.ericsson.se ([153.88.115.96]) with mapi; Mon, 9 Jul 2012 09:49:28 +0200 From: Hartmut Lang To: "users@camel.apache.org" Date: Mon, 9 Jul 2012 09:49:26 +0200 Subject: RE: Problems with dynamic seda-routes in 2.10.0 Thread-Topic: Problems with dynamic seda-routes in 2.10.0 Thread-Index: Ac1bfIySrJqyVk1iTjiD339V392/qACKox5w Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsUyM+JvrS5H7y9/gx37LCze/J3B7MDo8XPB LMYAxigum5TUnMyy1CJ9uwSujJu/57MWPBGseLHyK2MDYztvFyMnh4SAicSDyX3MELaYxIV7 69m6GLk4hAROMUocOj2PCcJZwCixYvVxdpAqNgE9iXN9XawgtoiAqcTbXzdYQGwWARWJTTvu gNnCAhYSjR8esEPUWEpM+fadEcI2kuhafQSshlcgXGJBx0awOUJA9tPb/8BqOAUiJH4u6WQC sRkFZCU2bDgPdh2zgLjErSfzmSAuFZBYsuc81NWiEi8f/2OFqJeRWLOpkRWiXkdiwe5PbBC2 tsSyha+ZIfYKSpyc+YRlAqPoLCRjZyFpmYWkZRaSlgWMLKsYhXMTM3PSy430Uosyk4uL8/P0 ilM3MQIj4uCW36o7GO+cEznEKM3BoiTOa711j7+QQHpiSWp2ampBalF8UWlOavEhRiYOTqkG xrDlHvmfnzWK6NwzmGgZlnlR12bvOn+B40xZNQ0VV48dWrPf3HdfZsNGR4EVApnHF1yd1Mcy 3X3x43kZ09wD5j49Mf+6cMfh+VunvZZWzupoVd89bcqhme/m6NnsOb7ZdL62+G+Rulne+/b8 Ed7N6m29uuNag/JjPoYXBswn/MrP3JCvrfql6qTEUpyRaKjFXFScCAD7sOyGVgIAAA== This is a test-case that runs with Camel 2.9.2 but fails with 2.10.0. Am i doing something wrong, should i file a JIRA? public class DynamicRouteTest extends CamelTestSupport { @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("seda:in").id("sedaToMock").to("mock:out"); } }; } =20 @Test public void testDynamicRoute() throws Exception { MockEndpoint out =3D getMockEndpoint("mock:out"); out.expectedMessageCount(1); =20 template.sendBody("seda:in", "Test Message"); =20 out.assertIsSatisfied(); =20 CamelContext camelContext =3D out.getCamelContext(); camelContext.stopRoute("sedaToMock"); camelContext.removeRoute("sedaToMock"); =20 camelContext.addRoutes(createRouteBuilder()); out.reset(); out.expectedMessageCount(1); =20 template.sendBody("seda:in", "Test Message"); =20 out.assertIsSatisfied(); =20 } }=20 Hartmut Lang -----Original Message----- Hi, i have a problem with dynamically adding/removing seda-routes with the late= st camel 2.10.0 release. It works for me with 2.9.2. My setup: - i have a dynmicRouter and i add and remove new seda-routes (from seda to = http) on a specific registration/deregistration event in my system - the first time the route is created, it works - after the route is deleted and the same seda-route is created again, it i= s not working. No messages are forwarded via this route The code i use to remove the route is: camelContext.stopRoute(routeId, 5, TimeUnit.SECONDS); camelContext.removeRoute(routeId); >From the Camel Mbeans i observe one different behaviour between 2.9.2 and 2= .10.0. - in 2.9.2 only the SedaConsumer is removed when the route is removed, the = sedaConsumer-threadpool does still exist. But the new route creates a new s= eda-threadpool - in 2.10.0 both the SedaConsumer and the seda-Threadpool are removed. Any hints what is going wrong? Hartmut