Naively calling disconnect() from RCRMQ will throw the following exception: pika.exceptions.ChannelWrongStateError: Channel is closed.
pika.exceptions.ChannelWrongStateError: Channel is closed.
To avoid this from happening, check the connection in the disconnect function.