[rabbitmq-discuss] time to live (ttl) in c++ client

Tim Watson tim at rabbitmq.com
Tue Jul 3 08:25:40 BST 2012


Hi Vadiraj,

Please keep the mailing cc-ed in, as this provides a record of answers for users later on to look at. For example, I answered a very similar question to this one yesterday on the mailing list: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2012-July/020968.html.

Now I'm not really 100% clear what your question is anymore. You asked about setting x-message-ttl, which is an argument to queue declare. I'm assuming that your description below (viz "C++ consumer consumes that message..." etc) is of what you want to eventually happen. Look at the link above to my previous answer to what is essentially the same question. TTL will be applied by the broker, so the clients simply need to coordinate themselves around the right queues and/or exchanges.

Oh and by the way, please feel free to call me Tim! ;)  

On 3 Jul 2012, at 06:45, vadiraj hebbar wrote:
> 
> 
> Hi Watson
> 
> I am referring AMQP c++ client. I am using Java client for publishing messages there i am setting ttl in channel.queuedeclare() method for 5 seconds, C++ consumer consumes that messages with in 5 seconds after 5 sec he cannot receive that msg.  if u know please explain with example .
> 
> 
> regards,
> Vadiraj



More information about the rabbitmq-discuss mailing list