[rabbitmq-discuss] Java/dotnet drivers short-string field type

Simon MacMullen simon at rabbitmq.com
Fri Sep 6 10:09:29 BST 2013


See:

http://www.rabbitmq.com/amqp-0-9-1-errata.html#section_3

In short, the spec was changed at the very last minute before release, 
breaking existing implementations. Rather than break all the clients at 
that point we stuck with the existing meanings.

It's certainly unfortunate.

As a result we try to avoid using these types for headers we add to 
messages.

Cheers, Simon

On 06/09/2013 12:48AM, Fawad Halim wrote:
> Hi Simon,
>    I'm emailing you because I noticed a little discrepancy between the
> AMQP 0.9.1 spec and how the Java/dotnet drivers seems to work. I
> apologize in advance if you're not the correct person for this.
>
>   I was looking at the drivers to try to figure out the correct behavior
> of a consumer of the .NET library (NServiceBus). From the spec
> specification section 4.2.1, field values with kind 's' should be
> treated as short-strings (an octet worth of string data).
> However, the Java driver
> (https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/com/rabbitmq/client/impl/ValueReader.java#L194)
> and the .NET driver
> (https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/master/projects/client/RabbitMQ.Client/src/client/impl/WireFormatting.cs#L192)
> both seem to read the value of kind 's' as integers. Other random
> third-party drivers I've been using like pika
> (https://github.com/pika/pika/blob/master/pika/data.py#L192) or the
> golang driver
> (https://github.com/streadway/amqp/blob/master/read.go#L261) on the
> other interpret the values as strings like I thought they should be.
>
> Could you tell me which interpretation is correct?
>
> I'd really appreciate your help with this.
>
> Regards
> -fawad

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list