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;

posted on 2019-06-21 00:14  lydstory  阅读(343)  评论(0编辑  收藏  举报

导航