refactor reconnection code (extract to method)
reconnect on amqp errors