You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2011/10/05 09:32:22 UTC

Re: two set of APIs, which one to use?

On 09/30/2011 01:59 PM, Gang, Litao wrote:
> I am doing the asynchronous mechanism, i.e. when a message arrives,
> a callback automatically gets called. How can you do that with the messaging API?
> I don't want to initiate a call to fetch a messages.  This I don't know exactly how to do.

At this point there is nothing built-in to do that. However it is pretty 
easy to do so yourself, though again at present you need a thread per 
session (as with the old qpid::client API). Just as an example of this 
I've attached some simple sample code of what you could do.

I anticipate adding more in this area as time allows. There is a JIRA 
open, with a very early and raw patch for review, that addresses the 
thread-per-session requirement: 
https://issues.apache.org/jira/browse/QPID-3460. Once that work 
completes I imagine a standard, built in framework for dispatching will 
be next.