go-amqp-reconnect

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2021 License: MIT

README

####THIS IS FORK OF github.com/isayme/go-amqp-reconnect/rabbitmq LIB

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/Stanly1995/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

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL