No changes yet.
Contributed by Matt Thompson.
Hutch will no longer try to daemonize its process on JRuby (since it is not supported) and will emit a warning instead.
Contributed by Olle Jonsson.
Hutch::Worker
now accepts a list of callables that are invoked
after queue setup.
Contributed by Kelly Stannard.
Hutch::Broker
was refactored with some bits extracted into separate
classes or methods, making them easier to override.
Contributed by Aleksandar Ivanov and Ryan Hosford.
:consumer_pool_abort_on_exception
is a new option
(defaults to false
) which defines whether Bunny's
consumer work pool threads should abort on exception.
The option is ignored on JRuby.
Contributed by Seamus Abshere.
Received messages used to be logged using severity level INFO. This has been lowered to DEBUG.
Contributed by Jesper Josefsson.
Olle Jonsson and Kelly Stannard have contributed multiple internal improvements that have no behaviour changes.
Contributed by Jesper Josefsson.
Rails application detection now won't produce false positives
for applications that include config/environment.rb
. Instead,
bin/rails
and script/rails
are used.
Contributed by @bisusubedi.
Contributed by Jesper Josefsson and Olle Jonsson.
Hutch::Exception
now inherits from Bunny::Exception
which
inherits from StandardError
.
GH issue: #137.
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:
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 Derek Kastner.
GH issue: #177.
: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 (or March Hare, when
running on JRuby).
Contributed by Derek Kastner.
GH issue: #170.
Bunny is updated to 2.2.1.
Hutch now supports pluggable serialisers: see Hutch::Serializer::JSON
for
an example. Serialiser is configured via Hutch config as a Ruby
class.
Contributed by Dmitry Galinsky.
Hutch now depends on multi_json 1.11.x
.
Bunny is updated to 2.2.0.
:mq_tls_ca_certificates
and :mq_verify_peer
options will now be passed on to Bunny as :tls_ca_certificates
and :verify_peer
respectively.
Contributed by Kennon Ballou.
Hutch will now use March Hare when running on JRuby. This will yield significant throughput and core utilisation improvements for workloads with many and/or busy consumers.
Contributed by Teodor Pripoae.
:consumer_pool_size
is a new option (defaults to 1
) which defines
Bunny consumer work pool size.
Contributed by Derek Kastner.
:client_logger
is a new option that allows
for configuring loggerd used by Bunny, the underlying
RabbitMQ client library.
Contributed by Nate Salisbury.
Fixes an issue with NoMethodError
in Hutch::Config
.
Hutch now automatically enables TLS and changes default port
when URI scheme is amqps
.
Contributed by Carl Hörberg.
Hutch now uses HashWithIndifferentAccess
internally
to reduce use of symbols (which are not garbage collected
by widely used Ruby versions).
Contributed by Teodor Pripoae.
Contributed by Nate Salisbury.
Ruby 1.9 is no longer supported by Hutch (and soon Bunny 2.0). 1.9 is also no longer maintained by the Ruby core team.
Allow to set custom arguments per consumers by using the arguments
setter.
Arguments are usually used by rabbitmq plugins or to set queue policies. You can
find a list of supported arguments here.
Contributed by Pierre-Louis Gottfrois.
Allow to track message processing by using the :tracer
config option,
the value should be a class (or fully-qualified string name of a class) that
implements the tracing interface.
A tracer that performs NewRelic instrumentation ships with Hutch and requires New Relic gem to be loaded.
Contributed by Mirosław Nagaś.
Consumers can now call a logger method to write to Hutch's log.
Contributed by Matty Courtney
Socket read and write timeouts are now configurable using
the read_timeout
and write_timeout
options, respectively.
Contributed by Chris Barton.
...as opposed to Ruby object printing.
Contributed by Andrew Morton.
Config now supports a new option: :heartbeat
, which is passed
on to Bunny.
Contributed by Simon Taranto.
Contributed by Daniel Farrell.
Hutch.connected?
no longer relies on an ivar and always returns
an up-to-date value.
Contributed by Pierre-Louis Gottfrois.
HTTP API use can be disabled for consumers using the :enable_http_api_use
config
option (defaults to true).
Hutch no longer relies on Kernel#autoload
to load its key
modules and classes.
Contributed by Pierre-Louis Gottfrois.
hutch --version
no longer fails with an exception.
Contributed by Olle Jonsson.
All Hutch exceptions now inherit from Hutch::Exception
.
Contributed by Pierre-Louis Gottfrois.
:force_publisher_confirms
is a new configuration option that forces Hutch.publish
to wait
for a confirm for every message published. Note that this will cause a significant drop in throughput:
Hutch::Config.set(:force_publisher_confirms, true)
Hutch::Broker#confirm_select
and Hutch::Broker#wait_for_confirms
are new public API methods
that delegate to their respective Bunny::Channel
counterparts. Hutch::Broker#confirm_select
can be used to handle confirms with a callback instead of waiting:
broker.confirm_select do |delivery_tag, multiple, nack|
# ...
end
Bunny is updated to 1.6.0.
Hutch now supports a new configuration key, :uri
, which allows
connection configuration via a URI.
Note that since the URI has to include credentials, this option is not available on the command line.
Bunny is updated to 1.5.1
, which mitigates the POODLE attack
by disabling SSL 3.0 where possible.
Error handlers will now have access to message payload.
Contributed by Daniel Farrell.
Exceptions in error handlers no longer prevent messages from being
basic.nack
-ed.
:pidfile
is a new configuration option that stores Hutch process
PID in a file at provided path.
Contributed by Rustam Sharshenov.
Bunny's delivery_info
, properties
and payload are now accessible on Hutch::Message
.
Contributed by gregory.
Hutch::Config
constructor now accepts an extra hash of optional
configuration parameters.
Contributed by Ignazio Mostallino.
Hutch will no longer attempt to register signal traps for signals not supported by the environment (e.g. on by certain OSes).
Contributed by Tobias Matthies.
Hutch now properly passes client TLS key and certificate to Bunny.
Contributed by Eric Nelson.
Bunny is updated to 1.2.x which should offer much better latency for workloads with lots of small messages published frequently.
Hutch::CLI#run
now accepts a parameter and is easier to use
in automated tests.
Uncaught exceptions in consumers now result in Hutch rejecting
messages (deliveries) using basic.nack
. This way they are dead lettered.
Contributed by Garrett Johnson.
hutch/consumer.rb
no longer fails to load with the
apps that do not require "set"
.
Contributed by Garrett Johnson.
Namespaces now can include any characters that are valid in RabbitMQ queue names.
Contributed by Garrett Johnson.
It is now possible to configure basic.qos
(aka channel prefetch) setting
used by Hutch using the :channel_prefetch
config key.
Hutch now elides passwords from logs.
It is now possible to make Hutch not use RabbitMQ HTTP API (e.g. when the RabbitMQ management plugin that provides it is not available).
Extra options passed to Hutch::Broker#publish
will now be propagated.
Messages published with Hutch now have content type set
to application/json
.
Hutch now uses heartbeat interval of 30, so heartbeats won't interfere with transfers of large messages over high latency networks (e.g. between AWS availability regions).
It is now possible to specify an optional queue name:
class FailedPaymentConsumer
include Hutch::Consumer
consume 'gc.ps.payment.failed'
queue_name 'failed_payments'
def process(message)
mark_payment_as_failed(message[:id])
end
end
Global properties can now be specified for publishing:
Hutch.global_properties = proc {
{ app_id: 'api', headers: { request_id: RequestId.request_id } }
}
- Metadata can now be passed in to
#publish
- Raise an exception when publishing fails
- Support for the
--mq-tls-key
and--mq-tls-cert
configuration options.
- No exception raised when hutch is run with no consumers. Instead, a warning is logged.
- Internal refactoring: use Bunny's shiny
ConsumerWorkPool#threads
attr_reader.
- Friendlier Message#inspect, doesn't spew out detailed bunny info.
- More autoloading tweaks, all internal modules are now autoloaded.
- Autoload the Broker module, which was missed in the previous release.
- Autoload internal modules. Fixes regression where the
Config
module was not available by simplyrequire
inghutch
.
- Support for loading configuration from a file, specified with the
--config
command line option.
- Add
--[no-]autoload-rails
flag to optionally disable the autoloading of Rails apps in the current directory
- Fix inconsistency with
mq-tls
option
- Support for connecting to RabbitMQ with TLS/SSL. There are two new
configuration options :
mq-tls
andmq-api-ssl
. - JSON message parsing errors are now handled properly.
- Relax Bunny dependency specification
- Initial release