hreinhardt/amqp — pull request #14 by gseitz (2013-08-30 23:20:52+00:00)
Title: Allow registering Basic.return callbacks

Hi,
I started working on adding support for `basic.return` by registering return listeners, which are stored in `Channel`.
I haven't touched `publishMsg` at all, as I don't know if you want to retain backwards compatibility and prefer a new function or modifying the existing one to take more parameters.

This is still WIP, but I though I'd fire off the pull request to get the discussion started.
I modified `ExampleProducer.hs` to send a message to a routing key that is not bound by any queue. To test this, you'll have to set the mandatory flag to `True` in `publishMsg`. Note that RabbitMQ doesn't support the `immediate` flag as per 3.x.

Let me know what you think and I'll gladly take comments/feedback to change anything you would do better/different.

Cheers