On 09/29/2011 04:54 PM, Gang, Litao wrote:
I have a general question on the qpid API.  In the examples provided
with releases, there are old_api and messaging folders.  The former
uses qpid::client APIs for message and message operations  while the
latter support sender/Receiver patterns, closer to the java JMS
interface.  Currently oldApi is still needed for pub/sub usage.  Can
anybody shed some lights on which APIs should be used?   Is it likely
that the qpid::client APIs get retired in the future (named old, so
not encouraged to use)?  I am asking because we want to cut the
future upgrade work to the minimum.

The recommended API is qpid::messaging.

The qpid::client API is tied to version 0-10 of AMQP and the level abstraction make it harder to offer some valuable functionality (automatic reply of messages for example) in a transparent manner.

The qpid::messaging API is designed to be protocol version agnostic, meaning you will be able to transition in a straightforward manner to AMQP 1.0 (the final version of which has now been published).

It is certainly possible to do pub-sub with the qpid::messaging API. All you generally need to do is use an exchange name with an optional subject as the address for senders/receivers.

For example, I can create a topic exchange named my-exchange, then create a receiver using e.g. my-exchange/my-subject, then a sender with my-exchange/mysubject and messages from the latter will reach all matching receivers.

You can read more about using the messaging API at http://qpid.apache.org/books/0.12/Programming-In-Apache-Qpid/html/.

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

Reply via email to