title: How does RabbitMQ decide when it is time to delete a message?
body: <p>I am trying to understand the logic for message deletion in RabbitMQ.</p>
  
  <p>My goal is to make messages persist even if there is not a client connected to read them, so that when clients reconnect the messages are waiting for them. I can use durable, lazy queues so that messages are persisted to disk, and I can use HA replication to ensure that multiple nodes get a copy of all queued messages.</p>
  
  <p>I want to have messages go to two or more queues, using topic or header routing, and have one or more clients reading each queue.</p>
  
  <p>I have two queues, A and B, fed by a header exchange. Queue A gets all messages. Queue B gets only messages with the "archive" header. Queue A has 3 consumers reading. Queue B has 1 consumer. If the consumer of B dies, but the consumers of A continue acknowledging messages, will RabbitMQ delete the messages or continue to store them? Queue B will not have anyone consuming it until B is restarted, and I want the messages to remain available for later consumption.</p>
  
  <p>I have read a bunch of documentation so far, but still have not found a clear answer to this.</p>