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;

转载于:https://www.cnblogs.com/hshy/p/11062257.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值