fix republish function call: fixes #12

This was causing an issue if publishing a message before the amqp connection had been established