[rabbitmq-discuss] Extending the protocol is straightforward enough (was Re: a possibility of AMQP/RabbitMQ extension?)

Tony Garnock-Jones tonyg at lshift.net
Tue Nov 10 18:26:18 GMT 2009


Hi Igor,

Igor Goryachev wrote:
> 0. is it safe to extend AMQP for customer needs (in such way as XMPP
> permits to do)?

Interesting question. It's certainly *possible* -- you'd start by adding
the method to the specification document (in the rabbitmq-codegen
downloadable), and then cleaning and regenerating the client and server
(which generates the necessary stubs and skeletons, roughly), and then
extending rabbit_channel.erl to handle invocations of the various new
methods, and adding corresponding features to the client library.

All a bit awkward, but certainly possible, and in fact explicitly part
of the way AMQP was set up.

Sadly, you have to just *choose* a classID/methodID, because there are
none reserved for experimental or private use, and there's no registry.
But so long as you control both endpoints, you'll be fine...

... which brings me to the "safe" question. Your extension will be just
that, an extension, meaning that clients that don't understand the
classIDs/methodIDs you add will be at a loss. Again, if you have control
over both sides, you'll be fine.

I'm curious: what kind of extension would you like to add? Please tell
us more :-)

Regards,
  Tony

PS: there's an experimental branch of rabbitmq-codegen and
rabbitmq-server that has support for adding additional protocol
definitions without having to modify the central spec doc: it's
"bug21763". It's undocumented, which is why it hasn't been QA'd and
merged into default yet. I'm working on it (on a back-back-back-burner).




More information about the rabbitmq-discuss mailing list