[rabbitmq-discuss] Disagreeing with the broker over argument type

Pieter de Zwart pdezwart at rubiconproject.com
Thu Nov 17 18:54:58 GMT 2011

Oh. Bytes. Binary. Doh. =)


On 11/16/11 11:58 PM, "Matthias Radestock" <matthias at rabbitmq.com> wrote:

>On 17/11/11 03:19, Pieter de Zwart wrote:
>> I am having a disagreement with the broker and I am hoping one of you
>> can act as a neutral third party. I am trying to create a queue with
>> arguments using the rabbitmq-c library, and I think im giving a string,
>> but the broker is complaining that I am passing in binary data.
>From http://www.rabbitmq.com/ha.html#genesis
><quote>The value of this entry is a long string</quote>
>and in your code you have:
>			case IS_STRING:
>				field->kind = AMQP_FIELD_KIND_BYTES;
>				char *strValue = estrndup(Z_STRVAL_P(&value), Z_STRLEN_P(&value));
>				field->value.bytes = amqp_cstring_bytes(strValue);
>				break;
>According to 
>AMQP_FIELD_KIND_BYTES corresponds to the 'x' "Byte array" AMQP type,
>whereas what the broker is expecting is the 'S' "Long string" type,
>which is AMQP_FIELD_KIND_UTF8 in the C code.

More information about the rabbitmq-discuss mailing list