qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: example selected_recv.cpp
Date Fri, 12 Jan 2018 11:44:40 GMT
On 12/01/18 08:48, Daniel Gavrila wrote:
> My environment:
> Proton v. 0.19
> C++ Broker v.1.37 configured with AMQP 1.0
>   
> I have problems with setting up correctly the example and to test it.

It appears that it does not work, due to the selector being sent as 
binary and not a string (as defined for that filter type). I have 
committed a fix.

> 1.       Do you have also a sender example that works with the selected_recv ?

No, at present there is no sender example that sets the application 
property 'colour' on which the selected_recv filters. Would be nice to 
add one.

Attached is a simple example, based on simple_send, the sets the colour 
to green on odd messages and red on even. If you run this, then 
selected_recv.py should see only the odd messages.

> 2.       Which configuration do I need to make in the broker ?

None, other than the examples queue existing or being created on demand.

> 3.       The variable “proton::codec::encoder enc” from line 44 looks like a local
variable that is never used

It is used with the << operator, and its purpose is to populate the 
filter_value variable it wraps.

> 4.       I cannot figure from documentation which is the purpose of the selector “apache.org:selector-filter:string”
.
> Why is necessary such a construct ?

The core spec does not define any specific filter syntax. The 
“apache.org:selector-filter:string” identifies an extension that uses a 
JMS selector like syntax[1]. I.e. it tells the broker/server how to 
interpret the filter value.

[1] http://www.amqp.org/specification/1.0/filters

Mime
View raw message