tags:

views:

484

answers:

3

We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).

What can be best way to achieve this.

+1  A: 

AMQP can be quite complex to understand -- I suggest Using Protocol Buffers to code your communication layer, it generates both python and C++. if your needs are too complicated I would suggest ICE as it supports every programming language you can think of, and I believe it also handles the protocol buffers format.

-- edit --

If you are going to use AMQP, you should look at Zero MQ. It has a C++ implementation of AMQP. However they are porting it to a pure-C implementation.

Hassan Syed
Thanks Hassan, the project that I am working on already uses AMQP with Java Client API (Rabbit MQ) so we would like to continue use AMQP as middleware, however I am not able to find a good C++ client implementation for any open source AMQP.
Hacker_PK
Is there a transactional queue element to protocol buffers ? I thought it was purely a serialisation mechanism ?
Brian Agnew
It does not have a transactional queue.
Hassan Syed
So it seems completely orthogonal to the AMQP issue (which is serialisation agnostic)
Brian Agnew
A: 

Apache QPid seems to be relevant here. There's a C++ broker/client library here.

Note that since you're programming to a protocol (AMQP), your broker/client don't have to be in the same language. e.g. I'm using Scala and C# clients talking to RabbitMQ (an Erlang broker).

Brian Agnew
Thanks Brian, I got it, so I correct my question, is there a AMQP broker that has good stable C++ client library support.
Hacker_PK
I can't comment on the stability of QPid, I'm afraid. I would be more concerned about the broker stability, since that has to run independently and manage reliable queueing/delivery etc. RabbitMQ seems to work well. I suspect the thing to do is to run QPid/RabbitMQ up in your particular scenario and see how it fares.
Brian Agnew
+1  A: 

For future reference, take a look at Apache Qpid - it has a C++ client library and is very good. The problem for your use-case is that Rabbit implements AMQP 0-8 and the Qpid C++ client talks AMQP 0-10.

Steve Huston