You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Julien Charon <Ju...@avitech.aero> on 2015/12/14 14:26:21 UTC

Java broker / AMQP 1.0 / dynamic creation of queues

  Hi,


I'd like to know if it's possible to dynamically / automatically have queues created using AMQP 1.0 and the java broker. I'd like to avoid to use the REST or JMX interface to create queues manually before a client can make a connection. I need this for some publish/subscribe scenario.
Any advice would be appreciated.


Best regards,
Julien

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: julien.charon@avitech.aero<ma...@avitech.aero>
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero<http://avitech.aero/>

This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.


AW: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Julien Charon <Ju...@avitech.aero>.
  Hi,


Thank you Rob, I will definitely have a look at the C++ broker and that automatic creation feature. Anyway, I think it surely would be nice to have similar functionality in the java broker.
Well, I guess we really need some FIFO queue for our use case, since we want messages to be retained and persisted if there is no consumer for the queue / topic. Also, messages shall not be lost if the broker has to be restarted for some reason. We also need queues to be dedicated to the specific user that caused them to be created as the messages sent to the queue correspond to a user specific filter defined when the subscription is made.
At the moment I think we will need to implement some kind of proxy broker that intercepts the connection / session / link, creates the queue on the real broker using REST/JMX and finally forwards everything to the real broker. I don't like that approach, but I have no better idea at the moment. 
Btw, are there any possibilities to register some listeners or plugins to the broker that can intercept the creation of connections / sessions / links and perform some pre / post creation operations? I guess that would help a lot.


Best regards,
 
Julien 

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: julien.charon@avitech.aero
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero

This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
-----Ursprüngliche Nachricht-----
Von: Rob Godfrey [mailto:rob.j.godfrey@gmail.com] 
Gesendet: Montag, 14. Dezember 2015 19:27
An: users@qpid.apache.org
Betreff: Re: Java broker / AMQP 1.0 / dynamic creation of queues

As Olivier states, there's currently no (AMQP) standard way of doing it.
Early in the new year I hope to get back to implementing the latest draft of the AMQP management spec in the Java Broker, in practice this will look very much like exposing the same API as REST except rather than making HTTP calls and receiving responses, you'll be sending messages ad receiving replies over standard AMQP links on AMQP sessions on AMQP connections.

The other approach (which I believe is available in the C++ broker) is to define some namespace / pattern for which queues of some kind are automagically created when referenced.  We could implement something similar in the Java Broker, though there's a lot of configuration that goes along with a queue, and I'm not sure of the best way of specifying what
*sort* of queue should be created.

Finally, getting back to your use case  you say you want a queue "for some publish/subscribe scenario"... so are you really talking about a FIFO queue, or a more topic like entity?  What sort of durability requirements do you have here... if there are no consumers on your "topic" are you expecting the messages to be retained or dropped...

-- Rob

On 14 December 2015 at 18:19, Olivier Mallassi <ol...@gmail.com>
wrote:

> As fas as I undestood, you cannot.
>
>
> Robbie Gemmell gave an answer here
>
> http://qpid.2158936.n2.nabble.com/JMS-AMQP-1-0-link-definition-and-gua
> rantee-delivery-td7634939.html
>
>
> "The core AMQP 1.0 protocol has no built in facility to explicitly 
> create name queues etc (except 'dynamic' nodes, e.g temporary queues, 
> anmed by the broker) in the way that prior AMQP 0-x protocols did, as 
> it instead concentrated on getting messages from A to B rather than 
> defining an explicit broker model that must be implemented. There is 
> an effort at the OASIS AMQP TC to define a layered AMQP Management 
> specification that uses AMQP messaging to support implementing such 
> management operations (and many others). "
>
>
>
> On Mon, Dec 14, 2015 at 2:26 PM, Julien Charon 
> <Julien.Charon@avitech.aero
> >
> wrote:
>
> >   Hi,
> >
> >
> > I'd like to know if it's possible to dynamically / automatically 
> > have queues created using AMQP 1.0 and the java broker. I'd like to 
> > avoid to
> use
> > the REST or JMX interface to create queues manually before a client 
> > can make a connection. I need this for some publish/subscribe scenario.
> > Any advice would be appreciated.
> >
> >
> > Best regards,
> > Julien
> >
> > Avitech GmbH
> > Engineering AxL
> > Tel.: +49 (0)7541/282-177
> > Fax: +49 (0)7541/282-199
> > e-mail: 
> > julien.charon@avitech.aero<ma...@avitech.aero>
> > ________________________________________________
> > Avitech GmbH
> > Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany 
> > Court Registration: Amtsgericht Ulm | HRB 728293 
> > Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza 
> > http://avitech.aero<http://avitech.aero/>
> >
> > This message may contain confidential information and is intended 
> > only
> for
> > the individual named. If you are not the named addressee you should 
> > not disseminate, distribute or copy this e-mail. Please notify the 
> > sender immediately by e-mail if you have received this e-mail by 
> > mistake and delete this e-mail from your system.
> >
> >
>

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


Re: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Rob Godfrey <ro...@gmail.com>.
On 16 December 2015 at 14:24, Julien Charon <Ju...@avitech.aero>
wrote:

>   Hi Rob,
>
>
> Thank you very much for the implementation. I just tested it with a very
> similar configuration as described in QPID-6954 (merely modified the
> pattern) and it seems to work pretty well.
> However, I noticed 2 things:
> 1. After a broker restart, an automatically created queue has disappeared,
> no matter whether the nodeAutoCreationPolicies configuration is defined as
> durable or not. When I create a durable queue manually with the web
> management interface I can directly see it in the json configuration. This
> is not the case for automatically created ones. Maybe there's a store
> operation missing or something like that?
>

Doh - I'm an idiot... That should be fixed now on trunk


> 2. I'm not sure if this is related to the change you've made, I doubt it
> to be honest but I'd like to mention it anyway. I used to test / play with
> the java broker with the help of the qpid-jms-examples (
> https://github.com/apache/qpid-jms/tree/master/qpid-jms-examples)
> HelloWorld class which is very similar to the Hello class in the
> qpid-client-examples that can be found on SVN. However, while the example
> used to work fine with the java broker 0.32, I now get a ClassCastException
> because the consumer receives a javax.jms.BytesMessage (with no content)
> instead of a javax.jms.TextMessage.
>

That was probably due to a bug caused by another check-in I made last
night, which I fixed earlier today :-)

Hopefully everything should work now - apologies for that!

-- Rob


>
>
> Best regards,
>
> Julien
>
> Avitech GmbH
> Engineering AxL
> Tel.: +49 (0)7541/282-177
> Fax: +49 (0)7541/282-199
> e-mail: julien.charon@avitech.aero
> ________________________________________________
> Avitech GmbH
> Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
> Court Registration: Amtsgericht Ulm | HRB 728293
> Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
> http://avitech.aero
>
> This message may contain confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system.
> -----Ursprüngliche Nachricht-----
> Von: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> Gesendet: Dienstag, 15. Dezember 2015 21:53
> An: users@qpid.apache.org
> Betreff: Re: Java broker / AMQP 1.0 / dynamic creation of queues
>
> Hi Julien,
>
> I've made a first pass at an implementation of a similar policy based
> approach for the Java Broker.  The details are in QPID-6954 (
> https://issues.apache.org/jira/browse/QPID-6954), and the code is
> committed against the trunk in the subversion repo (
> https://svn.apache.org/repos/asf/qpid/java/trunk/).
>
> It allows for creating queues or exchanges on the publishing of a message
> (or the establishment of an incoming link to an address), and the creating
> of queues (but not currently exchanges) on the establishment of an outgoing
> link (a consumer) for an address.  There is no way to auto-create bindings
> currently.
>
> If you get a chance to try it out, let me know if it is works for you.
>
> Cheers,
> Rob
>
> On 15 December 2015 at 09:25, Gordon Sim <gs...@redhat.com> wrote:
>
> > On 12/14/2015 06:27 PM, Rob Godfrey wrote:
> >
> >> The other approach (which I believe is available in the C++ broker)
> >> is to define some namespace / pattern for which queues of some kind
> >> are automagically created when referenced.  We could implement
> >> something similar in the Java Broker, though there's a lot of
> >> configuration that goes along with a queue, and I'm not sure of the
> >> best way of specifying what
> >> *sort*  of queue should be created.
> >>
> >
> > The way the c++ broker does this is that it allows 'policies' to be
> > associated with some naming pattern. The policy can include various
> > aspects of the queue configuration (e.g. maximum depth, durability,
> > last-value semantics etc) that are then applied to any queue created
> > as a result of matching that naming pattern.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For
> > additional commands, e-mail: users-help@qpid.apache.org
> >
> >
>

AW: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Julien Charon <Ju...@avitech.aero>.
Hi Rob, Robbie,


I just updated with the latest changes and re-installed the broker: both problems I mentioned yesterday are solved now and everything works as expected. Thank you very much!


Best regards,
 
Julien 

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: julien.charon@avitech.aero
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero

This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.


-----Ursprüngliche Nachricht-----
Von: Robbie Gemmell [mailto:robbie.gemmell@gmail.com] 
Gesendet: Mittwoch, 16. Dezember 2015 16:29
An: users@qpid.apache.org
Betreff: Re: Java broker / AMQP 1.0 / dynamic creation of queues

Did you have Rob's latest commit (r1720340) from a few hours ago? It seems some other changes had impacted on the brokers AMQP 1.0 support on trunk. I havent tried it against the current trunk, but I did run that example against the recent 6.0.0 release earlier while testing something else and it was happy then.

Robbie

On 16 December 2015 at 14:24, Julien Charon <Ju...@avitech.aero> wrote:
>   Hi Rob,
>
>
> Thank you very much for the implementation. I just tested it with a very similar configuration as described in QPID-6954 (merely modified the pattern) and it seems to work pretty well.
> However, I noticed 2 things:
> 1. After a broker restart, an automatically created queue has disappeared, no matter whether the nodeAutoCreationPolicies configuration is defined as durable or not. When I create a durable queue manually with the web management interface I can directly see it in the json configuration. This is not the case for automatically created ones. Maybe there's a store operation missing or something like that?
> 2. I'm not sure if this is related to the change you've made, I doubt it to be honest but I'd like to mention it anyway. I used to test / play with the java broker with the help of the qpid-jms-examples (https://github.com/apache/qpid-jms/tree/master/qpid-jms-examples) HelloWorld class which is very similar to the Hello class in the qpid-client-examples that can be found on SVN. However, while the example used to work fine with the java broker 0.32, I now get a ClassCastException because the consumer receives a javax.jms.BytesMessage (with no content) instead of a javax.jms.TextMessage.
>
>
> Best regards,
>
> Julien
>
> Avitech GmbH
> Engineering AxL
> Tel.: +49 (0)7541/282-177
> Fax: +49 (0)7541/282-199
> e-mail: julien.charon@avitech.aero
> ________________________________________________
> Avitech GmbH
> Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany 
> Court Registration: Amtsgericht Ulm | HRB 728293 
> Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza 
> http://avitech.aero
>
> This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
> -----Ursprüngliche Nachricht-----
> Von: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> Gesendet: Dienstag, 15. Dezember 2015 21:53
> An: users@qpid.apache.org
> Betreff: Re: Java broker / AMQP 1.0 / dynamic creation of queues
>
> Hi Julien,
>
> I've made a first pass at an implementation of a similar policy based approach for the Java Broker.  The details are in QPID-6954 ( https://issues.apache.org/jira/browse/QPID-6954), and the code is committed against the trunk in the subversion repo ( https://svn.apache.org/repos/asf/qpid/java/trunk/).
>
> It allows for creating queues or exchanges on the publishing of a message (or the establishment of an incoming link to an address), and the creating of queues (but not currently exchanges) on the establishment of an outgoing link (a consumer) for an address.  There is no way to auto-create bindings currently.
>
> If you get a chance to try it out, let me know if it is works for you.
>
> Cheers,
> Rob
>
> On 15 December 2015 at 09:25, Gordon Sim <gs...@redhat.com> wrote:
>
>> On 12/14/2015 06:27 PM, Rob Godfrey wrote:
>>
>>> The other approach (which I believe is available in the C++ broker) 
>>> is to define some namespace / pattern for which queues of some kind 
>>> are automagically created when referenced.  We could implement 
>>> something similar in the Java Broker, though there's a lot of 
>>> configuration that goes along with a queue, and I'm not sure of the 
>>> best way of specifying what
>>> *sort*  of queue should be created.
>>>
>>
>> The way the c++ broker does this is that it allows 'policies' to be 
>> associated with some naming pattern. The policy can include various 
>> aspects of the queue configuration (e.g. maximum depth, durability, 
>> last-value semantics etc) that are then applied to any queue created 
>> as a result of matching that naming pattern.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Robbie Gemmell <ro...@gmail.com>.
Did you have Rob's latest commit (r1720340) from a few hours ago? It
seems some other changes had impacted on the brokers AMQP 1.0 support
on trunk. I havent tried it against the current trunk, but I did run
that example against the recent 6.0.0 release earlier while testing
something else and it was happy then.

Robbie

On 16 December 2015 at 14:24, Julien Charon <Ju...@avitech.aero> wrote:
>   Hi Rob,
>
>
> Thank you very much for the implementation. I just tested it with a very similar configuration as described in QPID-6954 (merely modified the pattern) and it seems to work pretty well.
> However, I noticed 2 things:
> 1. After a broker restart, an automatically created queue has disappeared, no matter whether the nodeAutoCreationPolicies configuration is defined as durable or not. When I create a durable queue manually with the web management interface I can directly see it in the json configuration. This is not the case for automatically created ones. Maybe there's a store operation missing or something like that?
> 2. I'm not sure if this is related to the change you've made, I doubt it to be honest but I'd like to mention it anyway. I used to test / play with the java broker with the help of the qpid-jms-examples (https://github.com/apache/qpid-jms/tree/master/qpid-jms-examples) HelloWorld class which is very similar to the Hello class in the qpid-client-examples that can be found on SVN. However, while the example used to work fine with the java broker 0.32, I now get a ClassCastException because the consumer receives a javax.jms.BytesMessage (with no content) instead of a javax.jms.TextMessage.
>
>
> Best regards,
>
> Julien
>
> Avitech GmbH
> Engineering AxL
> Tel.: +49 (0)7541/282-177
> Fax: +49 (0)7541/282-199
> e-mail: julien.charon@avitech.aero
> ________________________________________________
> Avitech GmbH
> Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
> Court Registration: Amtsgericht Ulm | HRB 728293
> Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
> http://avitech.aero
>
> This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
> -----Ursprüngliche Nachricht-----
> Von: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> Gesendet: Dienstag, 15. Dezember 2015 21:53
> An: users@qpid.apache.org
> Betreff: Re: Java broker / AMQP 1.0 / dynamic creation of queues
>
> Hi Julien,
>
> I've made a first pass at an implementation of a similar policy based approach for the Java Broker.  The details are in QPID-6954 ( https://issues.apache.org/jira/browse/QPID-6954), and the code is committed against the trunk in the subversion repo ( https://svn.apache.org/repos/asf/qpid/java/trunk/).
>
> It allows for creating queues or exchanges on the publishing of a message (or the establishment of an incoming link to an address), and the creating of queues (but not currently exchanges) on the establishment of an outgoing link (a consumer) for an address.  There is no way to auto-create bindings currently.
>
> If you get a chance to try it out, let me know if it is works for you.
>
> Cheers,
> Rob
>
> On 15 December 2015 at 09:25, Gordon Sim <gs...@redhat.com> wrote:
>
>> On 12/14/2015 06:27 PM, Rob Godfrey wrote:
>>
>>> The other approach (which I believe is available in the C++ broker)
>>> is to define some namespace / pattern for which queues of some kind
>>> are automagically created when referenced.  We could implement
>>> something similar in the Java Broker, though there's a lot of
>>> configuration that goes along with a queue, and I'm not sure of the
>>> best way of specifying what
>>> *sort*  of queue should be created.
>>>
>>
>> The way the c++ broker does this is that it allows 'policies' to be
>> associated with some naming pattern. The policy can include various
>> aspects of the queue configuration (e.g. maximum depth, durability,
>> last-value semantics etc) that are then applied to any queue created
>> as a result of matching that naming pattern.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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


AW: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Julien Charon <Ju...@avitech.aero>.
  Hi Rob,


Thank you very much for the implementation. I just tested it with a very similar configuration as described in QPID-6954 (merely modified the pattern) and it seems to work pretty well.
However, I noticed 2 things:
1. After a broker restart, an automatically created queue has disappeared, no matter whether the nodeAutoCreationPolicies configuration is defined as durable or not. When I create a durable queue manually with the web management interface I can directly see it in the json configuration. This is not the case for automatically created ones. Maybe there's a store operation missing or something like that?
2. I'm not sure if this is related to the change you've made, I doubt it to be honest but I'd like to mention it anyway. I used to test / play with the java broker with the help of the qpid-jms-examples (https://github.com/apache/qpid-jms/tree/master/qpid-jms-examples) HelloWorld class which is very similar to the Hello class in the qpid-client-examples that can be found on SVN. However, while the example used to work fine with the java broker 0.32, I now get a ClassCastException because the consumer receives a javax.jms.BytesMessage (with no content) instead of a javax.jms.TextMessage. 


Best regards,
 
Julien 

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: julien.charon@avitech.aero
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero

This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
-----Ursprüngliche Nachricht-----
Von: Rob Godfrey [mailto:rob.j.godfrey@gmail.com] 
Gesendet: Dienstag, 15. Dezember 2015 21:53
An: users@qpid.apache.org
Betreff: Re: Java broker / AMQP 1.0 / dynamic creation of queues

Hi Julien,

I've made a first pass at an implementation of a similar policy based approach for the Java Broker.  The details are in QPID-6954 ( https://issues.apache.org/jira/browse/QPID-6954), and the code is committed against the trunk in the subversion repo ( https://svn.apache.org/repos/asf/qpid/java/trunk/).

It allows for creating queues or exchanges on the publishing of a message (or the establishment of an incoming link to an address), and the creating of queues (but not currently exchanges) on the establishment of an outgoing link (a consumer) for an address.  There is no way to auto-create bindings currently.

If you get a chance to try it out, let me know if it is works for you.

Cheers,
Rob

On 15 December 2015 at 09:25, Gordon Sim <gs...@redhat.com> wrote:

> On 12/14/2015 06:27 PM, Rob Godfrey wrote:
>
>> The other approach (which I believe is available in the C++ broker) 
>> is to define some namespace / pattern for which queues of some kind 
>> are automagically created when referenced.  We could implement 
>> something similar in the Java Broker, though there's a lot of 
>> configuration that goes along with a queue, and I'm not sure of the 
>> best way of specifying what
>> *sort*  of queue should be created.
>>
>
> The way the c++ broker does this is that it allows 'policies' to be 
> associated with some naming pattern. The policy can include various 
> aspects of the queue configuration (e.g. maximum depth, durability, 
> last-value semantics etc) that are then applied to any queue created 
> as a result of matching that naming pattern.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For 
> additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Rob Godfrey <ro...@gmail.com>.
Hi Julien,

I've made a first pass at an implementation of a similar policy based
approach for the Java Broker.  The details are in QPID-6954 (
https://issues.apache.org/jira/browse/QPID-6954), and the code is committed
against the trunk in the subversion repo (
https://svn.apache.org/repos/asf/qpid/java/trunk/).

It allows for creating queues or exchanges on the publishing of a message
(or the establishment of an incoming link to an address), and the creating
of queues (but not currently exchanges) on the establishment of an outgoing
link (a consumer) for an address.  There is no way to auto-create bindings
currently.

If you get a chance to try it out, let me know if it is works for you.

Cheers,
Rob

On 15 December 2015 at 09:25, Gordon Sim <gs...@redhat.com> wrote:

> On 12/14/2015 06:27 PM, Rob Godfrey wrote:
>
>> The other approach (which I believe is available in the C++ broker) is to
>> define some namespace / pattern for which queues of some kind are
>> automagically created when referenced.  We could implement something
>> similar in the Java Broker, though there's a lot of configuration that
>> goes
>> along with a queue, and I'm not sure of the best way of specifying what
>> *sort*  of queue should be created.
>>
>
> The way the c++ broker does this is that it allows 'policies' to be
> associated with some naming pattern. The policy can include various aspects
> of the queue configuration (e.g. maximum depth, durability, last-value
> semantics etc) that are then applied to any queue created as a result of
> matching that naming pattern.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Gordon Sim <gs...@redhat.com>.
On 12/14/2015 06:27 PM, Rob Godfrey wrote:
> The other approach (which I believe is available in the C++ broker) is to
> define some namespace / pattern for which queues of some kind are
> automagically created when referenced.  We could implement something
> similar in the Java Broker, though there's a lot of configuration that goes
> along with a queue, and I'm not sure of the best way of specifying what
> *sort*  of queue should be created.

The way the c++ broker does this is that it allows 'policies' to be 
associated with some naming pattern. The policy can include various 
aspects of the queue configuration (e.g. maximum depth, durability, 
last-value semantics etc) that are then applied to any queue created as 
a result of matching that naming pattern.


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


Re: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Rob Godfrey <ro...@gmail.com>.
As Olivier states, there's currently no (AMQP) standard way of doing it.
Early in the new year I hope to get back to implementing the latest draft
of the AMQP management spec in the Java Broker, in practice this will look
very much like exposing the same API as REST except rather than making HTTP
calls and receiving responses, you'll be sending messages ad receiving
replies over standard AMQP links on AMQP sessions on AMQP connections.

The other approach (which I believe is available in the C++ broker) is to
define some namespace / pattern for which queues of some kind are
automagically created when referenced.  We could implement something
similar in the Java Broker, though there's a lot of configuration that goes
along with a queue, and I'm not sure of the best way of specifying what
*sort* of queue should be created.

Finally, getting back to your use case  you say you want a queue "for some
publish/subscribe scenario"... so are you really talking about a FIFO
queue, or a more topic like entity?  What sort of durability requirements
do you have here... if there are no consumers on your "topic" are you
expecting the messages to be retained or dropped...

-- Rob

On 14 December 2015 at 18:19, Olivier Mallassi <ol...@gmail.com>
wrote:

> As fas as I undestood, you cannot.
>
>
> Robbie Gemmell gave an answer here
>
> http://qpid.2158936.n2.nabble.com/JMS-AMQP-1-0-link-definition-and-guarantee-delivery-td7634939.html
>
>
> "The core AMQP 1.0 protocol has no built in facility to explicitly
> create name queues etc (except 'dynamic' nodes, e.g temporary queues,
> anmed by the broker) in the way that prior AMQP 0-x protocols did, as
> it instead concentrated on getting messages from A to B rather than
> defining an explicit broker model that must be implemented. There is
> an effort at the OASIS AMQP TC to define a layered AMQP Management
> specification that uses AMQP messaging to support implementing such
> management operations (and many others). "
>
>
>
> On Mon, Dec 14, 2015 at 2:26 PM, Julien Charon <Julien.Charon@avitech.aero
> >
> wrote:
>
> >   Hi,
> >
> >
> > I'd like to know if it's possible to dynamically / automatically have
> > queues created using AMQP 1.0 and the java broker. I'd like to avoid to
> use
> > the REST or JMX interface to create queues manually before a client can
> > make a connection. I need this for some publish/subscribe scenario.
> > Any advice would be appreciated.
> >
> >
> > Best regards,
> > Julien
> >
> > Avitech GmbH
> > Engineering AxL
> > Tel.: +49 (0)7541/282-177
> > Fax: +49 (0)7541/282-199
> > e-mail: julien.charon@avitech.aero<ma...@avitech.aero>
> > ________________________________________________
> > Avitech GmbH
> > Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
> > Court Registration: Amtsgericht Ulm | HRB 728293
> > Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
> > http://avitech.aero<http://avitech.aero/>
> >
> > This message may contain confidential information and is intended only
> for
> > the individual named. If you are not the named addressee you should not
> > disseminate, distribute or copy this e-mail. Please notify the sender
> > immediately by e-mail if you have received this e-mail by mistake and
> > delete this e-mail from your system.
> >
> >
>

Re: Java broker / AMQP 1.0 / dynamic creation of queues

Posted by Olivier Mallassi <ol...@gmail.com>.
As fas as I undestood, you cannot.


Robbie Gemmell gave an answer here
http://qpid.2158936.n2.nabble.com/JMS-AMQP-1-0-link-definition-and-guarantee-delivery-td7634939.html


"The core AMQP 1.0 protocol has no built in facility to explicitly
create name queues etc (except 'dynamic' nodes, e.g temporary queues,
anmed by the broker) in the way that prior AMQP 0-x protocols did, as
it instead concentrated on getting messages from A to B rather than
defining an explicit broker model that must be implemented. There is
an effort at the OASIS AMQP TC to define a layered AMQP Management
specification that uses AMQP messaging to support implementing such
management operations (and many others). "



On Mon, Dec 14, 2015 at 2:26 PM, Julien Charon <Ju...@avitech.aero>
wrote:

>   Hi,
>
>
> I'd like to know if it's possible to dynamically / automatically have
> queues created using AMQP 1.0 and the java broker. I'd like to avoid to use
> the REST or JMX interface to create queues manually before a client can
> make a connection. I need this for some publish/subscribe scenario.
> Any advice would be appreciated.
>
>
> Best regards,
> Julien
>
> Avitech GmbH
> Engineering AxL
> Tel.: +49 (0)7541/282-177
> Fax: +49 (0)7541/282-199
> e-mail: julien.charon@avitech.aero<ma...@avitech.aero>
> ________________________________________________
> Avitech GmbH
> Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
> Court Registration: Amtsgericht Ulm | HRB 728293
> Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
> http://avitech.aero<http://avitech.aero/>
>
> This message may contain confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system.
>
>