[ 
https://issues.apache.org/jira/browse/AMQ-6310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Malek updated AMQ-6310:
--------------------------------
    Description: 
Several of our brokers have a VirtualTopic with the name {{VirtualTopic.>}} and 
a prefix of {{\*.\*.}}.  The expected behavior would be that a message sent to 
{{VirtualTopic.A}} should be consumed on a queue with any pattern that matches 
{{\*.\*.VirtualTopic.A}}.

For example, if a message is published to a topic called {{VirtualTopic.A}}, 
that would be consumed on queues {{Consumer.A.VirtualTopic.A}} and 
{{Subscriber.A.VirtualTopic.A}}.

However, since the change made in AMQ-6058, it appears that, given the example 
above, _neither_ queue receives the message.  This is because the change 
performs a startsWith comparison of the destination against the prefix, rather 
than a regex comparison.

If there is a reason to prevent leading wildcards in the prefix, it should be 
documented, otherwise the sanity check in {{shouldDispatch}} needs to be 
updated to handle it.

  was:
Several of our brokers have a VirtualTopic with the name {{VirtualTopic.>}} and 
a prefix of {{\*.\*.}}.  The expected behavior would be that a message sent to 
{{VirtualTopic.A}} should be consumed on a queue with any pattern that matches 
{{\*.\*.VirtualTopic.A}}.

For example, if a message is published to a topic called {{VirtualTopic.A}}, 
that would be consumed on queues {{Consumer.A.VirtualTopic.A}} and 
{{Subscriber.A.VirtualTopic.A}}.

However, since the change made in AMQ-6058, it appears that, given the example 
above, -neither- queue receives the message.  This is because the change 
performs a startsWith comparison of the destination against the prefix, rather 
than a regex comparison.

If there is a reason to prevent leading wildcards in the prefix, it should be 
documented, otherwise the sanity check in {{shouldDispatch}} needs to be 
updated to handle it.


> Certain VirtualTopic configurations no longer send messages to the correct 
> queue
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-6310
>                 URL: https://issues.apache.org/jira/browse/AMQ-6310
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.13.0, 5.13.1, 5.13.2, 5.13.3
>            Reporter: Jonathan Malek
>
> Several of our brokers have a VirtualTopic with the name {{VirtualTopic.>}} 
> and a prefix of {{\*.\*.}}.  The expected behavior would be that a message 
> sent to {{VirtualTopic.A}} should be consumed on a queue with any pattern 
> that matches {{\*.\*.VirtualTopic.A}}.
> For example, if a message is published to a topic called {{VirtualTopic.A}}, 
> that would be consumed on queues {{Consumer.A.VirtualTopic.A}} and 
> {{Subscriber.A.VirtualTopic.A}}.
> However, since the change made in AMQ-6058, it appears that, given the 
> example above, _neither_ queue receives the message.  This is because the 
> change performs a startsWith comparison of the destination against the 
> prefix, rather than a regex comparison.
> If there is a reason to prevent leading wildcards in the prefix, it should be 
> documented, otherwise the sanity check in {{shouldDispatch}} needs to be 
> updated to handle it.



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

Reply via email to