On Wed, May 11, 2011 at 10:15:27AM -0400, Ken Giusti wrote:
> Hi Angus,
> 
> Agreed, the doxygen comments are lacking.  I've created a jira to address 
> that:
> 
> https://issues.apache.org/jira/browse/QPID-3257

That will help, thanks.

> 
> The method call model is a request-response pattern that really only provides 
> for a single response to the request.  As you suggested, you can use events 
> to augment that pattern.   Specifically, the agent may start issuing events 
> in response to the method call, either before or after the response is sent.  
> Depending on your needs, you could have the equivalent of a "Start 
> Events"/"Stop Events" method pair, or hold off the response until all events 
> are doing being generated.
> 
> One minor point - the correlation id that is returned to the client is 
> guaranteed to be unique only for the method call/response period.  Once the 
> response is received, that id _may_ be recycled for future requests (very 
> unlikely, but I wouldn't recommend counting on it).  So I would suggest that 
> your method call take a unique identifier that your application provides.  
> All events that correlate to that method call could contain that identifier, 
> so you don't rely on having the correlation id be unique over the lifetime of 
> your application.
> 
> Does that make sense?

Yes, thank you for your help.

> 
> thanks,
> 
> -K
> 
> ----- Original Message -----
> > On Fri, May 06, 2011 at 01:48:08PM -0400, Ken Giusti wrote:
> > > Apologies for not getting back to you sooner...
> > >
> > > callMethodAsync() returns a unique 32 bit correlation id that
> > > corresponds to the request. The ConsoleEvent that contains the
> > > method response has a getCorrelator() method which returns the
> > > correlation id that will match the value returned by the initiating
> > > callMethodAsync().
> > >
> > Cool, thanks. The function could do with a doxygen comment. I assumed
> > it
> > was an error status.
> > 
> > Another question, can you send multiple responses for one request?
> > Or would these need to be events?
> > 
> > 
> > Thanks for the help.
> > 
> > -Angus
> > 
> > >
> > >
> > > -K
> > >
> > > ----- Original Message -----
> > > > Hi
> > > >
> > > > We are trying to do multiple async requests on a single qmf
> > > > function.
> > > > Then we need to match the response to the request in the
> > > > ConsoleEvent
> > > > handler. Now we could add an In-Out parameter but it seems like
> > > > this
> > > > is something that should be handled by QMF. Since if you had a QMF
> > > > function that you were calling with callMethod() then you changed
> > > > to callMethodAsync() you would not have this IO parameter.
> > > >
> > > > Now if the server processes these in a non serial way (like we
> > > > intend
> > > > doing)
> > > > the responses will comeback out of order and we will have no way
> > > > of knowing which request the response was for.
> > > >
> > > > Is there a way to do this currently?
> > > >
> > > > Regards
> > > > Angus Salkeld
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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]
> > 
> > ---------------------------------------------------------------------
> > 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]

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

Reply via email to