qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Blocking request call using request-response_client example
Date Wed, 02 Jun 2010 15:03:41 GMT
On 06/02/2010 01:24 AM, usman.ch wrote:
> Based on the  request/response  client and server  examples , I want to
> modify the client in way that it send a request and wait for the reply
> before sending next request. Want to implement blocking mechanism.
> subscriptions.run(); blocks for the entire subscription and calling
> subscription.stop() in received() method of the listner to resume the main
> application results in queue deletion.  Could anyone please guide me in this
> regard as what function should I call to make client  blocking till it
> received the response from server.

If you're using the new messaging API, which is recommended if you're using the 
latest version, there is a synchronous request/respose example in 

If you're stuck on the old API you can create a client::LocalQueue and subscribe 
that instead of a MessageListener. The LocalQueue has methods for getting 
messages one at a time from the queue.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message