rabbitmq 结构体
amqp_basic_properties_t props;
props._flags = AMQP_BASIC_CONTENT_TYPE_FLAG |
AMQP_BASIC_DELIVERY_MODE_FLAG | AMQP_BASIC_REPLY_TO_FLAG |
AMQP_BASIC_CORRELATION_ID_FLAG;
props.content_type = amqp_cstring_bytes("text/plain");
props.delivery_mode = 2; /* persistent delivery mode */
props.reply_to = amqp_bytes_malloc_dup(reply_to_queue);
if (props.reply_to.bytes == NULL) {
fprintf(stderr, "Out of memory while copying queue name");
return 1;
}
props.correlation_id = amqp_cstring_bytes("1");
2.
amqp_basic_properties_t props;
props._flags = AMQP_BASIC_CONTENT_TYPE_FLAG | AMQP_BASIC_DELIVERY_MODE_FLAG;
props.content_type = amqp_cstring_bytes("text/plain");
props.delivery_mode = 2; /* persistent delivery mode */
typedef struct amqp_basic_properties_t_ {
amqp_flags_t _flags; /**< bit-mask of set fields */
amqp_bytes_t content_type; /**< content-type */
amqp_bytes_t content_encoding; /**< content-encoding */
amqp_table_t headers; /**< headers */
uint8_t delivery_mode; /**< delivery-mode */
uint8_t priority; /**< priority */
amqp_bytes_t correlation_id; /**< correlation-id */
amqp_bytes_t reply_to; /**< reply-to */
amqp_bytes_t expiration; /**< expiration */
amqp_bytes_t message_id; /**< message-id */
uint64_t timestamp; /**< timestamp */
amqp_bytes_t type; /**< type */
amqp_bytes_t user_id; /**< user-id */
amqp_bytes_t app_id; /**< app-id */
amqp_bytes_t cluster_id; /**< cluster-id */
} amqp_basic_properties_t;
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了