[rabbitmq-discuss] ? about rabbitmq 1.7.1 and 7-byte frame headers
mikeb at lshift.net
Tue Feb 16 12:38:56 GMT 2010
As a preface, let me note that 0-9-1 is in part a rationalisation of the
specification, and in part an encoding of what brokers actually
implement. 0-8 had ambiguities and inconsistencies quite aside from the
more obvious mistakes (like the grammar for the protocol header), but
what the brokers ended up implementing was by and large consistent.
If you're planning to implement an AMQP peer, personally speaking I
would go for 0-9-1 and forget about 0-8. Not only has it fewer
mistakes, but it is also (or will be soon, see below) a stable point of
>> james anderson wrote:
>>> a recently built rabbitmq server server indicates - even to the
>>> level of the response server properties, that it implements "amqp
>>> 8-0", but
>>> a. if one connects with a 9-1 version token, it does not disconnect.
>>> it proceeds to negotiate the connection.
>> That is expected behaviour for a 0-8 broker, at the least by some
>> interpretations of the spec - if the client specifies a higher version
>> number than supported by the server then negotiation proceeds with the
>> server sending the version it supports.
The protocol negotiation is a bit odd. In the technical spec (PDF) it
says what you have said above; in the XML it adds the rule "The server
MUST provide a protocol version that is lower than or equal to that
requested by the client in the protocol header."
Hence you can have a negotiation which goes:
Client: Hi, I would like to use protocol 0-9-1
Server: Sure! I support that. OK, let's use version 0-8
So yeah, a bit nuts.
> that is to say, page-52/line-38 and the diagrams at page-52/line32 and
> page-53/line-11 of amqp8-0.pdf are no more a misrepresentation of
> "accordingly" for a purported r8.0 broker than the indication in
> `amqp-xml-doc0-8.pdf` that it applies to "AMQ Protocol (major=10, minor=3)"?
>> NB: the correct protocol header for 0-9-1 is in fact AMQP 0-0-9-1,
>> whereas for 0-8 it is AMQP 1-1-8-0, and for 0-9 it is AMQP 1-1-0-9.
>> Yes, that is crazy.
> hmmm... what does the ampq 1-1-9-1 protocol header from the r8.0 and the
> r9.1 specs actually mean?
> is that what you intended, above, with "AMQP 0-0-9-1"?
In 0-9-1 the protocol header is 'AMQP0091'. The last four digits are
the constant 0 (protocol-id, whatever that is), then the major, minor
and revision numbers. The 0-8 and 0-9 specs gave these digits a
different meaning (and the first two were effectively constants).
I just tried connecting to a RabbitMQ from default branch and giving a
0-9-1 header, and it wrote AMQP1180 and closed the connection, as
specified. From which branch did you build?
>>> b. it does not use the 8-byte frame headers which appear in every
>>> instance of the amqp0-8 specification the net had yielded, but
>>> rather 7-byte headers that are specified for 9-1.
>> All implementations of 0-8 actually use a 7-byte header. Hence the
>> correction in 0-9-1.
> do these two sentences boggle any other minds?
> a naive reader of the r8.0 specification might misconstrue it to
> require, that such a correction would apply to a broker which purports
> to follow the r9.1 spec, but not to broker which purports to follow the
> r8.0 spec. in this light, i have rescanned the r8.0 spec, but did not
> observe any formulations of the order "or any later protocol version."
> ok. anyway, i gather that page-35/line-26 and page-53/line-29 of
> amqp8-0.pdf are history. is there anything else of which a naive
> implementor should be aware?
Many things, I should think, sadly. The things corrected, or cleared
up, in 0-9-1 give some indication.
> ? are there actually any r9.0 brokers in the wild?
Qpid's Java broker implements 0-9 and 0-9-1, inter alia. RabbitMQ has a
branch implementing 0-9-1 (amqp_0_9_1 in the broker and most of the
client repos), which should make its way into releases once work on the
new persister is done.
> on a meta level: how does this community achieve interoperability, other
> by knowing each other's code?
Also by using each other's code; e.g., we use Qpid's (Python) test
suites, in part, and they have been using our 0-9-1 (Java) test suite.
More information about the rabbitmq-discuss