activemq


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.

Related Links

How do I ensure a topic is removed from an ActiveMQ broker
Why would I use Apache ServiceMix over just ActiveMQ
How to set the ActiveMQ redeliveryPolicy on a queue?
Apache Camel inOut routes, out exchange marshaling/unmarshaling with jaxb
STOMP Protocol - Session ID Questions
What solution should I use for this webapp with websockets. ActiveMQ?
NIO disadvantages in ActiveMQ
How can I programatically purge an ActiveMQ queue using the Apache.NMS API?
Using Camel to transparently log messages from queue
ActiveMQ and JMS : Basic steps for novice
URL Encoding a Camel Exchange Body
Where can I download ActiveMQ Source Distributions?
activemq embedded broker
How to debug ActiveMQ client?
activemq java version
When there are multiple consumers of a queue in ActiveMQ, are they all delivered the same messages as they arrive on the queue?

Categories

HOME
user-interface
mc
typelite
jms
docker-cloud
greasemonkey
mosquitto
mithril.js
phpmqtt
mailing-list
azure-graph-api
amazon-emr
cname
business-intelligence
vertica
clr
cmake-gui
social-tables
intel
substring
raima
managed-c++
window-managers
python-appium
beego
react-bootstrap-table
django-import-export
commonsware-cwac
android-collapsingtoolbar
mongoengine
winrm
bootstrap-sass
amazon-kms
buildforge
pdfminer
bluemixtools
cordys-opentext
twilio-php
cartopy
telephonymanager
extbase
suds
get-event-store
ejml
robust
dagger
git-tfs
apache-toree
reverse-dns
zend-form
kitura
flume-twitter
linq-to-excel
hibernate-ogm
openstack-glance
htmlspecialchars
pen
asp.net-web-api-routing
email-forwarding
case-when
word-2016
portal
mathjs
p6spy
msbuild-4.0
raw-sockets
oci
fragmentstatepageradapter
android-async-http
in-app-billing
perceptron
blank-line
compositetype
modern.ie
karma-coverage
com0com
deque
mod-auth-openidc
string.format
flurry-analytics
full-text-indexing
cidr
boolean-algebra
meteorite
proxy-server
pbkdf2
yii-booster
delphi-xe4
proc-open
clrprofiler
instance-variables
uitextfielddelegate
background-repeat
webresponse
eaccelerator
jdownloader
ninject-interception
sscli
browser-based
processors
accumulator

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App