[rabbitmq-discuss] durable message server restart
Matthias Radestock
matthias at rabbitmq.com
Wed Jan 16 22:44:35 GMT 2013
On 16/01/13 22:23, Michael Klishin wrote:
>
> 2013/1/17 Prabodh Upreti <prabodh.upreti at vce.com
> <mailto:prabodh.upreti at vce.com>>
>
> Does this mean I need to create a durable exchange too?
>
>
> AFAIR only durable queues can be bound to durable exchanges.
Actually, that restriction was lifted some time ago.
Also, to the OP's question...
"I understand I need to create a durable queue so I can hold messages
for consumers that connect in the future to retrieve those messages."
Durability is there for one thing and one thing only: retaining data in
the event of broker restarts.
So, technically, to "hold messages for consumers that connect in the
future", an ordinary queue suffices. Though if that future might entail
broker restarts then yes, you should make the queue durable.
Another thing worth noting is that durability only affects performance
of resource operation - i.e. creating/deleting queues, exchanges and
bindings - *not* messaging. Though combining durability with persistence
(see below) *does* affect performance.
> Messages need to be published as persistent (delivery mode 2).
Right. It's the conjunction of message persistence and queue durability
that results in messages getting written to disk and survive broker
restarts.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list