You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by eugene <eu...@gmail.com> on 2012/07/13 12:25:08 UTC

list queues

Hello,

Is there a way to get the current list of all queues/topics on the broker
pragmatically in Java?

P.S. This is funny, but every time I face a problem like that, the forum is
the only solution so far. :)
      
Regards,
Eugene.

--
View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/list-queues-tp7580986.html
Sent from the Apache Qpid developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: list queues

Posted by eugene <eu...@gmail.com>.
Darn! This is what happens when you want to do more things at a time.

The thing with the temporary queue is totally my fault. It works perfectly
fine with an ordinary queue. :)

But there is still a problem with deleting temporary queues: while the
connection/session are still alive call tempQueue.delete() and then issue
"qpid-stat -q", the tempQueue is still there, even if I called the delete()
method on it (and closed all consumers on it) before deleting it. You are
not relying on this, in fact not even using it, nevertheless this is an
issue I think.

Thank You,
Eugene.

--
View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/list-queues-tp7580986p7581092.html
Sent from the Apache Qpid developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: list queues

Posted by Gordon Sim <gs...@redhat.com>.
On 07/16/2012 12:12 PM, eugene wrote:
> Thank You Gordon!
>
> A couple of things are still wrong (in my opinion).
>
> I have to create a Temporary Queue all the time. I've tried with an ordinary
> queue and it does not work.

It should do... what was happening? Do you have some example code?

Also what do you mean by 'all the the time'? You should not have to 
create a new queue every time you want to get the list if you do not 
want to.

> :( In order for to get this temporary queue
> removed I have to quit the session, because calling TemporaryQueue.delete
> has no effect, the queue is not deleted. No what If I want to do some
> pooling under the same session and not create and delete it. Under one
> session I can create potentially an infinite number of temporary queues..
> sounds too bad.
>
> We have not spent too much time debuging things out, but gave up on this
> path. :( initially it sounded good.
>
> Nevertheless Thank You (again) for your time!
>
> Regards,
> Eugene.
>
> --
> View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/list-queues-tp7580986p7581031.html
> Sent from the Apache Qpid developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: list queues

Posted by eugene <eu...@gmail.com>.
Thank You Gordon!

A couple of things are still wrong (in my opinion).

I have to create a Temporary Queue all the time. I've tried with an ordinary
queue and it does not work. :( In order for to get this temporary queue
removed I have to quit the session, because calling TemporaryQueue.delete
has no effect, the queue is not deleted. No what If I want to do some
pooling under the same session and not create and delete it. Under one
session I can create potentially an infinite number of temporary queues..
sounds too bad. 

We have not spent too much time debuging things out, but gave up on this
path. :( initially it sounded good.

Nevertheless Thank You (again) for your time!

Regards,
Eugene.

--
View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/list-queues-tp7580986p7581031.html
Sent from the Apache Qpid developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: list queues

Posted by Gordon Sim <gs...@redhat.com>.
On 07/13/2012 11:25 AM, eugene wrote:
> Is there a way to get the current list of all queues/topics on the broker
> pragmatically in Java?

If you mean programmatically, then yes. The first question though is 
which broker you are using (i.e. c++ or java) as they have different 
management mechanisms.

If using the c++ broker, management is done through a message-based 
protocol - i.e. by sending and receiving messages to a special 
destination on the broker. There was an example of that in an earlier 
thread: 
http://mail-archives.apache.org/mod_mbox/qpid-users/201106.mbox/%3C4DF5F4DE.10901@redhat.com%3E. 
The management protocol is called QMF and you'll see many other threads 
on QMF and JMS.

QMF is supported to some extent by the Java broker, but it also supports 
JMX (with REST based access coming in the next release I believe). I 
don't have first hand experience of that, but I'm sure others on the 
list do...

> P.S. This is funny, but every time I face a problem like that, the forum is
> the only solution so far. :)

Yes, it is a bit of a weakness of our documentation :-(

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org