[rabbitmq-discuss] rabbitmq-c TTL setting not working for me - please help

Simon MacMullen simon at rabbitmq.com
Tue Jun 17 17:39:55 BST 2014

On 17/06/2014 5:33PM, Kim Tran wrote:
> And I still got all the messages. None of them was dropped.

Hang on. You originally said:

> Then every time I consume a message, I sleep for 5 secs just to delay
> the consuming rate.

That would mean the broker sent you all the messages straight away, but 
your app delayed reading them off the socket. The queue can't expire 
messages when they are out for delivery.

So if you want a slow consumer, set basic.qos to a low value (e.g. 1), 
that way the broker will only send you one message at a time as you 
acknowledge them (you are using acks, right?)

Then you should see the messages expire.

Cheers, Simon

Simon MacMullen
RabbitMQ, Pivotal

More information about the rabbitmq-discuss mailing list