Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Go Shell
Branch: master
Failed to load latest commit information.
_examples Replaces NotifyConfirm with NotifyPublish
spec Merge pull request #75 from streadway/75-connection.blocked
.gitignore Ignore all command outputs
.travis.yml pins travis build to 1.4
LICENSE Add 2 Clause BSD license Includes a link to tutorials in Go
allocator.go Adds an integer allocator
allocator_test.go Adds an integer allocator
auth.go Documentation cleanup Rotate certs with 10 year lifetime
channel.go Synchronizes confirms state
client_test.go Replaces NotifyConfirm with NotifyPublish
confirms.go Synchronizes confirms state
confirms_test.go Synchronizes confirms state
connection.go Fixes #136 by using the correct uint16 limit
consumers.go Fixes returning a lock(amqp.consumers) by value
delivery.go Errors instead of panics on closed delivery chan
delivery_test.go Errors instead of panics on closed delivery chan
doc.go Documentation
examples_test.go Replaces NotifyConfirm with NotifyPublish Use the BSD licensed amqp091 spec.
integration_test.go Replaces NotifyConfirm with NotifyPublish
read.go Go 1.0.3 compat
reconnect_test.go Cleanup printfs found with go vet
return.go Documentation cleanup
shared_test.go Run integration tests with build tag +integration
spec091.go Merge pull request #75 from streadway/75-connection.blocked
tls_test.go Rotate certs with 10 year lifetime
types.go Synchronizes confirms state
uri.go fix URI.String for default user, non-default pass
uri_test.go Cleanup printfs found with go vet
write.go Restrict table field value types


AMQP 0.9.1 client with RabbitMQ extensions in Go.



Build Status

API changes unlikely and will be discussed on Github issues along with any bugs or enhancements.


Provide an functional interface that closely represents the AMQP 0.9.1 model targeted to RabbitMQ as a server. This includes the minimum necessary to interact the semantics of the protocol.


Things not intended to be supported.

  • Auto reconnect and re-synchronization of client and server topologies.
    • Reconnection would require understanding the error paths when the topology cannot be declared on reconnect. This would require a new set of types and code paths that are best suited at the call-site of this package. AMQP has a dynamic topology that needs all peers to agree. If this doesn't happen, the behavior is undefined. Instead of producing a possible interface with undefined behavior, this package is designed to be simple for the caller to implement the necessary connection-time topology declaration so that reconnection is trivial and encapsulated in the caller's application code.
  • AMQP Protocol negotiation for forward or backward compatibility.
    • 0.9.1 is stable and widely deployed. Versions 0.10 and 1.0 are divergent specifications that change the semantics and wire format of the protocol. We will accept patches for other protocol support but have no plans for implementation ourselves.
  • Anything other than PLAIN and EXTERNAL authentication mechanisms.
    • Keeping the mechanisms interface modular makes it possible to extend outside of this package. If other mechanisms prove to be popular, then we would accept patches to include them in this pacakge.


See the 'examples' subdirectory for simple producers and consumers executables. If you have a use-case in mind which isn't well-represented by the examples, please file an issue.


Use Godoc documentation for reference and usage.

RabbitMQ tutorials in Go are also available.


Pull requests are very much welcomed. Create your pull request on a non-master branch, make sure a test or example is included that covers your change and your commits represent coherent changes that include a reason for the change.

To run the integration tests, make sure you have RabbitMQ running on any host, export the environment variable AMQP_URL=amqp://host/ and run go test -tags integration. TravisCI will also run the integration tests.

Thanks to the community of contributors.

External packages


BSD 2 clause - see LICENSE for more details.

Something went wrong with that request. Please try again.