[rabbitmq-discuss] Frame generation

Ben Hood 0x6e6562 at gmail.com
Mon Jul 30 16:43:47 BST 2007


Matthias,

> The 0-8 spec states that the field is a longstr, and provides the
> following explanation:
>       A block of opaque data passed to the security mechanism. The contents
>       of this data are defined by the SASL security mechanism.  For the
>       PLAIN security mechanism this is defined as a field table holding
>       two fields, LOGIN and PASSWORD.
>
> So for PLAIN auth the field will indeed contain a table, but that is not
> something captured in the type.

So basically what you are saying it the spec treats it as opaque but
the sender and receiver implicitly agree that it's a table, i.e. if
you use PLAIN you just pass

\0username\0password

and for AMQPLAIN you encode as a table and then pass as an opaque string?

> rabbit_framing.erl is auto-generated. If you do find any bugs in it then
> you need to fix the generation script, not the file itself.

Ah, I've always wondered what that codegen module does and why the
spec is encoded in XML. Just out of interest's sake, does this
approach make the maintainance and migration easier or does it save on
boilerplate code?

Ben




More information about the rabbitmq-discuss mailing list