[
https://issues.apache.org/jira/browse/AMQ-8437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17511721#comment-17511721
]
ruffp commented on AMQ-8437:
----------------------------
Hi,
I think by default ActiveMQ uses the dot (.) as path separator. The policy
feature is working well in our instance using the dots instead slashes (/).
[~rohanc] did you add the plugin <destinationPathSeparatorPlugin /> at the end
of your activemq.xml ?
see: https://stackoverflow.com/a/24057006/628006
> 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.0, 5.16.3
> Environment: centos 7; activeMQ version 5.16.3
> Reporter: Rohan Chauhan
> Priority: Major
>
> I am setting up deadLetterStrategy for undelivered messages but the
> individualDeadLetterStrategy doesn't get applied if I use a wildcard. I was
> expecting 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)