activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noufal <noufa...@gmail.com>
Subject Virtual Topic - Will work for following scenario
Date Wed, 20 May 2015 08:31:48 GMT
HI All,

I am using ActiveMQ 5.5.1. And i have  5 consumers and all these consumers
are subscribed (durable subscription) to a topic say "VirtualTopic.Test".
And i have one producer and it is sending to the created topic and it is
working fine. In some cases i dont want to send few messages to all
consumers. I want to send to a particular consumer. Can i use Virtual Topic
for this? (i tried but it is not working)


The Way Subscribers Created :
Topic topic= session.createTopic("Consumer.test1.VirtualTopic.Test");
TopicSubscriber consumer = session.createDurableSubscriber(topic,
subscriptionName);
MessageConsumer	consumer = session.createConsumer(topic);

The Way Producer Created :
Destination destination = session.createTopic("VirtualTopic.Test");
Producer producer = session.createProducer(destination);

And folllowing changes in activemq.xml

<destinationInterceptors>
      <virtualDestinationInterceptor>
        <virtualDestinations>
          <virtualTopic name=">" prefix="Consumer.*."
selectorAware="false"/>
        </virtualDestinations>
      </virtualDestinationInterceptor>
    </destinationInterceptors>


Noufal.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Virtual-Topic-Will-work-for-following-scenario-tp4696687.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message