Josh-
There are established patterns for managing race conditions in
distributed computing-- ActiveMQ or other, the approach is the same. A
messaging system, such as ActiveMQ, is a solid part of the solution of
sending messages from system A to B and avoiding race conditions by
solving for many common scenarios in a consistent manner.
In addition, other technical measures can be layered on top:
1. Application supports duplication detection (or replay of message)
=> In theory, handles all scenarios. Has sharp corners in practice.
2. Idempotent repository/message filter where a history of processed
messages (using an application-level messageId)
=> Can drastically narrow the surface area of the potential for
duplication, and is generally easier on the application.
On 8/30/16 4:57 PM, joshhendo wrote:
Hi Tim,
Thanks for the reply; definitely helpful to get a point of view from someone
regularly using the product.
My example was probably a bit too simplistic, such that it failed to still
be a race condition. There are other examples I'm using in my project, of
which a lot of your comments can apply to.
Once again thanks for taking the time to reply.
Cheers,
Josh
--
View this message in context:
http://activemq.2283324.n4.nabble.com/What-methods-have-people-used-to-overcome-race-conditions-tp4715676p4715984.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.