1. Add the following policy entry in the activemq.xml file:
<policyEntry queue=">">
<deadLetterStrategy>
<individualDeadLetterStrategy queuePrefix="" queueSuffix=".DLQ" useQueueForQueueMessages="true"/>
</deadLetterStrategy>
</policyEntry>
2. Create a random queue in the activemq.xml file:
<destinations>
<topic physicalName="queue.test"/>
</destinations>
3. Send a message to that queue and reject the message in the consumer side ( for example, by throwing a exception on the MessageListener)
4. After the redeliveries failed the message should go to the DLQ . It could be sent to the right DLQ or to ActiveMQ.DLQ in the first time.
5. If the message was sent to the right DLQ, shutdown the broker and add a new destination to the file. Anything should fit.
6. Restart the broker and send the message again to the same destination as before and reject it.
7. Now the message should go to ActiveMQ.DLQ, if it not in the first place.
8. Repeat and add a new queue and the message should go to the right DLQ again. The error should happen alternately.