Issue 16 amqp worker

Implemented a simple worker that consumes the messages and logs them.
This involved a lot of refactoring of the existing code.