1. In case someone decides to use this code as a module, connection would  be established on import, which is probably not what user expects to happen.
2. There should be no blocking (waiting for responce/finish) code in distributed systems. Use asynchronous amqp requests instead.