Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You need a durable queue to store messages if there are no connected consumers available to process the messages at the time they are published.</p> <p>An exchange doesn't store messages, but a queue can. The confusing part is that exchanges can be marked as "durable" but all that really means is that the <em>exchange itself</em> will still be there if you restart your broker, but it does <strong>not</strong> mean that any messages sent to that exchange are automatically persisted.</p> <p>Given that, here are two options:</p> <ol> <li>Perform <strong>an administrative step</strong> before you start your publishers to create the queue(s) yourself. You could use the web UI or the command line tools to do this. Make sure you create it as a durable queue so that it will store any messages that are routed to it even if there are no active consumers.</li> <li>Assuming your consumers are coded to always declare (and therefore auto-create) their exchanges and queues on startup (and that they declare them as durable), just <strong>run all your consumers at least once</strong> before starting any publishers. That will ensure that all your queues get created correctly. You can then shut down the consumers until they're really needed because the queues will persistently store any future messages routed to them.</li> </ol> <p>I would go for #1. There may not be many steps to perform and you could always script the steps required so that they could be repeated. Plus if all your consumers are going to pull from the same single queue (rather than have a dedicated queue each) it's really a minimal piece of administrative overhead.</p> <p>Queues are something to be managed and controlled properly. Otherwise you could end up with rogue consumers declaring durable queues, using them for a few minutes but never again. Soon after you'll have a permanently-growing queue with nothing reducing its size, and an impending broker apocalypse.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload