[ 
https://issues.apache.org/jira/browse/AMQ-6318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350901#comment-15350901
 ] 

Gary Tully commented on AMQ-6318:
---------------------------------

[~cshannon] I agree, it seems wrong but I guess it depends on if ANY_DESCENDENT 
included none. 
Given how long that code has been there my bet is changing it will cause some 
head ache for existing users.
Any internal dependency should fall out from the existing tests.

Note: * or ANY_CHILD will not match none, which makes sense.

{code}
        ActiveMQQueue queue = new ActiveMQQueue("value");
        DestinationMap map2 = new DestinationMap();
        map2.put(new ActiveMQQueue("value.>"), v1);
        assertEquals(1, map2.get(queue).size());

        map2 = new DestinationMap();
        map2.put(new ActiveMQQueue("value.*"), v1);
        assertEquals(0, map2.get(queue).size());
{code}

> policyEntry doesn't handle wildcards properly
> ---------------------------------------------
>
>                 Key: AMQ-6318
>                 URL: https://issues.apache.org/jira/browse/AMQ-6318
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.13.3
>            Reporter: Jaume Teixi
>
> Just trying to setup a policyEntry for a limit of pending messages in a topic 
> "customer01.data.value" where an application is writing messages to just 
> realized that the wildcards seems to not to being handled properly.
> {code:xml}
>         <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                 <policyEntry topic=">" >
>                     <!-- The constantPendingMessageLimitStrategy is used to 
> prevent
>                          slow topic consumers to block producers and affect 
> other consumers
>                          by limiting the number of messages that are retained
>                          For more information, see:
>                          
> http://activemq.apache.org/slow-consumer-handling.html
>                     -->
>                   <pendingMessageLimitStrategy>
>                     <constantPendingMessageLimitStrategy limit="1000"/>
>                   </pendingMessageLimitStrategy>
>                 </policyEntry>
>                               <policyEntry topic="*.data.>" topicPrefetch="1" 
> durableTopicPrefetch="1">
>                                       <pendingMessageLimitStrategy>
>                                               
> <constantPendingMessageLimitStrategy limit="10"/>
>                                       </pendingMessageLimitStrategy>
>                               </policyEntry>             
>               </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> {code}
> Above causes inconsistencies on all the topics receiving messages that even 
> didn't match the wildcard naming ie. "customer01.in.data"
> Tried also with: 
> {code:xml}
> <policyEntry topic="customer01.data.>" topicPrefetch="1" 
> durableTopicPrefetch="1">
>                                       <pendingMessageLimitStrategy>
>                                               
> <constantPendingMessageLimitStrategy limit="10"/>
>                                       </pendingMessageLimitStrategy>
>                               </policyEntry> 
> {code}
> and with: 
> {code:xml}
> <policyEntry topic="customer01.data.value" topicPrefetch="1" 
> durableTopicPrefetch="1">
>                                       <pendingMessageLimitStrategy>
>                                               
> <constantPendingMessageLimitStrategy limit="10"/>
>                                       </pendingMessageLimitStrategy>
>                               </policyEntry> 
> {code}
> Last two above didn't caused inconsistencies on the topics that didn't match 
> the naming but anyway didn't made the limit strategy of pending messages for 
> the topic "customer01.data.value"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to