[rabbitmq-discuss] rabiit-c library, properies is not set

Tony Garnock-Jones tonyg at lshift.net
Tue Mar 23 15:59:14 GMT 2010


Hi Alexandre,

Alexandre Kalendarev wrote:
> If I set the  properies for AMQP Basic.Publish than:
> I can to set :
> [...]
> but reality I can to set only    content_type;
> Can I to set/change content_encoding;, user_id, message_id delivery_mode, set expiration, timestamp?

>From subsequent message, it seems you've already worked this out, but
for the list:

You have to not only fill in the member variable you're interested in,
but also set the _flags to indicate that you have done so. For example:

    amqp_basic_properties_t props;
    props._flags = 0; // important!

    props._flags |= AMQP_BASIC_CONTENT_TYPE_FLAG;
    props.content_type = amqp_cstring_bytes("text/plain");

    props._flags |= AMQP_BASIC_DELIVERY_MODE_FLAG;
    props.delivery_mode = 2; // persistent delivery mode

Regards,
  Tony




More information about the rabbitmq-discuss mailing list