You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Andreas Welchlin <an...@welchlin.de> on 2015/03/05 09:13:49 UTC

qpid 0.28 messaging api: Use Message Selectors with ActiveMQ

Hello,

I am using the qpid 0.28 messaging api to connect to an ActiveMQ message 
broker at a third party. The protocol is AMQP 1.0.

This post describes exactly what I need:

http://mail-archives.apache.org/mod_mbox/qpid-users/201502.mbox/%3CCAFitrpSud4uUqg8e6yJgFz1bNxYTVoPHP6G43no-xbsM5W+aDg@mail.gmail.com%3E


But for some reason it does not work. When I use the filter I get no 
response but also I get no error.


I created an address using the following properties:

topicname; {assert: always, link:{filter:{name:jms-selector, 
descriptor:'apache.org:selector-filter:string', 
value:'uniqueAppID=ttt_1425468013373341'}}}


I know that the unique AppID is in the response messages of ActiveMQ 
because I can see them when I use no filter.

Is there anyone who can imagine what I am doing wrong?

Regards,
Andreas



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


Re: qpid 0.28 messaging api: Use Message Selectors with ActiveMQ

Posted by Andreas Welchlin <an...@posteo.de>.
That is perfectly right. I tested it and it works. Excellent.

Thank you!

Andreas



Am 05.03.2015 um 13:59 schrieb Gordon Sim:
> On 03/05/2015 12:50 PM, Andreas Welchlin wrote:
>> Hi Rob,
>>
>> thank you for your answer.
>>
>> I moved the quote and tried this:
>>
>> topicname; {assert: always, link:{filter:{name:jms-selector,
>> descriptor:'apache.org:selector-filter:string',
>> value:uniqueAppID='ttt_1425558106109604'}}}
>
>
> Try:
>
> topicname; {assert: always, link:{filter:{name:jms-selector, 
> descriptor:'apache.org:selector-filter:string', 
> value:\"uniqueAppID='ttt_1425558106109604'\"}}}
>
>
>> But then I got an exception:
>>
>> Unmatched '{'!, character 132 of topicname12345; {assert: always,
>> link:{filter:{name:jms-selector,
>> descriptor:'apache.org:selector-filter:string',
>> value:uniqueAppID='ttttt_1425558106109604'}}}
>>
>> Regards,
>> Andreas
>>
>>
>> Am 05.03.2015 um 10:52 schrieb Rob Godfrey:
>>> Hi Andreas,
>>>
>>> looking at your selector, it reads
>>>
>>> uniqueAppID=ttt_1425468013373341
>>>
>>> whereas the correct syntax for comparing an attribute to a string
>>> would be
>>>
>>> uniqueAppID='ttt_1425468013373341'
>>>
>>> i.e. the value you are comparing to needs to be (single) quoted.  As
>>> is it
>>> would be looking for messages where the value of the uniqueAppID
>>> attribute
>>> is the same as the value of the (presumably not present)
>>> ttt_1425468013373341
>>> attribute
>>>
>>> I'm not familiar enough with the C++ messaging API / addressing to
>>> know the
>>> syntax for nested quotes/escaping... perhaps someone else can help 
>>> there.
>>>
>>> Hope this helps,
>>> Rob
>>>
>>>
>>> On 5 March 2015 at 09:13, Andreas Welchlin <an...@welchlin.de> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am using the qpid 0.28 messaging api to connect to an ActiveMQ 
>>>> message
>>>> broker at a third party. The protocol is AMQP 1.0.
>>>>
>>>> This post describes exactly what I need:
>>>>
>>>> http://mail-archives.apache.org/mod_mbox/qpid-users/201502.mbox/%
>>>> 3CCAFitrpSud4uUqg8e6yJgFz1bNxYTVoPHP6G43no-xbsM5W+aDg@mail.gmail.com%3E 
>>>>
>>>>
>>>>
>>>> But for some reason it does not work. When I use the filter I get no
>>>> response but also I get no error.
>>>>
>>>>
>>>> I created an address using the following properties:
>>>>
>>>> topicname; {assert: always, link:{filter:{name:jms-selector,
>>>> descriptor:'apache.org:selector-filter:string', 
>>>> value:'uniqueAppID=ttt_
>>>> 1425468013373341'}}}
>>>>
>>>>
>>>> I know that the unique AppID is in the response messages of ActiveMQ
>>>> because I can see them when I use no filter.
>>>>
>>>> Is there anyone who can imagine what I am doing wrong?
>>>>
>>>> Regards,
>>>> Andreas
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>
>
> ---------------------------------------------------------------------
> 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: qpid 0.28 messaging api: Use Message Selectors with ActiveMQ

Posted by Gordon Sim <gs...@redhat.com>.
On 03/05/2015 12:50 PM, Andreas Welchlin wrote:
> Hi Rob,
>
> thank you for your answer.
>
> I moved the quote and tried this:
>
> topicname; {assert: always, link:{filter:{name:jms-selector,
> descriptor:'apache.org:selector-filter:string',
> value:uniqueAppID='ttt_1425558106109604'}}}


Try:

topicname; {assert: always, link:{filter:{name:jms-selector, 
descriptor:'apache.org:selector-filter:string', 
value:\"uniqueAppID='ttt_1425558106109604'\"}}}


> But then I got an exception:
>
> Unmatched '{'!, character 132 of topicname12345; {assert: always,
> link:{filter:{name:jms-selector,
> descriptor:'apache.org:selector-filter:string',
> value:uniqueAppID='ttttt_1425558106109604'}}}
>
> Regards,
> Andreas
>
>
> Am 05.03.2015 um 10:52 schrieb Rob Godfrey:
>> Hi Andreas,
>>
>> looking at your selector, it reads
>>
>> uniqueAppID=ttt_1425468013373341
>>
>> whereas the correct syntax for comparing an attribute to a string
>> would be
>>
>> uniqueAppID='ttt_1425468013373341'
>>
>> i.e. the value you are comparing to needs to be (single) quoted.  As
>> is it
>> would be looking for messages where the value of the uniqueAppID
>> attribute
>> is the same as the value of the (presumably not present)
>> ttt_1425468013373341
>> attribute
>>
>> I'm not familiar enough with the C++ messaging API / addressing to
>> know the
>> syntax for nested quotes/escaping... perhaps someone else can help there.
>>
>> Hope this helps,
>> Rob
>>
>>
>> On 5 March 2015 at 09:13, Andreas Welchlin <an...@welchlin.de> wrote:
>>
>>> Hello,
>>>
>>> I am using the qpid 0.28 messaging api to connect to an ActiveMQ message
>>> broker at a third party. The protocol is AMQP 1.0.
>>>
>>> This post describes exactly what I need:
>>>
>>> http://mail-archives.apache.org/mod_mbox/qpid-users/201502.mbox/%
>>> 3CCAFitrpSud4uUqg8e6yJgFz1bNxYTVoPHP6G43no-xbsM5W+aDg@mail.gmail.com%3E
>>>
>>>
>>> But for some reason it does not work. When I use the filter I get no
>>> response but also I get no error.
>>>
>>>
>>> I created an address using the following properties:
>>>
>>> topicname; {assert: always, link:{filter:{name:jms-selector,
>>> descriptor:'apache.org:selector-filter:string', value:'uniqueAppID=ttt_
>>> 1425468013373341'}}}
>>>
>>>
>>> I know that the unique AppID is in the response messages of ActiveMQ
>>> because I can see them when I use no filter.
>>>
>>> Is there anyone who can imagine what I am doing wrong?
>>>
>>> Regards,
>>> Andreas
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>


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


Re: qpid 0.28 messaging api: Use Message Selectors with ActiveMQ

Posted by Andreas Welchlin <an...@posteo.de>.
Hi Rob,

thank you for your answer.

I moved the quote and tried this:

topicname; {assert: always, link:{filter:{name:jms-selector, 
descriptor:'apache.org:selector-filter:string', 
value:uniqueAppID='ttt_1425558106109604'}}}

But then I got an exception:

Unmatched '{'!, character 132 of topicname12345; {assert: always, 
link:{filter:{name:jms-selector, 
descriptor:'apache.org:selector-filter:string', 
value:uniqueAppID='ttttt_1425558106109604'}}}

Regards,
Andreas


Am 05.03.2015 um 10:52 schrieb Rob Godfrey:
> Hi Andreas,
>
> looking at your selector, it reads
>
> uniqueAppID=ttt_1425468013373341
>
> whereas the correct syntax for comparing an attribute to a string would be
>
> uniqueAppID='ttt_1425468013373341'
>
> i.e. the value you are comparing to needs to be (single) quoted.  As is it
> would be looking for messages where the value of the uniqueAppID attribute
> is the same as the value of the (presumably not present) ttt_1425468013373341
> attribute
>
> I'm not familiar enough with the C++ messaging API / addressing to know the
> syntax for nested quotes/escaping... perhaps someone else can help there.
>
> Hope this helps,
> Rob
>
>
> On 5 March 2015 at 09:13, Andreas Welchlin <an...@welchlin.de> wrote:
>
>> Hello,
>>
>> I am using the qpid 0.28 messaging api to connect to an ActiveMQ message
>> broker at a third party. The protocol is AMQP 1.0.
>>
>> This post describes exactly what I need:
>>
>> http://mail-archives.apache.org/mod_mbox/qpid-users/201502.mbox/%
>> 3CCAFitrpSud4uUqg8e6yJgFz1bNxYTVoPHP6G43no-xbsM5W+aDg@mail.gmail.com%3E
>>
>>
>> But for some reason it does not work. When I use the filter I get no
>> response but also I get no error.
>>
>>
>> I created an address using the following properties:
>>
>> topicname; {assert: always, link:{filter:{name:jms-selector,
>> descriptor:'apache.org:selector-filter:string', value:'uniqueAppID=ttt_
>> 1425468013373341'}}}
>>
>>
>> I know that the unique AppID is in the response messages of ActiveMQ
>> because I can see them when I use no filter.
>>
>> Is there anyone who can imagine what I am doing wrong?
>>
>> Regards,
>> Andreas
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: qpid 0.28 messaging api: Use Message Selectors with ActiveMQ

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

looking at your selector, it reads

uniqueAppID=ttt_1425468013373341

whereas the correct syntax for comparing an attribute to a string would be

uniqueAppID='ttt_1425468013373341'

i.e. the value you are comparing to needs to be (single) quoted.  As is it
would be looking for messages where the value of the uniqueAppID attribute
is the same as the value of the (presumably not present) ttt_1425468013373341
attribute

I'm not familiar enough with the C++ messaging API / addressing to know the
syntax for nested quotes/escaping... perhaps someone else can help there.

Hope this helps,
Rob


On 5 March 2015 at 09:13, Andreas Welchlin <an...@welchlin.de> wrote:

> Hello,
>
> I am using the qpid 0.28 messaging api to connect to an ActiveMQ message
> broker at a third party. The protocol is AMQP 1.0.
>
> This post describes exactly what I need:
>
> http://mail-archives.apache.org/mod_mbox/qpid-users/201502.mbox/%
> 3CCAFitrpSud4uUqg8e6yJgFz1bNxYTVoPHP6G43no-xbsM5W+aDg@mail.gmail.com%3E
>
>
> But for some reason it does not work. When I use the filter I get no
> response but also I get no error.
>
>
> I created an address using the following properties:
>
> topicname; {assert: always, link:{filter:{name:jms-selector,
> descriptor:'apache.org:selector-filter:string', value:'uniqueAppID=ttt_
> 1425468013373341'}}}
>
>
> I know that the unique AppID is in the response messages of ActiveMQ
> because I can see them when I use no filter.
>
> Is there anyone who can imagine what I am doing wrong?
>
> Regards,
> Andreas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>