You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajith Attapattu <ra...@gmail.com> on 2010/07/05 17:22:34 UTC
Re: JMS Browse Mode
Hi Wes,
Sorry I totally missed this one.
Lets say you have pre-defined a queue named "my-queue" with reject
policy as "ring"
Then if you are using trunk.
---------------------------------
Use the following address string
destination.my-ring-queue="my-queue"
If you are using Qpid release 0.6 and older versions (or MRG 1.2 rpms)
---------------------------------------------------------------------------------------
queue.my-ring-queue="my-queue" - assuming it's bound to "amq.direct"
And then you would also need to use -Dqpid.declare_queues=false.
If you are able to, I recommend using the latest as the new addressing
syntax is a lot more flexible and easy to use.
Once you have declared the destination (based on the version you use)
then you can do the following.
Queue queue = (Queue)ctx.lookup("my-ring-queue");
QueueBrowser browser = session.createBrowser(queue);
Regards,
Rajith
On Wed, Jun 30, 2010 at 9:02 AM, Carl Trieloff <cc...@redhat.com> wrote:
> On 06/28/2010 06:29 PM, Wes Parish wrote:
>>
>> Is it possible to connect to a pre-defined ring queue using JMS in browse
>> mode? If so, are there any examples?
>>
>
>
> yes, I believe you need to turn of the queue auto create from JMS. Rajith
> can provide more detailed example.
>
>
>>
>> Please correct me if I am wrong, but the way I uderstand it browse mode
>> will make a callback for every message on the queue when a user connects,
>> then again for each new incoming message. I would like to leverage this
>> feature.
>>
>> Wes
>>
>>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org