You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by politrons <po...@gmail.com> on 2015/11/03 11:14:00 UTC
Topic and Queue with same address
We are having an issue since we´re using Tibco for production environment and
ActiveMQ for our local environment. Everything has work fine until one of
our queues has been assigned with the same name than a topic. After that
we´ve start having issues with JNDI on aciveMQ. On Tibco seems like works
fine.
java.lang.ClassCastException: org.apache.activemq.command.ActiveMQTopic
cannot be cast to javax.jms.Queue
Here is where I define my topic and queue
String PAYMENT_TOPIC = "XXX.Payment.YY.JSON.V2_0";
String PAYMENT_QUEUE = "XXX.Payment.YY.JSON.V2_0";
And here how I create the queue
InitialContext jndi = new InitialContext(env);
final Queue queue = (Queue) jndi.lookup(queueName);
In ActiveMQ it´s possible has a topic and queue with the same address?
Regards.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Topic-and-Queue-with-same-address-tp4703620.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Topic and Queue with same address
Posted by Hiram Chirino <hi...@hiramchirino.com>.
Interesting. Are you saying you want 1 object that can be cast to Queue and
Topic?
On Tuesday, November 3, 2015, politrons <po...@gmail.com> wrote:
> We are having an issue since we´re using Tibco for production environment
> and
> ActiveMQ for our local environment. Everything has work fine until one of
> our queues has been assigned with the same name than a topic. After that
> we´ve start having issues with JNDI on aciveMQ. On Tibco seems like works
> fine.
>
> java.lang.ClassCastException:
> org.apache.activemq.command.ActiveMQTopic
> cannot be cast to javax.jms.Queue
>
> Here is where I define my topic and queue
>
> String PAYMENT_TOPIC = "XXX.Payment.YY.JSON.V2_0";
> String PAYMENT_QUEUE = "XXX.Payment.YY.JSON.V2_0";
>
> And here how I create the queue
>
> InitialContext jndi = new InitialContext(env);
> final Queue queue = (Queue) jndi.lookup(queueName);
>
>
> In ActiveMQ it´s possible has a topic and queue with the same address?
>
> Regards.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Topic-and-Queue-with-same-address-tp4703620.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
--
Hiram Chirino
Engineering | Red Hat, Inc.
hchirino@redhat.com | fusesource.com | redhat.com
skype: hiramchirino | twitter: @hiramchirino