alanxz / SimpleAmqpClient

Simple C++ Interface to rabbitmq-c
MIT License
397 stars 213 forks source link

App crashes when connection closes #325

Open gitzko opened 1 year ago

gitzko commented 1 year ago

I've inherited an old C++ codebase, and seems that the process crashes when RabbitMQ connection closes. Is this the normal behaviour? Or is there a way to handle disconnections in SimpleAmqpClient?

alanxz commented 1 year ago

The library itself should not crash when the RabbitMQ connection closes (if it does, its a bug). It will throw an exception when an API call is made with a connection that has been closed.

If you are observing a bug here, please provide a stacktrace, and the type of crash being observed, in addition to the version of SimpleAmqpClient, rabbitmq-c, and platform being used.

gitzko commented 1 year ago

Which exception will it throw when the RabbitMQ server goes down? Like when one of the RabbitMQ nodes in the cluster goes down for patching?