Hi

Yeah you should use transacted ack mode with JMS on the local AMQ,
then it will only ack the message if it could be send to the remote
broker. And if Camel crashes you wont lose messages as the message is
still stored in the local AMQ persistent store.

AMQ has redelivery built-in, so you can configure how many times to retry etc.
http://activemq.apache.org/redelivery-policy.html

Just mind that with transacted=true, you should set
cacheLevelName=CACHE_CONSUMER to have higher performance. Some details
at: http://camel.apache.org/jms and http://camel.apache.org/activemq

ActiveMQ do have a JMS bridge but using Camel has proven to have
higher flexibility and can be easier to configure with various JMS
clients as well
http://activemq.apache.org/jms-to-jms-bridge.html

On Tue, Oct 15, 2013 at 11:31 PM, brenuart <bertrand.renu...@itma.lu> wrote:
> Hello,
>
> I need to setup a jms bridge to connect a local queue to a remote queue with
> a WAN network connection in between. The bridge must cope with
> unavailability of the remote queue because of network failure for instance:
> messages should stay in the local queue and be transparently redelivered
> when the remote queue becomes reachable.
>
> (Note: currently using ActiveMQ but may have to switch to HornetQ when in
> production)
>
> My first thought was to setup a simple Camel route that would consume from
> the local queue and deliver to the remote as follows:
>
>    <route>
>       <from uri="activemq-local:toremote" />
>       <to uri="activemq-remote:fromlocal" />
>    </route>
>
> This works great but how would you handle failure (remote not available) and
> retry?
>
> Should I make the route transacted and rely on broker redelivery (instead of
> Camel redelivery)? The point is I don't want to loose messages in case the
> local Camel instance crashes. As far as I understand, without transaction,
> the message is removed from the queue and held in memory during the retry...
>
> Should I play with the Camel ErrorHandler and Redelivery policies?
>
> In other words, how would you do it?
>
> Thanks for your advices,
> /Bertrand
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/JMS-local-to-JMS-remote-bridge-tp5741622.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to