I currently have a Queue in my ActiveMQ server called hello.world
. Whenever a message fails to be processed, ActiveMQ creates a default directory called Activ
The thing you are looking for is called Individual Dead letter Queue strategy
,
in this process ActiveMQ creates specific DLQ for each queue/topic,
you can implement it as follows, by tweaking your activemq.xml
a bit
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">"> <!-- '>' is the wildcard used in ActiveMQ which means for all queues, i.e. same as '*' in any other language -->
<!-- need to add the following lines in you conf file -->
<deadLetterStrategy>
<individualDeadLetterStrategy
queuePrefix="DLQ." useQueueForQueueMessages="true" />
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
this configuration will create DLQ with names like DLQ.<queue_name>
, if you do not want the prefix , you can remove queuePrefix
attribute.
hope this helps!
Good luck!