In my testing of 5.2.0 I found that the solution in AMQ-1509 breaks queue subscriptions with selectors on a Network of Brokers with some messages not getting delivered. The scenario is two brokers A and B with a publisher publishing to A and subscribers with different selectors on A and B. Some of the messages that should be delivered to the subscriber on A are moved over to B and are never delivered. It appears that the network connector subscription on broker B is stealing the message before it can be delivered to the local client subscriber on A. And since there is no subscriber on broker B with the selector, the message gets parked. Backing out the change in 1509 resolves the problem.
It would seem that the network connector subscription should retain the selector for queues but not use the selector for topics to avoid duplicate delivery. Thus, topic messages would need to be forwarded via a single subscriber over the network channel, and queue messages would be forwarded over a separate network connector subscription for each client subscription. Since the ConduitBridge and DurableConduitBridge already have the characteristic of working better for topics by not replicating messages and the DemandForwardBridge is better suited for queues by accuratly load balancing across the cluster. My proposed solution would be to remove the topic selector fix provided in AMQ-1509 from the DemandForwardBridge and leave it in the other two bridges. With this change in a place, two network connectors would be used as a configuration to forward all messages in network of brokers, one network connector for queues, and one network connector for topics. Here is a sample configuration. <!-- The store and forward broker networks ActiveMQ will listen to --> <networkConnectors> <!-- configure a bridge for queues that forwards each subscription on demand --> <networkConnector uri="static://(tcp://hostname-b:61616)" name="queue-bridge" dynamicOnly="true" conduitSubscriptions="false" decreaseNetworkConsumerPriority="false"> <excludedDestinations> <topic physicalName="topic://>"/> </excludedDestinations> </networkConnector> <!-- configure a bridge for topics using a conduit subscription --> <networkConnector uri="static://(tcp://hostname-b:61616)" name="topic-bridge" conduitSubscriptions="true" decreaseNetworkConsumerPriority="false"> <excludedDestinations> <queue physicalName="queue://>"/> </excludedDestinations> </networkConnector> <networkConnectors> What do you think, is this the right way to go? I have a working solution that I could submit as a patch if interested. -- View this message in context: http://www.nabble.com/Problem-with-queue-subscriptions-that-have-selectors-on-a-Network-of-Brokers-tp21319434p21319434.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.