You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by dexter <ro...@gmail.com> on 2018/01/30 23:29:59 UTC

[Proton-J] Create exchange / queues and bind them using proton-j library

Hi,

I'm trying to create dynamically an exchange type topic and some queues and 
bind them with the topic using a bindingKey using the latest Java library
proton-j-0.25.0.jar on a Apache Qpid Broker-J 7.0.0 server.

If the exchange / queues are in place (created using RabbitMQ library
amqp-client-5.1.2.jar) my app works. But I want to create the exchange and
the queues using only proton-j library, because is supports AMQP 1.0
Protocol.

I searched over this forum and over the GitHub examples but I could not find
a solution.

As I understand Receiver and Sender have some properties to set address,
durability, expiryPolicy and more. The address is in the format of
"exchangeName/bindingKey". 

Does the proton-j library support ExchangeDeclare, QueueDeclare and
QueueBind ? If yes, is there and example ? If no, what library should I use
to manage exchanges / queues on a Broker with AMQP 1.0 Protocol support ?

Thank you,
Marius



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: [Proton-J] Create exchange / queues and bind them using proton-j library

Posted by dexter <ro...@gmail.com>.
Yes, I'm using Broker-J 7.0.0.

Thank you for pointing me the nodeAutoCreationPolicies and AMQP Management
protocol.

I tried nodeAutoCreationPolicies, it works but it's not flexible and it
depends on the broker specific condifguration.

AMQP Management protocol looks better, even if it's just a working draft for
moment. I found that Broker-J 7.0.0 now supports AMQP Management WD12:
https://issues.apache.org/jira/browse/QPID-7533



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: [Proton-J] Create exchange / queues and bind them using proton-j library

Posted by Gordon Sim <gs...@redhat.com>.
On 31/01/18 13:18, Keith W wrote:
> I think Dexter is using Qpid Broker-J.

I do apologise. I saw RabbitMQ and clearly didn't spend enough time 
reading before responding!

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


Re: [Proton-J] Create exchange / queues and bind them using proton-j library

Posted by Keith W <ke...@gmail.com>.
I think Dexter is using Qpid Broker-J.   Broker-J does have the
ability to dynamically create nodes (queues or exchanges) in response
to an attempt to form a link to an address. This is called node auto
creation and is something that is configured on the Broker. The client
side has no knowledge.  You could use it, say, to have a durable queue
appear the first time you attempt to receive from it.

Unfortunately, documentation is sparse for this feature and there is
no UI for it exposed in the management console at present.   However,
what was written on the JIRA and associated mailing list post (linked
within the JIRA's description) should help get going.  If not, let us
know what you are trying to achieve and I'll try to guide you further.

https://issues.apache.org/jira/browse/QPID-6954

Broker-J does implement the latest AMQP Management draft, but this is
a moving target and the API will be subject to further (probably
breaking) changes as the specification evolves.

Hope this helps.




On 31 January 2018 at 08:29, Gordon Sim <gs...@redhat.com> wrote:
> On 30/01/18 23:29, dexter wrote:
>>
>> Hi,
>>
>> I'm trying to create dynamically an exchange type topic and some queues
>> and
>> bind them with the topic using a bindingKey using the latest Java library
>> proton-j-0.25.0.jar on a Apache Qpid Broker-J 7.0.0 server.
>>
>> If the exchange / queues are in place (created using RabbitMQ library
>> amqp-client-5.1.2.jar) my app works. But I want to create the exchange and
>> the queues using only proton-j library, because is supports AMQP 1.0
>> Protocol.
>>
>> I searched over this forum and over the GitHub examples but I could not
>> find
>> a solution.
>>
>> As I understand Receiver and Sender have some properties to set address,
>> durability, expiryPolicy and more. The address is in the format of
>> "exchangeName/bindingKey".
>>
>> Does the proton-j library support ExchangeDeclare, QueueDeclare and
>> QueueBind ? If yes, is there and example ? If no, what library should I
>> use
>> to manage exchanges / queues on a Broker with AMQP 1.0 Protocol support ?
>
>
> Proton-j is an AMQP 1.0 implementation and AMQP 1.0 does not define
> ExchangeDeclare etc from older iterations of the protocol.
>
> There is no standard schema for managing AMQP 1.0 brokers. You will need to
> sue whatever your broker supports for that.
>
> With RabbitMQ you can create and bind a temporary queue with the address
> format '/exchange/my-exchange/my-routing-key' [1]. Not sure whether that
> will be of use to you in your system.
>
> [1]
> https://github.com/rabbitmq/rabbitmq-amqp1.0/blob/v3.7.3/README.md#routing-and-addressing
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

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


Re: [Proton-J] Create exchange / queues and bind them using proton-j library

Posted by Gordon Sim <gs...@redhat.com>.
On 30/01/18 23:29, dexter wrote:
> Hi,
> 
> I'm trying to create dynamically an exchange type topic and some queues and
> bind them with the topic using a bindingKey using the latest Java library
> proton-j-0.25.0.jar on a Apache Qpid Broker-J 7.0.0 server.
> 
> If the exchange / queues are in place (created using RabbitMQ library
> amqp-client-5.1.2.jar) my app works. But I want to create the exchange and
> the queues using only proton-j library, because is supports AMQP 1.0
> Protocol.
> 
> I searched over this forum and over the GitHub examples but I could not find
> a solution.
> 
> As I understand Receiver and Sender have some properties to set address,
> durability, expiryPolicy and more. The address is in the format of
> "exchangeName/bindingKey".
> 
> Does the proton-j library support ExchangeDeclare, QueueDeclare and
> QueueBind ? If yes, is there and example ? If no, what library should I use
> to manage exchanges / queues on a Broker with AMQP 1.0 Protocol support ?

Proton-j is an AMQP 1.0 implementation and AMQP 1.0 does not define 
ExchangeDeclare etc from older iterations of the protocol.

There is no standard schema for managing AMQP 1.0 brokers. You will need 
to sue whatever your broker supports for that.

With RabbitMQ you can create and bind a temporary queue with the address 
format '/exchange/my-exchange/my-routing-key' [1]. Not sure whether that 
will be of use to you in your system.

[1] 
https://github.com/rabbitmq/rabbitmq-amqp1.0/blob/v3.7.3/README.md#routing-and-addressing

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