You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ravi1978 <um...@yahoo.co.in> on 2016/03/21 07:46:03 UTC

Error getting Queue size

Hi

We are upgraded ActiveMQ 5.6 to 5.12.2. We are defining a queue (destination
type as "Topic") and messages are stored and consumed properly. When we try
to browse the queue or try to get the count of messages in the queue getting
error "org.apache.activemq.broker.region.virtual.MappedQueueFilter cannot be
cast to org.apache.activemq.broker.region.Queue".

The same is working fine when we define the destination type as "queue"

Code :  return (Queue) getDestination(name, ActiveMQDestination.QUEUE_TYPE);
        where  getDestination() returns "Destination" obj


Same code works fine in ActiveMQ version  5.6.

Kindly suggest



--
View this message in context: http://activemq.2283324.n4.nabble.com/Error-getting-Queue-size-tp4709767.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Error getting Queue size

Posted by Rohit Sonawat <ro...@gmail.com>.
you have to explicitly handle your code, there might be many changes as you
are doing big jump from 5.6 to 5.12.2 and there is no issue in AMQ 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Error-getting-Queue-size-tp4709767p4709896.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Error getting Queue size

Posted by Tim Bain <tb...@alumni.duke.edu>.
Is there a reason why you're not doing what the error message implies and
changing your code to cast to (and therefore use)
org.apache.activemq.broker.region.virtual.MappedQueueFilter instead of
Queue?  That seems like the obvious answer, unless there's more to your
question than what you've asked.
On Mar 22, 2016 9:30 AM, "Ravi1978" <um...@yahoo.co.in> wrote:

> It is a "Virtual Topic". Sorry i didn't mention that clearly
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Error-getting-Queue-size-tp4709767p4709875.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Error getting Queue size

Posted by Ravi1978 <um...@yahoo.co.in>.
It is a "Virtual Topic". Sorry i didn't mention that clearly




--
View this message in context: http://activemq.2283324.n4.nabble.com/Error-getting-Queue-size-tp4709767p4709875.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Error getting Queue size

Posted by Tim Bain <tb...@alumni.duke.edu>.
Topics aren't queues, they're topics.  Try casting to Topic instead (though
you won't be able to browse it, because you can only browse queues).
On Mar 21, 2016 10:01 AM, "Ravi1978" <um...@yahoo.co.in> wrote:

> Hi
>
> We are upgraded ActiveMQ 5.6 to 5.12.2. We are defining a queue
> (destination
> type as "Topic") and messages are stored and consumed properly. When we try
> to browse the queue or try to get the count of messages in the queue
> getting
> error "org.apache.activemq.broker.region.virtual.MappedQueueFilter cannot
> be
> cast to org.apache.activemq.broker.region.Queue".
>
> The same is working fine when we define the destination type as "queue"
>
> Code :  return (Queue) getDestination(name,
> ActiveMQDestination.QUEUE_TYPE);
>         where  getDestination() returns "Destination" obj
>
>
> Same code works fine in ActiveMQ version  5.6.
>
> Kindly suggest
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Error-getting-Queue-size-tp4709767.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>