AMQP 0.9.1 protocol serialization and deserialization implementation for Ruby (2.0+)
Ruby Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
codegen Sync protocol.rb.pytemplate with client.rb, kudos to @camelpunch Jan 8, 2016
lib/amq Update documentation of IntAllocator#allocate Mar 7, 2016
.gitignore fixed signed 16bit amqp framing conversion Dec 18, 2013
.gitmodules Organize codegen-related bits under codegen/* Nov 9, 2012
.rspec Added spec stubs. Nov 19, 2010
.travis.yml Try Bundler caching Jan 26, 2016 Update change log Apr 28, 2016
Gemfile Bump RSpec to 3.4 Dec 25, 2015
LICENSE README updates Aug 15, 2015
Rakefile Add Rakefile for extension compilation May 13, 2013
amq-protocol.gemspec gemspec edits Aug 15, 2015
generate.rb Exclude credits extension from generation Jun 17, 2013

What is amq-protocol.

amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not an AMQP client: amq-protocol only handles serialization and deserialization.

If you want to write your own AMQP client, this gem will handle all the serialization needs for you, including RabbitMQ extensions to AMQP 0.9.1.

Supported Ruby Versions

amq-protocol 1.9.2 was the last version to support Ruby 1.8 and 1.9. amq-protocol 2.0.0 and later only supports Ruby 2.0+.


gem install amq-protocol


Make sure you have Python, pip and the mako templating package installed:

pip install mako

amq-protocol uses RabbitMQ protocol code generation library that is in Python, so there is some Python involved in the build.

To regenerate lib/amq/protocol/client.rb from the source (codegen/* files), run


To make changes, do not edit client.rb directly. Instead, edit the codegen/protocol.rb.pytemplate and regenerate.

To run tests, use

bundle install --binstubs
./bin/rspec -c spec spec

Maintainer Information

amq-protocol is maintained by Michael Klishin.

CI Status

Build Status


Please report any issues you may find to our Issue tracker on GitHub.

Mailing List

Any questions you may have should be sent to the Ruby AMQP mailing list.


MIT (see LICENSE in the repository root).