Martin,

Don't forget to set the capacity on the receiver (receiver.setCapacity(50)) as the session.NextReceiver() method only works with pre-fetched messages.

This caught me out when I first started using session.NextReceiver().

Clive
Yes, the qpid::client API has been deprecated and the qpid::messaging API is 
the preferred one to use going forward.

You can use qpid::messaging::Session::nextReceiver() to handle receiving 
messages from multiple queues in a single thread.  nextReceiver() will return a 
Receiver that has available messages (if one exists).

Andy

On Nov 29, 2011, at 10:52 AM, MartiN Beneš wrote:

Hello,
I have a mess in the c++ APIs.
Is it correct, that the qpid::client is deprecated in favor of
qpid::messaging api?

If so, is there some equivalent of
qpid::client::MessageListener::received() function, which is being called
by the API on message arrival, or do i have to poll for the messages using
qpid::messaging::Receiver::fetch() , thus forcing me to create one thread
for every queue i am processing?

regards,
martin

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]




---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to