Hi again,

Finally found the issues I had.

1) The small things is normally what gets you :-(
2) Never ever assume that the syntax is the same for different commands
3) re-read everything until you spot what you are missing, it is there

The misstakes I made were the following

a) I assumed that the quid-config bind ... command also had a binding name
as a third argument (as add queue and add exchange does). This it did not,
instead the third argument was a pre AMQP 1.0 bindingKey, this resulted in
that there were no matches and off course no data sent to the queues

b) When I entered the password for the consumer client I made a small typo,
but even a small typo is not a good thing when we are talking about
passwords. The client FW I am using did not warn about this, it only keep on
trying and trying to connect until I stopped the application.

After fixing these two tiny tiny errors the whole application now is working
as it should.

Now it is time to see if I can make a decent WEB GUI for the demo on
Wednesday or if they will see three command line windows and printouts from
Node JS application. Maybe I should throw in a tail -f /var/log/syslog |
grep qpidd to raise the coolness of the demo?

Thanks for all the help!

SBS (Shit behind the sticks, as we say in Sweden) is most of the time the
reason for why stuff does not work. Another, and a bit nicer, quote is "Even
the sun have spots" :-) I think I take that one.

Best Regards,
Morgan



Morgan Lindqvist wrote
> Hi,
> 
> Thanks for the assistance, I however still have problems and I am not
> making any progress so here comes some more questions. Everything was
> working fine with 0.9.1 and RabbitMQ but I must be missing something vital
> when it comes moving to AMQP 1.0 and QPID.
> 
> Environment: Ubuntu 14.04. qpidd 0.34. Client based on amqp10 for Node JS
> 
> Target: Have one AMQP 1.0 node/exchange that an application writes
> messages into. Have a number of clients with one queue each that receives
> all messages that matches the filter criteria. If a message matches
> multiple criteria it shall be put in all the queues for which the filter
> matches.
> 
> I did not manage to get the filtering working so I thought I would start
> with a simple node and queue, but that failed as well.
> 
> Approach to create the nodes, queue and binding:
>   qpid-config -b admin/XXXX@127.0.0.1 add exchange direct nwEx
>   qpid-config -b admin/XXXX@127.0.0.1 add queue nwQ
>   qpid-config -b admin/XXXX@127.0.0.1 bind nwEx nwQ nwB
> 
> The Node JS code for writing contain the following lines:
>         client.createSender('nwEx'),
> ...
>         sender.send(message).then(function (state) {...)
> 
> Message is defines as follows
>         var message  = { body : 'Message body',
>                          properties: { userId: settings.username },
>                          applicationProperties: { who: 'XYZ', what: 'Yes',
> where: 'SWE', format: 'Nice' }};
> 
> 
> The Node JS code for reading is as follows:
>       client.createReceiver('nwQ')
> ...
>     receiver.on('message', function (message) {
>       console.log('msg recv');
>       curr++;
>     });
> 
> 
> Looking at the logs from qpidd I see the connections to the exchange and
> the queue, but no error messages.
> 
> The qpidd.acl is as follows
>   group admin admin@QPID
>   acl allow admin all
>   acl deny all all
> 
> This should be easy, I must be doing something fundamentally wrong, I an
> just missing it. The receiving application does not receive any data at
> all.
> 
> When this is working I need to get the filtering up and running as well.
> The queue and filter I specified for the above message and application
> properties were as follows
>     pid-config -b admin/XXXX@127.0.0.1 add queue nwQ
> --argumentqpid.filter="where='SWE'"
> 
> Here I guess that I need to identify that the "where" attribute comes from
> the applicationProperties part in the message. (see above)
> 
> I have been searching the web but not managed to find any good examples.
> Assistance is welcome.
> 
> Best Regards,
> Morgan
> Olivier Mallassi 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.lindqvist@

>>> 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
>>>
>>>
>>>
>>>
>>> --
>>> 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-unsubscribe@.apache

>>> For additional commands, e-mail: 

>> users-help@.apache

>>>
>>>





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/C-broker-How-to-create-filters-and-queues-from-the-client-tp7639889p7639989.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