There's still a problem with your code. This:
String number =
consumerTemplate.receiveBody("activemq:topic:Consumer.A.VirtualTopic.bar",
String.class);
must be changed to this:
String number =
consumerTemplate.receiveBody("activemq:queue:Consumer.A.VirtualTopic.bar",
String.class);
Despite being called a virtual 'topic' it's actually a _queue_ that you're
consuming from.
You can remove the virtual destination interceptor definition from your
activemq.xml as it's adding no value.
Thanks,
Paul
On Tue, Apr 14, 2015 at 5:32 PM, hayden74 <[email protected]> wrote:
> Thanks Paul,
> That was a typo, the code now looks like:
>
> Camel side:
> from("jms:queue:foo").to("activemq:topic:VirtualTopic.bar");
>
> onsumerTemplate consumerTemplate = context.getBean("consumerTemplate",
> ConsumerTemplate.class);
> String number =
> consumerTemplate.receiveBody("activemq:topic:Consumer.A.VirtualTopic.bar",
> String.class);
>
>
> I've also added the below to the activemq.xml but still didn't help
>
> <destinationInterceptors>
> <virtualDestinationInterceptor>
> <virtualDestinations>
> <virtualTopic name="VirtualTopic.>"
> prefix="Consumer.*.VirtualTopic.>" selectorAware="false"/>
> </virtualDestinations>
> </virtualDestinationInterceptor>
> </destinationInterceptors>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Virtual-Topic-isn-t-working-tp5765762p5765791.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>