py-amqp icon indicating copy to clipboard operation
py-amqp copied to clipboard

missing on_close callback on Connection __init__

Open alexroat opened this issue 6 years ago • 2 comments

How is possible to bind a callback function in order to detect the disconnection ? In pika for example there is a useful binding. This should be present in order to detect disconnection (from broker) and implement a connection respawning.

alexroat avatar Sep 25 '19 08:09 alexroat

can you share the pika reference?

auvipy avatar Sep 25 '19 08:09 auvipy

In the constructor of Connection: https://pika.readthedocs.io/en/stable/modules/connection.html

You can also bind later: https://pika.readthedocs.io/en/stable/modules/connection.html?highlight=on_close#pika.connection.Connection.add_on_close_callback

alexroat avatar Sep 25 '19 09:09 alexroat