On Thu, Mar 10, 2016 at 3:37 PM, Olivier Mallassi <
olivier.malla...@gmail.com> wrote:

> Hi
>
> I do not know about the JS API but
>
> 1/ AFAIK, AMQP 1.0 does not define anything regarding queue creation and
> assume queues already exist on the broker side.
> 2/ with qpid cpp,  you could be able to create the "filtered queue " with
>
>  qpid-config add exchange topic subjects
>
> qpid-config add queue mysubscription
> --argumentqpid.filter="\"amqp.correlation_id\"='abc'
> AND color='blue' AND weight > 2500"
>
>   qpid-config bind subjects mysubscription mysubject
>
>
>
> HTH.
>
> oliv/
>
> On Thu, Mar 10, 2016 at 5:03 PM, Morgan Lindqvist <
> morgan.lindqv...@ericsson.com> wrote:
>
> > Hi All,
> >
> > I was previously using AMQP 0.9.1 (RabbitMQ) and the client library
> amqplib
> > for Node JS. With these components it was easy to give the client the
> > possibility to create the queue and the bindingKey and connect it to an
> > topic-exchange.
> >
> > I now would like a client to create a queue and a filter and connect it
> to
> > an existing node using QPIDD and the Node JS library amqp10.
> >
> > So far I have not discovered any way to do this from the client.
> >
> > I have also been looking for documentation for how to create and
> describe a
> > filter (so that it works like a bindingKey for 0.9.1). I have however not
> > been successful. Or have I misunderstood how filters can be used?
> >
> > Assistance to make me move forward is highly appreciated.
> >
> > Best Regards,
> > Morgan
> >
>


Hey Morgan,

I'm one of the co-authors of node-amqp10, glad to hear you're using our
module. As Olivier correctly points out above, AMQP 1.0 itself has no
provisions for this type of broker configuration (in fact there isn't even
a concept of a broker in the spec itself, which may come as a surprise). If
you're using qpidd you basically have two options at this point: first of
all, the broker itself supposed dynamic creation of exchange and queues
(look at the documentation/help output for the daemon for this info), and
secondly you can use the "qpid management framework" (aka QMF). QMF is what
all of the command line tools (qpid-config, qpid-route, qpid-stat, etc) are
using to work with data on the broker side.

Since you're already using node, you might be interested in another module
I slapped together called `node-qmf2` (https://github.com/mbroadst/node-qmf2)
which will allow you to communicate with the broker and programmatically
configure it. Unfortunately, as is usually the case, you'll find that
documentation is quite limited but I would be more than willing to work
with you to improve that situation.

As an example implementation I also started another module called
`node-qpid-tools` (https://github.com/mbroadst/node-qpid-tools) which uses
`node-qmf2` in implementing node variants of the existing tools. In my
experience, I found the existing `qpid-route` to be incredibly slow: I had
to configure routes for 12 exchanges, and doing a full bidi route for a
single exchange with that tool could take up to a few minutes, with the
node version I could configure all 12 routes in a fraction of a second.
I've only implemented (most of) `qpid-route` there, but hopefully it gives
you a rough idea of how to use QMF with node.

Cheers,
Matt


>
> >
> >
> > --
> > View this message in context:
> >
> http://qpid.2158936.n2.nabble.com/C-broker-How-to-create-filters-and-queues-from-the-client-tp7639889.html
> > Sent from the Apache Qpid users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> > For additional commands, e-mail: users-h...@qpid.apache.org
> >
> >
>

Reply via email to