RabbitMQ Wrappers for amqp091-go
- Using builder pattern to make it much easier working with exchanges, queues, consumers, etc...
- KeepAlive functionality to persist the connection upon temporary failures
go get -u github.com/aliforever/go-rmq
To initialize the connection with 5 retry times and 10 seconds of delay on each try:
r := rmq.New(address)
errChan, err := r.Connect(5, 10*time.Second)
if err != nil {
return nil, err
}
panic(<-errChan)