activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <>
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

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:
Sent from the ActiveMQ - User mailing list archive at

View raw message