[rabbitmq-discuss] problem with very high queue TTL

Matthew Sackman matthew at rabbitmq.com
Fri Apr 13 16:29:43 BST 2012


On Fri, Apr 13, 2012 at 05:19:30PM +0200, Bouh Bouh wrote:
> Working with rabbitmq, I found a nasty behavior relating to queue and their
> TTL. If you send a persistant message to a durable queue when the queue
> have a TTL over 4.294.967.295 (max 32bit int, or FF FF FF FF), then the
> queue is destroyed if the message is not consumed immediately.

> ** Reason for termination ==
> ** {badarg,[{erlang,send_after,[4294967296,<0.31584.0>,drop_expired]},
> {rabbit_amqqueue_process,ensure_ttl_timer,1},
> {rabbit_amqqueue_process,handle_call,3},
> {gen_server2,handle_msg,2},
> {proc_lib,wake_up,3}]}

TTL is expressed in milliseconds. 4294967296 ms is about 500 days. This
is rather long which is probably why no one's hit this bug, even though
it's been around for a while. Given our docs say that you can use a
long-long, which is a 64-bit int, this is clearly a bug. I'll file a bug

Ironically, it's caused by the fact that erlang:send_after does *not*
obey the same type signature as timer:send_after. Joy.


More information about the rabbitmq-discuss mailing list