Closed ghost closed 7 years ago
Tagging @petersilva
Looks like this can be set by simply adding a x-expires
argument to the queue. Easy enough...
I added this in 0.0.5, with a default expiry of three hours. I believe that it only gets used when amqp_durable
is set to true: otherwise, the queue will disappear the moment the last client disconnects.
Right now, we fiddle with
durability
andautoDelete
to determine how long a queue should stick around. This is messy and can lead to impolite behavior, where a client creates a durable queue that never gets deleted. The client should force any queues it creates to expire after a given period of time, like an hour, in order to cover for short-term disconnects.node-amqp
doesn't seem to have a manual setting for this... is it maybe something we need to pass in thearguments
of.queue
?