1. 程式人生 > >RabbitMQ 消息發送 properties

RabbitMQ 消息發送 properties

ignore 名稱 invalid per 應用 字符 形式 ati timestamp

發送消息可以為消息指定一些參數

Delivery mode: 是否持久化,1 - Non-persistent,2 - Persistent
Headers:Headers can have any name. Only long string headers can be set here.
Properties: You can set other message properties here (delivery mode and headers are pulled out as the most common cases). Invalid properties will be ignored. Valid properties are:
content_type : 消息內容的類型 text/

json
content_encoding: 消息內容的編碼格式
priority: 消息的優先級
correlation_id:關聯id
reply_to: 用於指定回復的隊列的名稱
expiration: 消息的失效時間
message_id: 消息id
timestamp:消息的時間戳
type: 類型
user_id: 用戶id
app_id: 應用程序id
cluster_id: 集群id
Payload: 消息內容(必須是以字符串形式傳入)

RabbitMQ 消息發送 properties