[rabbitmq-discuss] RabbitMQ C++ program for TTL implementation
Tim Watson
tim at rabbitmq.com
Mon Jul 2 11:52:03 BST 2012
On 07/02/2012 11:15 AM, Maurya M wrote:
> Hi,
> I am using the example from RabbitMQ website -
> http://www.rabbitmq.com/devtools.html - amqpcpp
> <https://github.com/akalend/amqpcpp> a C++ message library for RabbitMQ.
>
> I have a need to implement the Time-To-Live feature wherein my
> Publisher is in Java and Consumer in C++.
> I am able to declare the queue with "x-message-ttl" in my Java
> Publisher but my C++ consume also needs to declare the queue with this
> same "x-message-ttl"? Is my understanding correct? And how can this be
> targeted using the amqpcpp - C++ library. Has anyone of the members
> come across similar requirement and cracked this one.
>
Well, looking at the constructor and declare handling code for
AMQPExchange in
https://github.com/akalend/amqpcpp/blob/master/src/AMQPExchange.cpp, it
doesn't look like this is supported. Instead of initialising the
arguments which are passed to the underlying call to
amqp_exchange_declare (in rabbitmq-c, which amqpcpp is ostensibly based
on), the code sets the arguments to empty/null.
If you want to support proper declare semantics then, you'll either need
to patch amqpcpp, or defer to using rabbitmq-c directly.
Cheers,
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120702/dec1ca2a/attachment.htm>
More information about the rabbitmq-discuss
mailing list