module
Version:
v0.0.0-...-2d7368e
Opens a new window with list of versions in this module.
Published: Mar 26, 2024
License: MIT
Opens a new window with license information.
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
- add import
import "github.com/isayme/go-amqp-reconnect/rabbitmq"
- 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
Directories
¶
example
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.