On Tue, Nov 15, 2011 at 1:26 PM, Mohammad Shadab Ali
<mohammad....@headstrong.com> wrote:
> Thanks Claus.
> But would that not stop the route itself? I just need to stop processing few 
> messages, not stopping the route though?
>

The stop() in the DSL will stop further processing the current message.
Likewise if you do that from the Java Code.

The route will continue to run.

If you need to stop the route itself, check this FAQ
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html

> Regards,
> Shadab
>
>
>
>
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ib...@gmail.com]
> Sent: Tuesday, November 15, 2011 5:40 PM
> To: users@camel.apache.org
> Subject: Re: Camel: How to make camel stop processing some messages without 
> stopping the route.
>
> On Tue, Nov 15, 2011 at 12:42 PM, Mohammad Shadab Ali 
> <mohammad....@headstrong.com> wrote:
>> Hi All,
>>
>> Is there a way to stop processing some messages, but not stopping the route?
>>
>
> You can use the .stop() in the DSL, or mark the exchange to stop from Java 
> code.
>
>        // mark the exchange to stop continue routing
>        exchange.setProperty(Exchange.ROUTE_STOP, Boolean.TRUE);
>
>
>
>>
>> Regards,
>> Shadab
>>
>>
>>
>>
>>
>>
>> ________________________________
>> ***The information transmitted is intended only for the person or
>> entity to which it is addressed and may contain confidential and/or
>> privileged material. Any review,retransmission,dissemination or other
>> use of, or taking of any action in reliance upon, this information by
>> persons or entities other than the intended recipient is prohibited.
>> If you received this in error, please contact the sender and delete
>> the material from any computer.***
>>
>
>
>
> --
> 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/
>
> ***The information transmitted is intended only for the person or entity to 
> which it is addressed and may contain confidential and/or privileged 
> material. Any review,retransmission,dissemination or other use of, or taking 
> of any action in reliance upon, this information by persons or entities other 
> than the intended recipient is prohibited. If you received this in error, 
> please contact the sender and delete the material from any computer.***
>



-- 
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