Yeah log a JIRA On Mon, Jul 9, 2012 at 9:49 AM, Hartmut Lang <hartmut.l...@ericsson.com> wrote: > 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"); > } > }; > } > > @Test > public void testDynamicRoute() throws Exception { > MockEndpoint out = getMockEndpoint("mock:out"); > out.expectedMessageCount(1); > > template.sendBody("seda:in", "Test Message"); > > out.assertIsSatisfied(); > > CamelContext camelContext = out.getCamelContext(); > camelContext.stopRoute("sedaToMock"); > camelContext.removeRoute("sedaToMock"); > > camelContext.addRoutes(createRouteBuilder()); > out.reset(); > out.expectedMessageCount(1); > > template.sendBody("seda:in", "Test Message"); > > out.assertIsSatisfied(); > > } > } > > > Hartmut Lang > > -----Original Message----- > > Hi, > > i have a problem with dynamically adding/removing seda-routes with the latest > 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 is > 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 > seda-threadpool > - in 2.10.0 both the SedaConsumer and the seda-Threadpool are removed. > > Any hints what is going wrong? > > Hartmut
-- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen