Oh. Bytes. Binary. Doh. =)

Thanks!
me
On 11/16/11 11:58 PM, "Matthias Radestock" wrote:

Pieter,
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
http://hg.rabbitmq.com/rabbitmq-c/file/default/librabbitmq/amqp.h,
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.

Matthias.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedNov 17, '11 at 3:19a
activeNov 17, '11 at 6:54p
posts3
users2
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase