Preserving order of execution in case of an exception on ActiveMQ level
Is there an option on Active MQ level to preserve the order of execution of messages in case of an exception? . In other words, assume that we have inside message ID=1 info about an object called student having for example ID=Student_1000 and this message failed and entered in DLQ for a certain reason but we have in the principal queue message ID= 2 and message ID = 3 having the same ID of this student (ID=Student_1000) . We should not allow those messages from getting processed because they are containing info about same ID of object as inside message ID = 1; ideally, they should be redirected directly to DLQ to preserve the order of execution because if we allow this processing, we will loose the order of execution in case we are performing an update. Please note that I'm using message groups of Active MQ. How to do that on Active MQ level? Many thanks, Rosy
Well, not really. But since the DLQ is by default shared, you would not have ordered messages there unless you configure individual DLQs. Trying to rely on strict, 100% message order on queues to keep business logic simple is a bad idea, from my experience. That is, unless you have a single broker, a single producer and a single consumer and no DLQ handling (infinite redeliviers on RedeliveryPolicy). What you should do is to read the entire group in a single transaction. Roll it back or commit it as a group. It will require you to set the prefetch size accordingly. DLQ handling and reading is actually a client concern and not a broker level thing.
ActiveMQ forwarding bridge with failover
ActiveMQ - How to remove messages from kahadb db.data file
ActiveMQ - How to set max size of kahadb db.data file
activemq delete consumed messages
nmap ActiveMq issue
activemq where is the destinations tag?
ActiveMQ security plugin based on relational database
ActiveMQ as a data-logger
Five second wait in activemq cms MessageProducer.send with zookeeper
Use ActiveMQ JAR with an older broker
c code for MQTT Connect API
ActiveMQ scheduled messages in master-slave
View delayed messages in ActiveMQ?
using stomp in activeMQ with tomee
How can I disable embedded ActiveMQ-broker in ServiceMix?