Hi, Suppose we have store-and-forward network of two brokers (A and B) that share a topic (T1). Each broker has a single consumer for T1 (ConsumerA and ConsumerB). A and B communicate by producing and consuming messages from T1. Since ConsumerA does not want to consume the messages that it produces, and vice-versa with ConsumerB, each consumer is created with noLocal=true.
This works great, except that each broker can only have one such consumer (i.e., there is no load balancing) as described here: http://activemq.apache.org/virtual-destinations.html To allow multiple consumers, we "virtualized" T1 so that each broker has its own private queue analog (Consumers.A.T1 and Consumers.B.T1). In order to load balance the traffic arriving through the topic, A has multiple consumers for Consumers.A.T1 and B hsa multiple consumers for Consumers.B.T1. This works great if the consumers have noLocal=false, but if the consumers have noLocal=true (as per our original desire to avoid processing reflected messages), we run into the following problem: A producer on A sends a message M to T1. AMQ replicates M so that it appears in broker A's Consumers.A.T1 queue and in broker B's Consumers.B.T1 queue. Since the consumers for Consumers.A.T1 have noLocal=true, M is never dispatched to a consumer on A. This happens indefinitely until Consumers.A.T1 is filled up (i.e., through jconsole we see the memory usage on the queue as 100%). Questions ======= 1) Is this behaviour intended? I'm guessing that it is intended more as a consequence of the semantics of virtual topics. 2) Is there any way to configure AMQ so that locally-produced messages to a virtual topic are not copied to the local consumer queues? I'm guessing the answer is no. 3) Are there any other workarounds besides using noLocal=false or setting an expiry on the published messages? Thanks, Stirling -- View this message in context: http://old.nabble.com/Problem-with-Virtual-Topics-and-noLocal%3Dtrue-consumers-tp26416480p26416480.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.