.NET client with 0-9-1 protocol is sending the AMQP 0-8 header

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

.NET client with 0-9-1 protocol is sending the AMQP 0-8 header

Gotthard, Petr

Hello,

 

I believe the .NET client is sending wrong AMQP header (the very first 8 octets).

 

When I set the protocol to 0-9-1 (and RabbitMQ correctly reports the 0-9-1 protocol), the first 8 octets sent by the .NET client still contain AMQP x1 x1 x9 x1 (which is the header used in AMQP 0-8) although it should contain AMQP x0 x0 x9 x1.

 

 

Regards,

Petr

 


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: .NET client with 0-9-1 protocol is sending the AMQP 0-8 header

Matthias Radestock-3
Petr,

On 07/01/13 18:33, Gotthard, Petr wrote:
> I believe the .NET client is sending wrong AMQP header (the very first 8
> octets).

I can assure you it is not, unless you are using a truly ancient client
which pre-dates 0-9-1.

> When I set the protocol to 0-9-1

How are you doing that? The .net client is in fact selecting 0-9-1 by
default, so this step shouldn't be necessary.

Regards,

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: .NET client with 0-9-1 protocol is sending the AMQP 0-8 header

Gotthard, Petr
Matthias,
at least the .NET client sends a different header than the Erlang client, although RabbitMQ indicates both connections are using AMQP 0-9-1.

The Erlang client (by default, without any protocol switching) sends "AMQP 0x00 0x00 0x09 0x01", which is a protocol header for AMQP 0-9-1 (based on http://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf). This is as expected.

However, the .NET client (by default, but also when 0-9-1 is set explicitly) sends "AMQP 0x01 0x01 0x09 0x01", which is a protocol header for AMQP 0-8 (http://www.rabbitmq.com/resources/specs/amqp0-8.pdf). I believe this is wrong.


How shall I prove it? ;-) Attached is a Wireshark screenshot from Erlang and .NET communication. Do I do something wrong? Did I miss some errata to the standard?

I thought I use the wrong protocol, so I did set it explicitly by:
            ConnectionFactory factory = new ConnectionFactory();
            factory.Protocol = Protocols.AMQP_0_9_1;

but the outcome was the same as before. I use the .NET client from August 2012 (version 2.8.5).

Please note that I manually inspect all the protocol frames and the rest of the communication does (seem to) match the 0-9-1 specification also for the .NET client. It's only the header which is.... different.

Are you sure there cannot be a bug?


Regards,
Petr

-----Original Message-----
From: Matthias Radestock [mailto:[hidden email]]
Sent: 7. ledna 2013 19:51
To: Discussions about RabbitMQ
Cc: Gotthard, Petr
Subject: Re: [rabbitmq-discuss] .NET client with 0-9-1 protocol is sending the AMQP 0-8 header

Petr,

On 07/01/13 18:33, Gotthard, Petr wrote:
> I believe the .NET client is sending wrong AMQP header (the very first 8
> octets).

I can assure you it is not, unless you are using a truly ancient client
which pre-dates 0-9-1.

> When I set the protocol to 0-9-1

How are you doing that? The .net client is in fact selecting 0-9-1 by
default, so this step shouldn't be necessary.

Regards,

Matthias.

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

erlang.png (83K) Download Attachment
dotnet.png (83K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: .NET client with 0-9-1 protocol is sending the AMQP 0-8 header

Matthias Radestock-3
Petr,

On 08/01/13 08:14, Gotthard, Petr wrote:
> However, the .NET client (by default, but also when 0-9-1 is set
> explicitly) sends "AMQP 0x01 0x01 0x09 0x01", which is a protocol
> header for AMQP 0-8
> (http://www.rabbitmq.com/resources/specs/amqp0-8.pdf). I believe this
> is wrong.
>
> How shall I prove it? ;-) Attached is a Wireshark screenshot from
> Erlang and .NET communication.

If you look carefully, you'll see it is actually sending 0x01 0x01 0x00
0x09, which is the protocol header for AMQP 0-9.

So we were both wrong :)

I have filed a bug.

In practical terms this doesn't matter as long as the client is talking
to rabbit since rabbit will happily accept 0-9 connections and treat
them as 0-9-1. The wire format is backward compatible between the
versions so a genuine 0-9 client can connect too.

Regards,

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss