关于rabbitmq消息持久化机制的问题
Question about rabbitmq message persistence mechanism
我正在阅读Persistence Configuration,我有一些问题。
我知道队列可以是持久的也可以是非持久的,消息也分为两类:持久的和瞬态的。
正如文档所说:持久消息一旦到达队列就会被写入磁盘。
所以,这是我的问题:
- 如果我发送了一条消息,但该消息没有分发到任何队列,
消息会持久吗?
- 如果队列是非持久的,消息(持久的还是瞬态的,不是
正在消耗)在删除队列时从磁盘中删除?
- 如果一条消息被消费了,rabbitmq是否会删除这条消息
物理存储?
欢迎任何关于如何测试这些条件的想法。
If I send a message and the message was not distributed to any queues, will the message be persistent?
否,请参阅 mandatory
来处理无法路由的消息。
If a queue is non-durable, will the message(persistent or transient, not being consumed) be deleted from disk when the queue is deleted?
是
If a message is consumed, does rabbitmq delete this messages from physical storage?
当消息被消费且状态为unacked
时,消息不会被删除。
当您发送 ack
或 nack
时,消息将从 memory/disk 中删除。
我正在阅读Persistence Configuration,我有一些问题。
我知道队列可以是持久的也可以是非持久的,消息也分为两类:持久的和瞬态的。
正如文档所说:持久消息一旦到达队列就会被写入磁盘。
所以,这是我的问题:
- 如果我发送了一条消息,但该消息没有分发到任何队列, 消息会持久吗?
- 如果队列是非持久的,消息(持久的还是瞬态的,不是 正在消耗)在删除队列时从磁盘中删除?
- 如果一条消息被消费了,rabbitmq是否会删除这条消息 物理存储?
欢迎任何关于如何测试这些条件的想法。
If I send a message and the message was not distributed to any queues, will the message be persistent?
否,请参阅 mandatory
来处理无法路由的消息。
If a queue is non-durable, will the message(persistent or transient, not being consumed) be deleted from disk when the queue is deleted?
是
If a message is consumed, does rabbitmq delete this messages from physical storage?
当消息被消费且状态为unacked
时,消息不会被删除。
当您发送 ack
或 nack
时,消息将从 memory/disk 中删除。