Rabbitmq消息持久化

Rabbitmq消息持久化

 

1.交换机持久化设置

 exchange 持久化,在声明时指定 durable未true

 

2.队列持久化设置

queue 持久化,在声明时指定 durable 为true

 

3.消息持久化设置

DeliveryMode 属性:2代表持久化,1代表非持久化

 

此外集成IBasicProperties 的类还有许多属性,例如:ContentType (消息属性)、Headers (标头)、Expiration (到期时间)

转载:https://www.cnblogs.com/qidakang/p/9776444.html

posted @ 2020-12-09 18:36  沐春风-燕南飞  阅读(137)  评论(0编辑  收藏  举报