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

ActiveMQ DiscoveryAgent
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?

Categories

HOME
xpath
android-studio
openxml
activemq
kivy
loopbackjs
code-formatting
slider
dronekit-python
iptables
javafx-8
u-boot
global-variables
web-deployment
exe
renderscript
cpu-usage
jest
yii2-basic-app
android-permissions
sqlplus
neo4j.rb
pdf.js
introspection
crud
background-color
xdebug
tortoisehg
sendmessage
adapter
bonita
laravel-4.2
microprocessors
basic-authentication
locks
xenapp
series
actframework
caesar-cipher
polyml
char-pointer
cups
des
installanywhere
variable-variables
django-smart-selects
extbase
android-n
grunt-contrib-watch
1wire
google-prediction
reverse-dns
zend-form
webalizer
password-hash
phppgadmin
skip-lists
freshdesk
kendo-editor
kendo-treeview
perl-data-structures
rational-performance-test
streamwriter
dcount
jsf-2.3
spring-mongo
ajaxmin
django-redis
gwt-syncproxy
gravatar
jsr363
seadragon
trust
python-cffi
msgpack
gluon-desktop
modern.ie
componentart
abstract-factory
physicsjs
subview
fasterxml
symja
dnsjava
xml-signature
berkeley-db-xml
oracle-adf-mobile
nidaqmx
forceclose
oxygene
spring-social-linkedin
non-ascii-characters
insertion
axacropdf
asp.net-mvc-3-areas
ckeditor.net
user-forums
ip-geolocation
image-formats
viewpagerindicator
jdom
platform-independent
series-40
nsfont
microblogging
django-apps
boost-foreach
ognl
printqueue
channelfactory
git-log
asdoc
self-tracking-entities
google-translator-toolkit
firephp
tso

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App