Closed abbasegbeyemi closed 1 year ago
If you want that kind of granular control I think the base amqp lib is for you
@wagslane Thank you for you library, it`s very useful for RabbitMQ tasks. But this functional is still important for control all connection lifecycle. You already have reconnectionCount var
// ChannelManager -
type ChannelManager struct {
logger logger.Logger
channel *amqp.Channel
connManager *connectionmanager.ConnectionManager
channelMux *sync.RWMutex
reconnectInterval time.Duration
reconnectionCount uint --> this var
reconnectionCountMux *sync.Mutex
dispatcher *dispatcher.Dispatcher
}
I wonder you can add a stop function for number of attempts, thank you!
I want to be able to shut down the consumer/publisher gouroutines and by extension the entire app after a few attempts at reconnecting to the rabbitmq server. Is there a way to implement this with this library?
I can see that the
ChannelManager
andConnectionManager
both increment reconnection count, is there a way to use this value to determine when the managers should give up trying to reconnect?