Nithesh Shetty wrote:
hi,
I have implemented a reader class to asynchronously received msg from the broker.
For that i have derived from MessageListener and implemented the receive
function.
to start recived i have called subscriptionManager run function but
the control of the program doesn't return from the run function unless we call cancel
in the receive function .
I want the control to return from run. is there any way to do that
The purpose of SubscriptionManager::run() is to dispatch incoming
messages to registered listeners which is why it does not return.
If you wish to have the dispatching done on a separate thread (created
by the qpidc library) you can use SubscriptionManager::start() (don't
forget to call SubscriptionManager::wait() before exiting).
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]