Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/isayme/go-amqp-reconnect
- Owner: isayme
- License: mit
- Created: 2018-09-29T01:24:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-03T09:21:56.000Z (almost 3 years ago)
- Last Synced: 2024-12-11T20:09:17.381Z (12 days ago)
- Topics: amqp, golang, rabbitmq, reconnect
- Language: Go
- Size: 7.81 KB
- Stars: 106
- Watchers: 5
- Forks: 84
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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