README.md in ears-0.8.1 vs README.md in ears-0.8.2
- old
+ new
@@ -90,11 +90,12 @@
```ruby
require 'ears/middlewares/json'
class MyConsumer < Ears::Consumer
# register the JSON middleware and don't symbolize keys (this can be omitted, the default is true)
+ # and nack the message on parsing error. This defaults to Proc.new { :reject }.
use Ears::Middlewares::JSON,
- on_error: Proc.new { :reject },
+ on_error: Proc.new { :nack },
symbolize_keys: false
def work(delivery_info, metadata, payload)
return ack unless payload['data'].nil? # this now just works
end