2
votes

I am using activemq 5.10, I want to create a custom Dead letter queue for all my queues.

I know that activemq itself provides inbuilt DLQ by name ActiveMQ.DLQ but I want my custom DLQ to hold all the failed messages.

I also know that we can create individual DLQ for each queue,but thats not what I want

any pointers will be helpful, Thanks.

2
message expiry can not be detected by receiver. so no direct way. how about creating forwarding mechanism. MyQ.DLQ -> MyGlobalDLQAmit G

2 Answers

2
votes

It's pretty simple, but not documented as far as I know. Specify the queue in a sharedDeadLetterStrategy. Verified in AMQ 5.9.0 but may as well work in earlier/later versions as well.

<deadLetterStrategy>
    <sharedDeadLetterStrategy>
        <deadLetterQueue>
            <queue physicalName="CUSTOMDLQ"/>
        </deadLetterQueue>
    </sharedDeadLetterStrategy>
</deadLetterStrategy>
1
votes

This cant be done in current ActiveMQ version(5.10), so we decided on creating custom exception queues and forwarding messages to them based on particular exception scenarios.