Hi Xavier,

xavier wrote
> I posted my solution, it works, but I did some performance test, and it's
> not very good, I found why. In my solution, I start, and stop for any
> receiver the messenger, because if I don't do this, with my code (posted)
> I receive one time, the message with a filter (attached to the link) but
> for the second message, (I change the filter before) I don't receive the
> message.
> 
> I have not the competency on the engine, so I am lost how do this without
> start and stop messenger on each reception

So the behaviour you are seeing is because for the AMQP 1.0 protocol your
selector filter is set on the Link at attachment time, and I don't believe
there is any action that allows you to modify a filter once the link has
been established.

Theoretically, rather than doing a full pn_messenger_stop +
pn_messenger_start, you should be able to just do a pn_link_detach(link); /*
modify the filter */ ; pn_link_open(link); and that might give you
*slightly* better  performance. But I think if you are going to be doing
this on a per-message basis then you would be better of receiving all
messages on the Link and just accepting those that you are interested in via
correl id 



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617293.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.

Reply via email to