You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "zhaoyi0113@gmail.com" <zh...@gmail.com> on 2010/11/03 04:54:08 UTC

How can I query queue in Java client?

I am using qpid-java client and want to know whether I can query queue and
topic in client side. 
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5700007.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "Sorin S." <ss...@gmail.com>.
Hi,
Have a look in qpid/java/client/example folder - there are lots of
examples you can use.
There is a README.txt in qpid/java/client/example/src/main/java folder
which explains how to use the examples.

HTH,

Sorin


On Wed, Nov 3, 2010 at 3:54 AM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> I am using qpid-java client and want to know whether I can query queue and
> topic in client side.
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5700007.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.

I am new to JMS. I have tried many times on javax.jms.QueueBrowser. It only
returns queue messages but not check whether the queue existed in the
broker. Could you give me a hint about which class I should use? 

Thanks in advance

Zhao Yi
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5709297.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
Oh sorry. You mean JMX, I though it is JMS. I understand now. Thanks very
much for your help.
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5719277.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "Sorin S." <ss...@gmail.com>.
Let me repeat for you: there is no JMS api for queue creation - and yes, the
broker provides you a JMX interface that allows you to query and see
if a queue  exists or not. As there is no JMS interface, there is no
JMS tutorial
for this non-existing JMS interface. So no, I don't have one.

Thanks
Sorin



On Mon, Nov 8, 2010 at 2:51 PM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> This link is not qpid jms tutorial right? As you said that qpid defines a
> class to query a queue on the broker. Do you have qpid jms tutorial about
> this method?
>
> Thanks,
> Zhao Yi
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5717126.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
This link is not qpid jms tutorial right? As you said that qpid defines a
class to query a queue on the broker. Do you have qpid jms tutorial about
this method?

Thanks,
Zhao Yi
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5717126.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


session.sync() in deep

Posted by Ba...@troika.ru.
Folks, greetings.

Could you please describe the Session.sync() method for me?
Should I use it or not? Does it affect on performance and how? Does it 
mean the same thing in C++ and Java client?

Regards, Boris
_______________________________________________________

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. 
If you need assistance please contact our Contact Center  (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp  


Re: How can I query queue in Java client?

Posted by "Sorin S." <ss...@gmail.com>.
Hi,
Have a look here:

http://download.oracle.com/javase/1.5.0/docs/guide/jmx/tutorial/tutorialTOC.html

Thanks

Sorin


On Mon, Nov 8, 2010 at 1:06 AM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> Hi,
>
> Could you please tell me which interface can do this?
>
> thanks,
> Zhao Yi
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5715531.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
Hi,

Could you please tell me which interface can do this?

thanks,
Zhao Yi
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5715531.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "Sorin S." <ss...@gmail.com>.
Hi,
As you realised, there is no JMS api for queue creation - and yes, the
broker provides you a JMX interface that allows you to query and see
if a queue  exists or not.

Thanks,

Sorin



On Sun, Nov 7, 2010 at 11:26 AM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> I am reading some material about JMS and found that the JMS specification
> doesn't define any API to test whether a queue physically exists or not. The
> physical creation and deletion of queues (and topics) is an administrative
> task, specific to the JMS provider you are using, and is not supported by
> the JMS API itself.
>
> I think checking whether a queue or topic physical creation should be
> defined in QPID broker. Right?
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5714058.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
I am reading some material about JMS and found that the JMS specification
doesn't define any API to test whether a queue physically exists or not. The
physical creation and deletion of queues (and topics) is an administrative
task, specific to the JMS provider you are using, and is not supported by
the JMS API itself.

I think checking whether a queue or topic physical creation should be
defined in QPID broker. Right?
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5714058.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "Sorin S." <ss...@gmail.com>.
Hi,
There is no one to one correspondence between C++ methods and Java
methods. Java client is JMS compliant, so you can use the JMS
interfaces methods for sending/receiving/browsing messages on a queue.
You can also implement your own logic in a method queryQueue if the
method name is significant for you.

Thanks,

Sorin



On Fri, Nov 5, 2010 at 11:55 AM, zhaoyi0113@gmail.com
<zh...@gmail.com> wrote:
>
> Hi,
>
> I have read these examples. But what I want is to query a queue from client
> side. I found that C++ client has a method session.queryQueue() which can be
> used to query queues' information from the broker. In Java client, the
> session class doesn't have such query method.
>
> thanks,
> Zhao Yi
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5708651.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Sorin S

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: How can I query queue in Java client?

Posted by "zhaoyi0113@gmail.com" <zh...@gmail.com>.
Hi,

I have read these examples. But what I want is to query a queue from client
side. I found that C++ client has a method session.queryQueue() which can be
used to query queues' information from the broker. In Java client, the
session class doesn't have such query method. 

thanks,
Zhao Yi
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-query-queue-in-Java-client-tp5700007p5708651.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org