activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <>
Subject Re: VirtualTopic and VirtualTopic Consumer
Date Sun, 18 Mar 2018 05:10:32 GMT
I looked again at your original message, and realized that another
(simpler, and therefore probably more likely) interpretation of what you
wrote is that you're only seeing messages sent to topic VirtualTopic.Test
appearing in queue Consumer.A.VirtualTopic.Test when the consumer is
connected. So I'll assume for now that I misinterpreted your question when
I first reply, and respond based on this simpler interpretation here.

I set up a pair of simple unit tests where the first sends a message to
VirtualTopic.Test and the second attempts to receive a message from
Consumer.A.VirtualTopic.Test. If I run the producer test and then the
consumer test, I receive a message in the consumer test, which proves that
this feature works (for 5.14.5, the broker version I'm testing with; you
didn't say what version you're using, so I can't say whether it's the same
version you're using). So if the simpler interpretation of your question is
right, the behavior you're seeing is not because the broker doesn't work
properly for this feature.

Are you sure that no message is getting enqueued in the queue when a
message is sent to the topic and the consumer is offline? To confirm that,
do the following:

   - Ensure that your consumer has attempted to consume from
   Consumer.YOURCONSUMERNAME.VirtualTopic.YOURTOPICNAME, and then
   disconnect the consumer
   - Attach a JMX viewer such as JConsole to the broker
   - Navigate to the Consumer.YOURCONSUMERNAME.VirtualTopic.YOURTOPICNAME
   MBean, then view it's attributes
   - Note the EnqueueCount value
   - Ensure that your consumer is disconnected
   - Have your producer publish one and only one message to topic
   - Refresh the attributes of the
   - Note the EnqueueCount value

If the value increased by 1, then the broker is functioning properly, and
your inability to consume messages from the queue isn't because the virtual
topic isn't working properly. (Maybe the message is expiring before being

If the value didn't increase, then the behavior you're seeing doesn't match
what I'm seeing, and we'll have to dig into it further.


On Fri, Mar 16, 2018 at 7:04 AM, Tim Bain <> wrote:

> Are you talking about forwarding between brokers in a network of brokers?
> In that case, you would want to use staticallyIncludedDestinations instead
> of dynamicallyIncludedDestinations.
> Tim
> On Wed, Mar 14, 2018, 10:19 AM alainkr <> wrote:
>> Hello
>> It look's like that messages sent to VirtualTopic are only forwarded to
>> Consumer when they are actively listening.
>> Is there a way to have this forwarding regardless of the consumer actually
>> listening or not, but just by the fact the the queues exist ?
>> Thanks
>> Alain
>> --
>> Sent from:
>> .html

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message