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.

I have attached the interesting portions of the code. Can someone take a peek and tell me who is right? And then tell the broker to stop being a whinny pain in the butt.

Thanks =)
Pieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111116/34caa54a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad-broker.bad.c
Type: application/octet-stream
Size: 3253 bytes
Desc: bad-broker.bad.c
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111116/34caa54a/attachment.obj>

Search Discussions

  • Matthias Radestock at Nov 17, 2011 at 7:58 am
    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.
  • Pieter de Zwart at Nov 17, 2011 at 6:54 pm
    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.

Related Discussions

Discussion Navigation
viewthread | post
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 © 2021 Grokbase