You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2007/06/08 18:49:09 UTC

h

On Fri, 2007-06-08 at 11:27 -0400, Jonathan Robie wrote:
> Robert Godfrey wrote:
> > The arrival of messages from a consumer are essentially events...
> > which presumably should be handled by some sort of listener... that
> > concept doesn't occur in the API... how does the python client handle
> > it?
> 
> Python didn't used to have a listener, but it does now.
> 
> I'm attaching a working Python consumer app that shows how to use a 
> listener.
> 
> Jonathan

The python client handled consume originally by having a map of queues
named after consumers. Message for consumer "foo" goes in queue["foo"]

Adding a listener object is a recent addition and a perfect example of
how to build an AMQP API. Start with a straight mapping of AMQP
classes/methods. Add the hidden machinery to make it work, then sprinkle
on some convenience classes/functions to tie it all together. There's no
need to design a complicated "AMQP API", AMQP already does (almost)
define an API.

The main issue here is that the API changes as AMQP changes but I
wouldn't over-estimate it. The C++ API is a sort of "AMQP-ish" API that
survived the 0-9 to 0-10 shift. However if we had-had a pure AMQP API we
could equally have survived the shift by re-implementing the 0-8 classes
in terms of 0-9 operations. With the exception of the Basic Message it
would have been trivial. 

I'm going to create a JIRA for this in C++. The C++ API has bothered me
for a while. It's non-standard, AMQP-ish but not quite but provides very
little value over a straight AMQP API.

Cheers,
Alan.


Re: [c++] api

Posted by Rajith Attapattu <ra...@gmail.com>.
+1 from me, eventhough I don't work on c++. :)
This way all clients will have an AMQP API.

Rajith

On 6/8/07, Gordon Sim <gs...@redhat.com> wrote:
>
> Alan Conway wrote:
> > I'm going to create a JIRA for this in C++. The C++ API has bothered me
> > for a while. It's non-standard, AMQP-ish but not quite but provides very
> > little value over a straight AMQP API.
>
> When I wrote the initial c++ client, I hadn't seen the python version.
> If I had, I think I would have done a few things differently.
>
> I agree it could be a cleaner and more direct expression of AMQP and I
> would fully support a move in that direction.
>

[c++] api

Posted by Gordon Sim <gs...@redhat.com>.
Alan Conway wrote:
> I'm going to create a JIRA for this in C++. The C++ API has bothered me
> for a while. It's non-standard, AMQP-ish but not quite but provides very
> little value over a straight AMQP API.

When I wrote the initial c++ client, I hadn't seen the python version. 
If I had, I think I would have done a few things differently.

I agree it could be a cleaner and more direct expression of AMQP and I 
would fully support a move in that direction.