camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Stop route as part of error handling
Date Thu, 27 Aug 2009 08:04:48 GMT
On Thu, Aug 27, 2009 at 8:25 AM, m.s.<da_bus@arcor.de> wrote:
>
> Hi,
>
> I am wondering if it is possible to stop a route as part of the error
> handling. E.g. if I have a transacted route from a JMS endpoint to an http
> endpoint, the route should be stopped if the message cannot be delivered.
> The message should be kept in the queue and redelivered if I manually start
> the route when the endpoint is available again.
>
> Thank for any hints on how this could be done.
>

You can change tactic from using Event Driven Consumer EIP to a
Polling Consumer EIP
http://camel.apache.org/event-driven-consumer.html
http://camel.apache.org/polling-consumer.html

Then you can use a timer/scheduler to invoke a POJO which determines
if its "green or red" light.

If green you can just consume from the JMS endpoint one by one and
route the message.

See the timer based polling consumer example on the links above.


> M.S.
> --
> View this message in context: http://www.nabble.com/Stop-route-as-part-of-error-handling-tp25166908p25166908.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message