pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

[Question] Connection events in version rc-5 #411

Open DevOnBike opened 4 years ago

DevOnBike commented 4 years ago

Hi,

we would like to know using RawRabbit Api when client is connected and disconnected from broker - this is useful because we could react to not being connected to broker by storing generated message (generating some message is very cpu intensive) in some persistent store like database.

From raw rabbit source code I can see that I could use IChannelFactory class with GetConnectionAsync method but I'm not sure it is the right way of doing this because this method is not idempotent, another words it changes state of internals insted only giving information about connection state.

Any clues about this case?

Regards, Maćko