Rohan Chauhan created AMQ-8437:
----------------------------------
Summary: Destination policy not applied when multiple policies
with wildcard exist
Key: AMQ-8437
URL: https://issues.apache.org/jira/browse/AMQ-8437
Project: ActiveMQ
Issue Type: Bug
Affects Versions: 5.16.3, 5.16.0
Environment: centos 7; activeMQ version 5.16.3
Reporter: Rohan Chauhan
I am setting up deadLetterPolicies for undelivered messages but the
individualDeadLetterStrategy doesn't get applied if I use a wildcard. I was
expecting creation of DLQ.app/events/foo to be created, for a queue named
app/events/foo, and undelivered messages moved into it. Unfortunately the
individual DLQ is not created and undelivered messages end up in default DLQ
i.e. ActiveMQ.DLQ.
{code:java}
<destinationPolicy>
<policyMap>
<policyEntries>
<!-- Set the following policy on all queues using the '>' wildcard
-->
<policyEntry queue=">">
<!--
Tell the dead letter strategy not to process expired
messages
so that they will just be discarded instead of being
sent to
the DLQ, next we add specific policies for each queue.
-->
<deadLetterStrategy>
<sharedDeadLetterStrategy processExpired="false" />
</deadLetterStrategy>
</policyEntry>
<policyEntry queue="app/events/*">
<deadLetterStrategy>
<!--
Use the prefix 'DLQ.' for the destination name, and
make
the DLQ a queue rather than a topic
-->
<individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true"/>
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>{code}
The individualDeadLetterStrategy works fine when I don't use wildcard.
{code:java}
<destinationPolicy>
<policyMap>
<policyEntries>
<!-- Set the following policy on all queues using the '>' wildcard
-->
<policyEntry queue=">">
<!--
Tell the dead letter strategy not to process expired
messages
so that they will just be discarded instead of being
sent to
the DLQ, next we add specific policies for each queue.
-->
<deadLetterStrategy>
<sharedDeadLetterStrategy processExpired="false" />
</deadLetterStrategy>
</policyEntry>
<policyEntry queue="app/events/foo">
<deadLetterStrategy>
<!--
Use the prefix 'DLQ.' for the destination name, and
make
the DLQ a queue rather than a topic
-->
<individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true"/>
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)