[ https://issues.apache.org/jira/browse/ARTEMIS-4259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robbie Gemmell updated ARTEMIS-4259: ------------------------------------ Description: The CORE protocol does not honor consumers with a filter when used on FQQN topics, leading to no filtering occurring. For AMQP, the consumer is filtered by the broker but the subscription queue is not, leading to retention of non-matching messages. Steps to reproduce: Start a consumer using CLI: {noformat} ./artemis consumer --url tcp://localhost:61616 --destination topic://topic1::topic1.queue1 --protocol=core --message-count 1 --filter "foo='bar'" --verbose{noformat} Send a message without the filter string: {noformat} ./artemis producer --url tcp://localhost:61616 --destination topic://topic1::topic1.queue1 --protocol=core --message-count 1 --message "some text"{noformat} You can observe the CORE client consuming the message which does not contain the filter String: {noformat} Connection brokerURL = tcp://localhost:61616 Consumer:: filter = foo='bar' Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 wait until 1 messages are consumed Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Received some text JMS Message ID:ID:a00cbea3-dda7-11ed-9c2d-b42e99ea6f5c Received text sized at 9 Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumed: 1 messages Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Elapsed time in second : 8 s Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Elapsed time in milli second : 8140 milli seconds Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumed: 1 messages Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumer thread finished{noformat} was: The CORE protocol does not honor consumers with a filter when used on FQQN topics. Steps to reproduce: Start a consumer using CLI: {noformat} ./artemis consumer --url tcp://localhost:61616 --destination topic://topic1::topic1.queue1 --protocol=core --message-count 1 --filter "foo='bar'" --verbose{noformat} Send a message without the filter string: {noformat} ./artemis producer --url tcp://localhost:61616 --destination topic://topic1::topic1.queue1 --protocol=core --message-count 1 --message "some text"{noformat} You can observe the CORE client consuming the message which does not contain the filter String: {noformat} Connection brokerURL = tcp://localhost:61616 Consumer:: filter = foo='bar' Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 wait until 1 messages are consumed Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Received some text JMS Message ID:ID:a00cbea3-dda7-11ed-9c2d-b42e99ea6f5c Received text sized at 9 Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumed: 1 messages Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Elapsed time in second : 8 s Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Elapsed time in milli second : 8140 milli seconds Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumed: 1 messages Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumer thread finished{noformat} > JMS consumer + FQQN + selector not working > ------------------------------------------ > > Key: ARTEMIS-4259 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4259 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Justin Bertram > Assignee: Justin Bertram > Priority: Major > Fix For: 2.29.0 > > Time Spent: 4.5h > Remaining Estimate: 0h > > The CORE protocol does not honor consumers with a filter when used on FQQN > topics, leading to no filtering occurring. For AMQP, the consumer is filtered > by the broker but the subscription queue is not, leading to retention of > non-matching messages. > Steps to reproduce: > Start a consumer using CLI: > {noformat} > ./artemis consumer --url tcp://localhost:61616 --destination > topic://topic1::topic1.queue1 --protocol=core --message-count 1 --filter > "foo='bar'" --verbose{noformat} > Send a message without the filter string: > {noformat} > ./artemis producer --url tcp://localhost:61616 --destination > topic://topic1::topic1.queue1 --protocol=core --message-count 1 --message > "some text"{noformat} > You can observe the CORE client consuming the message which does not contain > the filter String: > {noformat} > Connection brokerURL = tcp://localhost:61616 > Consumer:: filter = foo='bar' > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 wait until 1 messages > are consumed > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Received some text > JMS Message ID:ID:a00cbea3-dda7-11ed-9c2d-b42e99ea6f5c > Received text sized at 9 > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumed: 1 messages > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Elapsed time in > second : 8 s > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Elapsed time in milli > second : 8140 milli seconds > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumed: 1 messages > Consumer ActiveMQTopic[topic1::topic1.queue1], thread=0 Consumer thread > finished{noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)