You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by DOLECEK Ales <Al...@nextiraone.eu> on 2013/03/06 17:15:02 UTC

Suspending route/context if one component can't process messages

Hello,

  I have endpoints that communicate with 3rd party proprietary backend server.
If connection to the server is lost processing fails and Camel tries to
re-process the exchanges again and again, until the connection is restored and
the exchanges might pass through.

Since there is high traffic on the route logs get full of exceptions and if the
outage is long the ammount of undelivered exchanges increases (they come from
filesystem and IMAP mailbox).

What is the best stratégy to solve this? I'm considering to suspend context while
The connection is down, but wonder if there is better way.

Ales

Re: Suspending route/context if one component can't process messages

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah you can implement a custom PollingConsumerPollingStrategy
http://camel.apache.org/polling-consumer.html

And then suspend/stop the consumer if it has failed to often.


On Wed, Mar 6, 2013 at 5:15 PM, DOLECEK Ales <Al...@nextiraone.eu> wrote:
> Hello,
>
>   I have endpoints that communicate with 3rd party proprietary backend server.
> If connection to the server is lost processing fails and Camel tries to
> re-process the exchanges again and again, until the connection is restored and
> the exchanges might pass through.
>
> Since there is high traffic on the route logs get full of exceptions and if the
> outage is long the ammount of undelivered exchanges increases (they come from
> filesystem and IMAP mailbox).
>
> What is the best stratégy to solve this? I'm considering to suspend context while
> The connection is down, but wonder if there is better way.
>
> Ales



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Suspending route/context if one component can't process messages

Posted by declancox <de...@gmail.com>.
Hi Ales,Another thing you can try is to add a ThrottlingInflightRoutePolicy
route policy to your route and tune it according to your needs. For
example:If the ByteSenderProcessor fails, the in-flight exchange queue will
build up, once it reaches 100 then the file consumer will be suspended until
the queue reaches 50. So the throttling policy will handle both a failure
scenario aswell as the normal route load. 
DOLECEK Ales wrote
> Hello,  I have endpoints that communicate with 3rd party proprietary
> backend server.If connection to the server is lost processing fails and
> Camel tries tore-process the exchanges again and again, until the
> connection is restored andthe exchanges might pass through.Since there is
> high traffic on the route logs get full of exceptions and if theoutage is
> long the ammount of undelivered exchanges increases (they come
> fromfilesystem and IMAP mailbox).What is the best stratégy to solve this?
> I'm considering to suspend context whileThe connection is down, but wonder
> if there is better way.Ales





--
View this message in context: http://camel.465427.n5.nabble.com/Suspending-route-context-if-one-component-can-t-process-messages-tp5728695p5728873.html
Sent from the Camel - Users mailing list archive at Nabble.com.