[email protected] wrote:
I know that the JMS API works for this case. But I am looking for QPID API to
solve this case. Doesn't QPID API support this?
The API you're using is the 0-10 protocol level API. It's really just
there to implement JMS over AMQP 0-10. It's not something we recommend
for general use as it is based directly on the 0-10 version of the
protocol and can't be used with AMQP 1-0.
The Messaging API available in C++ and Python would support this use
case as follows (this is presented in python for brevity):
from qpid.messaging import *
conn = Connection.establish("localhost")
ssn = conn.session()
replies = ssn.receiver("#replies; {create: always}")
snd = ssn.sender("...")
request = Message(reply_to=replies.source, content=...)
snd.send(request)
reply = replies.fetch()
Unfortunately the Messaging API isn't yet available for Java. So you'll
either need to code a blocking fetch on top of the lower level 0-10 API
or use JMS.
--Rafael
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]