<commit_before>## 0.20.0 — (unreleased)

### Hutch::Exception includes Bunny::Exception

`Hutch::Exception` now inherits from `Bunny::Exception` which
inherits from `StandardError`.

GH issue: [#137](https://github.com/gocardless/hutch/issues/137).


### Pluggable (Negative) Acknowledge Handlers

Hutch now can be configured to use a user-provided
object(s) to perform acknowledgement on consumer exceptions.

For example, this is what the default handler looks like:

``` ruby
require 'hutch/logging'
require 'hutch/acknowledgements/base'

module Hutch
  module Acknowledgements
    class NackOnAllFailures < Base
      include Logging

      def handle(delivery_info, properties, broker, ex)
        prefix = "message(#{properties.message_id || '-'}): "
        logger.debug "#{prefix} nacking message"

        broker.nack(delivery_info.delivery_tag)

        # terminates further chain processing
        true
      end
    end
  end
end
```

Handlers are configured similarly to exception notification handlers,
via `:error_acknowledgements` in Hutch config.

Contributed by <NAME>.

GH issue: [#177](https://github.com/gocardless/hutch/pull/177).


### Bunny Update

Bunny is updated to 2.2.1.

<commit_msg>Update change log<commit_after>## 0.20.0 — (unreleased)

### Hutch::Exception includes Bunny::Exception

`Hutch::Exception` now inherits from `Bunny::Exception` which
inherits from `StandardError`.

GH issue: [#137](https://github.com/gocardless/hutch/issues/137).


### Pluggable (Negative) Acknowledge Handlers

Hutch now can be configured to use a user-provided
object(s) to perform acknowledgement on consumer exceptions.

For example, this is what the default handler looks like:

``` ruby
require 'hutch/logging'
require 'hutch/acknowledgements/base'

module Hutch
  module Acknowledgements
    class NackOnAllFailures < Base
      include Logging

      def handle(delivery_info, properties, broker, ex)
        prefix = "message(#{properties.message_id || '-'}): "
        logger.debug "#{prefix} nacking message"

        broker.nack(delivery_info.delivery_tag)

        # terminates further chain processing
        true
      end
    end
  end
end
```

Handlers are configured similarly to exception notification handlers,
via `:error_acknowledgements` in Hutch config.

Contributed by <NAME>.

GH issue: [#177](https://github.com/gocardless/hutch/pull/177).


### Configurable Exchange Properties

`:mq_exchange_options` is a new config option that can be used
to provide a hash of exchange attributes (durable, auto-delete).
The options will be passed directly to Bunny.

Contributed by <NAME>.

GH issue: [#170](https://github.com/gocardless/hutch/pull/170).


### Bunny Update

Bunny is updated to 2.2.1.


{'fraction_non_alphanumeric': 0.10457038391224863, 'fraction_numerical': 0.016087751371115174, 'mean_word_length': 4.020183486238532, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2582221', 'n_tokens_mistral': 888, 'n_tokens_neox': 794, 'n_words': 258}