Add basic code for handling messages on queues