You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by sspandit <pa...@gmail.com> on 2011/11/24 15:07:29 UTC

How to use Qpid Ring Queues in Java

Looking for example of using (create, publish, consume, delete) ring queue
using Java.

Thanks in advance.
Sanjeev



--
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-use-Qpid-Ring-Queues-in-Java-tp7028249p7028249.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 to use Qpid Ring Queues in Java

Posted by Sanjeev Pandit <pa...@gmail.com>.
Thanks Frase.
This is exactly what I was looking for.

On Thu, Nov 24, 2011 at 10:09 AM, Fraser Adams
<fr...@blueyonder.co.uk> wrote:
> Hi Sanjeev,
> In Java it's all in JMS, you've got a couple of options - one is to create a
> queue "administratively" via qpid-config
>
> e.g. qpid-config add queue testqueue --limit-policy=ring
>
> Or you could do it via an address, the following is for a queue called
> testqueue, bound to the default headers exchange matching a couple of
> headers with  a size of 500MB
>
> testqueue; {create: receiver, node: {x-declare: {arguments:
> {'qpid.policy_type': ring, 'qpid.max_size': 500000000}}, x-bindings:
> [{exchange: 'amq.match', queue: 'testqueue', key: 'data1', arguments:
> {x-match: all, data-service: amqp-delivery, item-owner: fadams}}]}}
>
> The x-bindings will clearly be different if you use a different exchange (or
> if you want to match different headers :-)) hopefully this gives you the
> idea. Take a look at the "Address" section in the "Programming in Apache
> Qpid" book and hopefully you'll see the pattern.
>
> HTH
> Frase
>
> sspandit wrote:
>>
>> Looking for example of using (create, publish, consume, delete) ring queue
>> using Java.
>>
>> Thanks in advance.
>> Sanjeev
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-qpid-users.2158936.n2.nabble.com/How-to-use-Qpid-Ring-Queues-in-Java-tp7028249p7028249.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
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

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


Re: How to use Qpid Ring Queues in Java

Posted by Fraser Adams <fr...@blueyonder.co.uk>.
Hi Sanjeev,
In Java it's all in JMS, you've got a couple of options - one is to 
create a queue "administratively" via qpid-config

e.g. qpid-config add queue testqueue --limit-policy=ring

Or you could do it via an address, the following is for a queue called 
testqueue, bound to the default headers exchange matching a couple of 
headers with  a size of 500MB

testqueue; {create: receiver, node: {x-declare: {arguments: 
{'qpid.policy_type': ring, 'qpid.max_size': 500000000}}, x-bindings: 
[{exchange: 'amq.match', queue: 'testqueue', key: 'data1', arguments: 
{x-match: all, data-service: amqp-delivery, item-owner: fadams}}]}}

The x-bindings will clearly be different if you use a different exchange 
(or if you want to match different headers :-)) hopefully this gives you 
the idea. Take a look at the "Address" section in the "Programming in 
Apache Qpid" book and hopefully you'll see the pattern.

HTH
Frase

sspandit wrote:
> Looking for example of using (create, publish, consume, delete) ring queue
> using Java.
>
> Thanks in advance.
> Sanjeev
>
>
>
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-to-use-Qpid-Ring-Queues-in-Java-tp7028249p7028249.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
>
>
>   


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