Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/isayme/go-amqp-reconnect

auto reconnecting example for github.com/streadway/amqp Connection & Channel
https://github.com/isayme/go-amqp-reconnect

amqp golang rabbitmq reconnect

Last synced: 5 days ago
JSON representation

auto reconnecting example for github.com/streadway/amqp Connection & Channel

Awesome Lists containing this project

README

        

# streadway/amqp Conneciton/Channel auto reconnect wrap
streadway/amqp Connection/Channel does not reconnect if rabbitmq server restart/down.

To simply developers, here is auto reconnect wrap with detail comments.

## How to change existing code
1. add import `import "github.com/isayme/go-amqp-reconnect/rabbitmq"`
2. Replace `amqp.Connection`/`amqp.Channel` with `rabbitmq.Connection`/`rabbitmq.Channel`!

## Example
### Close by developer
> go run example/close/demo.go

### Auto reconnect
> go run example/reconnect/demo.go