On Mon, Aug 8, 2011 at 11:33 AM, Tom Howe <tomh...@artcore.com> wrote:
> I have a bean that consumes from a queue a bit like this ...
>
> @Component
> @Scope(value="session")
> public class MyConsumer {
>
>   @Consume(uri = "activemq:myqueue")
>   public void process(  @Body String body ) {
>   ...
>   }
>
>   public void stop() {
>    ..how to stop it?...
>   }
>
> }
>
>
> How would I go about implementing a stop() method that stops the route?
>

Using @Consume does not become a route. Its just a consumer.

There is a JIRA ticket AFAIR to add support for being able to control
the lifecycle.
We may need to add some sort of API / Registry and attribute on
@Consume so you can control this.

Or alternatively allow you to define a routeId on the @Consume to turn
it into a full fledged route. Then it can be fully managed just as the
rest. Maybe that is a better idea?


> Thanks, Tom
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to