You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "zhaoyi0113@gmail.com" <zh...@gmail.com> on 2010/09/25 08:48:12 UTC

What is the different between qpid/client/Session.h and qpid/messaging/Session.h

I see there are some examples in qpidc-0.6. Some examples use the API in
qpid/client while some examples use qpid/messaging. I wander what the
different between them.
-- 
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/What-is-the-different-between-qpid-client-Session-h-and-qpid-messaging-Session-h-tp5569296p5569296.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: What is the different between qpid/client/Session.h and qpid/messaging/Session.h

Posted by Gordon Sim <gs...@redhat.com>.
On 09/25/2010 09:52 AM, Robin Palotai wrote:
>  From what I can see this far, qpid::client is a low-level API directly
> using AMQP style, while qpid::messaging is a higher level API which
> tries to hide AMQP. Some of the differences I found (maybe not right,
> but don't have any better):
> - messaging uses terms "queue" and "topic", where "topic" is not a topic
> exchange, but these are used as in Java JMS
> - messaging therefore has to translate there terms to AMQP terms, which
> could be fine-tuned using address strings, but these are not too
> documented as I can see
> - messaging has a nicer receiver API, and has non-blocking
> Receiver.fetch() for retrieving messages. Maybe it uses a separate
> thread, but that is not apparent from the docs. Also, when I try to
> support it with a timeout, it never returns.
> - client is more straight-forward, you can use the well-known AMQP style
> methods to declare exchanges, queues, bindings.
> - with client, I'm not sure if non-blocking message polling is possible,
> maybe you need a custom thread for that.
> (above refers to C++ API)
>
> QPID seems to be in active development, maybe that is why documentation
> seems to be lagging behind what actually is available. Possibly using
> the client API is on the safer side right now.

Yes, Qpid is certainly in active development, and to date users have 
only had the client API.

The creation of the messaging API was undertaken for a few reasons which 
might be useful to enumerate here.

Though some aspects of the older, AMQP 0-10 specific APIs were 
straight-forward, the details depended on a fairly complete knowledge of 
the protocol. There were common tasks that we tried to expose more 
simply through utilities but the abstraction was not complete and still 
ended up requiring a lot of detailed knowledge. (In c++ for example the 
SubscriptionSettings seemed to causes a lot of confusion; in python the 
details of acknowledgement in general came up often in questions).

The messaging API aimed to manage the details of the protocol required 
for particular messaging interactions and also to provide consistency 
across languages which had been missing.

It was also explicitly intended to be independent of any specific 
protocol version, preventing details of a specific protocol version from 
becoming baked into applications and thus allowing easy transition to 
later versions.

The higher level abstraction also made it possible to more seamlessly 
include richer features such as the automatic reconnection and message 
replay.

In c++, it was also intended to be implemented such that we could have a 
stable ABI as well (again something that was harder with the old API).

This API is now stable on trunk and would be my recommended approach 
from the next release (end of October) onwards.

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


RE: What is the different between qpid/client/Session.h and qpid/messaging/Session.h

Posted by Steve Huston <sh...@riverace.com>.
Hi Robin,

Yes, you nailed every point. All help to improve the documentation area
would be very welcomed!

-Steve

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


> -----Original Message-----
> From: Robin Palotai [mailto:palotai.robin@gmail.com] 
> Sent: Saturday, September 25, 2010 4:53 AM
> To: users@qpid.apache.org
> Subject: Re: What is the different between 
> qpid/client/Session.h and qpid/messaging/Session.h
> 
> 
>   From what I can see this far, qpid::client is a low-level 
> API directly 
> using AMQP style, while qpid::messaging is a higher level API which 
> tries to hide AMQP. Some of the differences I found (maybe not right, 
> but don't have any better):
> - messaging uses terms "queue" and "topic", where "topic" is 
> not a topic 
> exchange, but these are used as in Java JMS
> - messaging therefore has to translate there terms to AMQP 
> terms, which 
> could be fine-tuned using address strings, but these are not too 
> documented as I can see
> - messaging has a nicer receiver API, and has non-blocking 
> Receiver.fetch() for retrieving messages. Maybe it uses a separate 
> thread, but that is not apparent from the docs. Also, when I try to 
> support it with a timeout, it never returns.
> - client is more straight-forward, you can use the well-known 
> AMQP style 
> methods to declare exchanges, queues, bindings.
> - with client, I'm not sure if non-blocking message polling 
> is possible, 
> maybe you need a custom thread for that.
> (above refers to C++ API)
> 
> QPID seems to be in active development, maybe that is why 
> documentation 
> seems to be lagging behind what actually is available. Possibly using 
> the client API is on the safer side right now.
> 
> Robin
> 
> 2010.09.25. 8:48 keltezéssel, zhaoyi0113@gmail.com írta:
> > I see there are some examples in qpidc-0.6. Some examples 
> use the API 
> > in qpid/client while some examples use qpid/messaging. I 
> wander what 
> > the different between them.
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 
> 


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


Re: What is the different between qpid/client/Session.h and qpid/messaging/Session.h

Posted by Robin Palotai <pa...@gmail.com>.
  From what I can see this far, qpid::client is a low-level API directly 
using AMQP style, while qpid::messaging is a higher level API which 
tries to hide AMQP. Some of the differences I found (maybe not right, 
but don't have any better):
- messaging uses terms "queue" and "topic", where "topic" is not a topic 
exchange, but these are used as in Java JMS
- messaging therefore has to translate there terms to AMQP terms, which 
could be fine-tuned using address strings, but these are not too 
documented as I can see
- messaging has a nicer receiver API, and has non-blocking 
Receiver.fetch() for retrieving messages. Maybe it uses a separate 
thread, but that is not apparent from the docs. Also, when I try to 
support it with a timeout, it never returns.
- client is more straight-forward, you can use the well-known AMQP style 
methods to declare exchanges, queues, bindings.
- with client, I'm not sure if non-blocking message polling is possible, 
maybe you need a custom thread for that.
(above refers to C++ API)

QPID seems to be in active development, maybe that is why documentation 
seems to be lagging behind what actually is available. Possibly using 
the client API is on the safer side right now.

Robin

2010.09.25. 8:48 keltezéssel, zhaoyi0113@gmail.com írta:
> I see there are some examples in qpidc-0.6. Some examples use the API in
> qpid/client while some examples use qpid/messaging. I wander what the
> different between them.


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


RE: What is the different between qpid/client/Session.h and qpid/messaging/Session.h

Posted by Steve Huston <sh...@riverace.com>.
Please see Robin's reply to a similar question on this list.

--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com


> -----Original Message-----
> From: zhaoyi0113@gmail.com [mailto:zhaoyi0113@gmail.com] 
> Sent: Saturday, September 25, 2010 2:48 AM
> To: users@qpid.apache.org
> Subject: What is the different between qpid/client/Session.h 
> and qpid/messaging/Session.h
> 
> 
> 
> I see there are some examples in qpidc-0.6. Some examples use 
> the API in qpid/client while some examples use 
> qpid/messaging. I wander what the different between them.
> -- 
> View this message in context: 
> http://apache-qpid-users.2158936.n2.nabble.com/What-is-the-dif
ferent-between-qpid-client-Session-h-and-qpid-messaging-Session-h-tp5569
296p5569296.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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



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