camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Recovery in activemq
Date Thu, 06 Sep 2007 13:53:33 GMT
On 9/6/07, Neil Thorne (work) <neil.thorne@travelex.com> wrote:
>
> Sorry guys,
>
> scratch these comments. I just read the Camel TOE section properly and I'm
> using a Spring JmsTransactionManager to create transactional producers and
> consumers by default:

Phew!

I was gonna say, recovered messages should be the same!

You can use the JMSRedelivered headers to know if a message has been
redelivered before or not...

http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html#getJMSRedelivered()

Also ActiveMQ uses a counter: JMSXDeliveryCount when a message has
been redelivered to keep track of the number of times its been
delivered.

> I still would like a neat way of finding out if this message is "recovered"
> though, but both messages are the same.

BTW checking for redelivery flag is a nice way to optimise away
duplicate detection code...
http://activemq.apache.org/should-i-use-xa.html

> We're currenty thinking of going with an idempotent receiver that uses the
> messageIds above.

Sounds good to me.

-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message