Ruby RabbitMQ clients blog

News and updates about various Ruby clients for RabbitMQ

Bunny 2.0.0 Is Released

TL;DR

Bunny 2.0.0 is released to rubygems.org.

2.0.0 is a minor feature and bug fix release that drops Ruby 1.9 and 1.8 support.

Changes between Bunny 1.7.0 and 2.0.0

Bunny 2.0 doesn’t have any breaking API changes but drops Ruby 1.8 and 1.9 (both EOL’ed) support, hence the version.

Minimum Required Ruby Version is 2.0

Bunny 2.0 requires Ruby 2.0 or later.

Non-Blocking Writes

Bunny now uses non-blocking socket writes, uses a reduced number of writes for message publishing (frames are batched into a single write), and handles TCP back pressure from RabbitMQ better.

Contributed by Irina Bednova and Michael Klishin.

Reduced Timeout Use

Bunny::ContinuationQueue#poll no longer relies on Ruby’s Timeout which has numerous issues, including starting a new “interruptor” thread per operation, which is far from efficient.

Contributed by Joe Eli McIlvain and Carl Hörberg.

Capped Number of Connection Recovery Attempts

:recovery_attempts is a new option that limits the number of connection recovery attempts performed by Bunny. nil means “no limit”.

Contributed by Irina Bednova.

Bunny::Channel#basic_ack and Related Methods Improvements

Bunny::Channel#basic_ack, Bunny::Channel#basic_nack, and Bunny::Channel#basic_reject now adjust delivery tags between connection recoveries, as well as have a default value for the second argument.

Contributed by Wayne Conrad.

Logger Output Remains Consistent

Setting the @logger.progname attribute changes the output of the logger. This is not expected behaviour when the client provides a custom logger. Behaviour remains unchainged when the internally initialized logger is used.

Contributed by Justin Carter.

prefetch_count is Limited to 65535

Since basic.qos’s prefetch_count field is of type short in the protocol, Bunny must enforce its maximum allowed value to 2^16 - 1 to avoid confusing issues due to overflow.

Per-Consumer and Per-Channel Prefetch

Recent RabbitMQ versions support basic.qos global flag, controlling whether prefetch applies per-consumer or per-channel. Bunny Channel#prefetch now allows flag to be set as optional parameter, with the same default behaviour as before (per-consumer).

Contributed by tiredpixel.

Full Change Log

Full change log can be found on GitHub.

About the Author

Michael maintains Bunny and several other RabbitMQ client libraries.

Bunny 2.0.0-rc1 Is Released

TL;DR

Bunny 2.0.0-rc1 is released to rubygems.org.

2.0.0 is a minor feature and bug fix release that drops Ruby 1.9 and 1.8 support.

Changes between Bunny 1.7.0 and 2.0.0

Bunny 2.0 doesn’t have any breaking API changes but drops Ruby 1.8 and 1.9 (both EOL’ed) support, hence the version.

Minimum Required Ruby Version is 2.0

Bunny 2.0 requires Ruby 2.0 or later.

Reduced Timeout Use

Bunny::ContinuationQueue#poll no longer relies on Ruby’s Timeout which has numerous issues, including starting a new “interruptor” thread per operation, which is far from efficient.

Contributed by Joe Eli McIlvain and Carl Hörberg.

Bunny::Channel#basic_ack and Related Methods Improvements

Bunny::Channel#basic_ack, Bunny::Channel#basic_nack, and Bunny::Channel#basic_reject now adjust delivery tags between connection recoveries, as well as have a default value for the second argument.

Contributed by Wayne Conrad.

Logger Output Remains Consistent

Setting the @logger.progname attribute changes the output of the logger. This is not expected behaviour when the client provides a custom logger. Behaviour remains unchainged when the internally initialized logger is used.

Contributed by Justin Carter.

prefetch_count is Limited to 65535

Since basic.qos’s prefetch_count field is of type short in the protocol, Bunny must enforce its maximum allowed value to 2^16 - 1 to avoid confusing issues due to overflow.

Full Change Log

Full change log can be found on GitHub.

About the Author

Michael maintains Bunny and several other RabbitMQ client libraries.

March Hare 2.9.0 Is Released

TL;DR

March Hare 2.9.0 is released to rubygems.org.

This is primarily a bug fix release.

Changes Between 2.8.0 and 2.9.0

TLS Connection Fixes

TLS connections with an explicitly provided TLS version and PKCS12 certificate no longer fail. In addition, related connection have changed to

  • :tls (version as a string: TLSv1, TLSv1.1, TLSv1.2)
  • :tls_certificate_path: PKCS12 certificate path as a string
  • :tls_certificate_password: PKCS12 certificate password as a string

To quickly generate a PKCS12 certificate as well as CA and server certificate/key pair, see tls-gen.

URI Connections Fix

Host selector no longer breaks connections that use URIs.

GH issue: #73.

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.5.1.

Full Change Log

Please consult the change log to learn about the changes.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

Hutch 0.14.0 Is Released

TL;DR

Hutch 0.14.0 is released to rubygems.org.

This is a minor feature release.

Changes Between 0.13.0 and 0.14.0

Configurable Socket Timeouts

Socket read and write timeouts are now configurable using the read_timeout and write_timeout options, respectively.

Contributed by Chris Barton.

Logged Messages as Serialised as JSON

…as opposed to Ruby object printing.

Contributed by Andrew Morton.

Configurable Heartbeat

Config now supports a new option: :heartbeat, which is passed on to Bunny.

Contributed by Simon Taranto.

HoneyBadger Error Handler

Contributed by Daniel Farrell.

Hutch.connected? Now Returns Up-to-Date Value

Hutch.connected? no longer relies on an ivar and always returns an up-to-date value.

Contributed by Pierre-Louis Gottfrois.

Full Changelog

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Hutch maintainers Team.

Bunny 1.7.0 Is Released

TL;DR

Bunny 1.7.0 is released to rubygems.org.

1.7.0 is a minor feature release.

Changes between Bunny 1.6.0 and 1.7.0

TLS Peer Verification Enabled by Default

When using TLS, peer verification is now enabled by default. It is still possible to disable verification, e.g. for convenient development locally.

Peer verification is a means of protection against man-in-the-middle attacks and is highly recommended in production settings. However, it can be an inconvenience during local development. We believe it’s time to have the default to be more secure.

Contributed by Michael Klishin (Pivotal) and Andre Foeken (Nedap).

Higher Default Connection Timeout

Default connection timeout has been increased to 25 seconds. The older default of 5 seconds wasn’t sufficient in some edge cases with DNS resolution (e.g. when primary DNS server is down).

The value can be overriden at connection time.

Contributed by Yury Batenko.

Socket Read Timeout No Longer Set to 0 With Disabled Heartbeats

GH issue: #267.

JRuby Writes Fixes

On JRuby, Bunny reverts back to using plain old write(2) for writes. The CRuby implementation on JRuby suffers from I/O incompatibilities. Until JRuby

Bunny users who run on JRuby are highly recommended to switch to March Hare, which has nearly identical API and is significantly more efficient.

Bunny::Session#with_channel Synchornisation Improvements

Bunny::Session#with_channel is now fully synchronised and won’t run into COMMAND_INVALID errors when used from multiple threads that share a connection.

Full Change Log

Full change log can be found on GitHub.

About the Author

Michael maintains Bunny and several other RabbitMQ client libraries.

March Hare 2.8.0 Is Released

TL;DR

March Hare 2.8.0 is released to rubygems.org.

This is a minor feature release.

Changes Between 2.7.0 and 2.8.0

Support P12 Certificates for TLS Connections

It is now possible to use P12 certificates with the Bunny-like connection options:

  • :tls_key_cert (a file path)
  • :certificate_password (as a Ruby string)

Contributed by Simon Yu.

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.4.3.

Host List Selection Improvements

Host selection from the list is now randomised.

Contributed by Michael Ries.

Support for Consumer Callbacks with Arity < 0

Callbacks with arity < 0 now can be used delivery handlers. See Method#arity documentation for more info.

Contributed by Roman Lishtaba.

Full Change Log

Please consult the change log to learn about the changes.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

Hutch 0.13.0 Is Released

TL;DR

Hutch 0.13.0 is released to rubygems.org.

This is a minor feature release.

Change Between 0.12.0 and 0.13.0

HTTP API Can Be Disabled for Consumers

HTTP API use can be disabled for consumers using the :enable_http_api_use config option (defaults to true).

Full Changelog

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Hutch maintainers Team.

Hutch 0.12.0 Is Released

TL;DR

Hutch 0.12.0 is released to rubygems.org.

This is primarily a bug fix release.

Change Between 0.11.0 and 0.12.0

Explicit Requires

Hutch no longer relies on Kernel#autoload to load its key modules and classes.

Contributed by Pierre-Louis Gottfrois.

hutch –version No Longer Fails

1
hutch --version

no longer fails with an exception.

Contributed by Olle Jonsson.

Base Class for All Hutch Exceptions

All Hutch exceptions now inherit from Hutch::Exception.

Contributed by Pierre-Louis Gottfrois.

Full Changelog

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Hutch maintainers Team.

Hutch 0.11.0 Is Released

TL;DR

Hutch 0.11.0 is released to rubygems.org.

This release introduces a minor feature.

0.11.0 — Nov 14th, 2014

Publisher Confirms Support

: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:

1
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:

1
2
3
broker.confirm_select do |delivery_tag, multiple, nack|
  # ...
end

Full Changelog

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Hutch maintainers Team.