1
votes

Let's say that a consumer for a queue has been disconnected for some time during which many number of messages are produced.

  1. How long does RabbitMQ keep the messages for the disconnected consumer without durable mode? (Will it discard the queue right after the consumer is disconnected? or will it keep the queue until the memory allows?)

  2. Does the durable mode will give a functionality for a consumer to consume any message which is published until now? (i.e. random access to the queue, fetching messages out-of-order, or consuming from the beginning of the queue)

1

1 Answers

1
votes
  1. There are some TTL extensions.

TTL can be set for a given queue by setting the x-message-ttl argument to queue.declare, or by setting the message-ttl policy.

  1. No it doesn't. The messages are kept in queue until they are acknowledged, regardless of durability. (unless of course the server dies, then the messages are gone if not previously marked as durable).