Would that be CamelContext.shutdownRoute(id)? And does that use RouteDefinition.id() or RouteDefinition.routeId()?
On Thu, Oct 14, 2010 at 9:24 PM, Willem Jiang <willem.ji...@gmail.com> wrote: > In Camel 2.5.0,you can do it by stopping old route which start with the SEDA > endpoint and adding a new route for it. > > Here is an unit test[1] that you can take a look. > > [1] > https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaMultipleConsumersTest.java > > > On 10/14/10 10:44 PM, Donald Whytock wrote: >> >> I'm not looking to add an additional consumer; I'm looking to replace >> the existing one. >> >> In my Chatterbot app, I'm looking to set up a pipeline of message >> handlers in an osgi environment. I'll have a service that collects >> message handlers and builds a pipeline from them. But since message >> handlers can come and go, the service will need to be able to rebuild >> the pipeline when a new message handler starts or an existing message >> handler stops. >> >> What I'd hoped was that if the SEDA queue's endpoint was set up for >> not multiple consumers, creating a new consumer for the endpoint would >> replace the existing consumer. I take it that that won't >> happen...that instead the new consumer would be ignored? Is there a >> way to explicitly override the consumers for an endpoint? >> >> Alternately, is it possible to change the pipeline to use a new >> List<Consumer>? >> >> Or am I stuck with tracking the route being added, removing it from >> the context and creating a new one? >> >> Don >> >> On Thu, Oct 14, 2010 at 4:00 AM, Willem Jiang<willem.ji...@gmail.com> >> wrote: >>> >>> On 10/14/10 3:58 AM, Donald Whytock wrote: >>>> >>>> Hi all... >>>> >>>> If I have a SEDA endpoint set up for not multiple consumers and I use >>>> createConsumer(processor), will that replace the current consumer? Or >>>> simply add a consumer that will never be reached? >>>> >>>> Don >>>> >>> >>> The option of support the multiple consumers if just used to make sure >>> the >>> routes which are added to the camel context should not have the same from >>> endpoint. >>> >>> In Camel 2.5 we fixed an issue[1] of tracking the multiple seda >>> consumers. >>> >>> If you are using Camel 2.4.0, your new added consumer will not be used, >>> >>> [1]https://issues.apache.org/activemq/browse/CAMEL-3119 >>> >>> -- >>> Willem >>> ---------------------------------- >>> Open Source Integration: http://www.fusesource.com >>> Blog: http://willemjiang.blogspot.com (English) >>> http://jnn.javaeye.com (Chinese) >>> Twitter: http://twitter.com/willemjiang >>> >> > > > -- > Willem > ---------------------------------- > Open Source Integration: http://www.fusesource.com > Blog: http://willemjiang.blogspot.com (English) > http://jnn.javaeye.com (Chinese) > Twitter: http://twitter.com/willemjiang >