activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <...@artnaseef.com>
Subject Re: preventing duplicate messages that perform the same action?
Date Tue, 21 Oct 2014 00:38:23 GMT
For that kind of reliability, I would look outside of ActiveMQ itself.  Use a
database and/or idempotent processing (e.g. for a transfer, including the
original balances before the transfer can make it easy to reject duplicate
transfers).

JMS always makes it possible to send duplicates.  It's in the nature of
communication - either duplicates or lost messages have to be tolerated. 
Consider the following sequence:

* broker sends message to consumer
* consumer receives and processes message, then acks back to broker
* connection to broker is dropped while the ack is being delivered

There's no reliable way for the application to know whether the ack was sent
or not.  And, per the JMS spec, the broker resends the message when the ack
has not been received and the consumer's connection is lost.

Please consider carefully ActiveMQ's role in the architecture.




--
View this message in context: http://activemq.2283324.n4.nabble.com/preventing-duplicate-messages-that-perform-the-same-action-tp4686571p4686573.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message