gocardless/hutch — pull request #118 by oskarpearson (2014-11-07 15:45:55+00:00)
Title: Enable Publisher Confirms

* Add new publisher_confirms config option.
* Add section to README.md on how to configure hutch as a producer, since
it doesn't use the command line.
* Add section to README.md on how to use publisher confirms setting.

I've not added publisher_confirms to the command-line parameters, since
it's only for use by the producer.

Resolves https://github.com/gocardless/hutch/issues/115 and
https://github.com/gocardless/hutch/issues/21 (and possibly
https://github.com/gocardless/hutch/issues/22)

Regarding comment
https://github.com/gocardless/hutch/issues/21#issuecomment-23178422
There is no need to wrap the code in a timeout handler in Hutch,
since 'Bunny::ClientTimeout' is raised if the server goes away.
(I've tested this by performing a 'kill -STOP' of the RabbitMQ
server.)

The relevant piece of Bunny code that handles timeouts is channel.rb
[wait_on_confirms_continuations](https://github.com/ruby-amqp/bunny/blob/master/lib/bunny/channel.rb#L1781)