On Thu, Apr 16, 2009 at 7:39 PM, dwjsd <[email protected]> wrote: > > Just trying to find out if this is possible. > > We need to add messages to a queue and then forward them from the Queue to a > web service. Some times the system is down so there may not be > connectivity. It would need to recognize this and not pull the message from > the queue until connectivity has been reestablished. Ideally the forwarding > portion would be configurable and not require any coding. So it goes like
route 1: client -> queue A route 2: queue A -> webservice And what you want to avoid is the route2 is running if the connectivity to the webservice is not working? Usually when you poll from a JMS queue you use the Event Driven Consumer EIP pattern http://camel.apache.org/event-driven-consumer.html But you can switch to Polling Consumer EIP pattern http://camel.apache.org/polling-consumer.html And then you can avoid polling queue A if you have identified the connectivity is down For instance you can have a scheduled task running X times per minute. And the task can check whether the connectivity works or not. If it does work you can consume from queue A and send it to the webservice. If you stay with the Event Driven Consumer EIP then you can use transacted routes and the message will rollback on the queue if it cannot be send. And you can configure the JMS broker to not redeliver the failed message so fast so it wont drain resources. > > Also, a .NET client will be adding the messages to the queue using NMS. > -- > View this message in context: > http://www.nabble.com/ActiveMQ-and-Camel-tp23082963p23082963.html > Sent from the Camel - Users (activemq) 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 Apache Camel Reference Card: http://refcardz.dzone.com/refcardz/enterprise-integration
