Ruby RabbitMQ clients blog

News and updates about various Ruby clients for RabbitMQ

Bunny 2.9.1 Is Released

TL;DR

Bunny 2.9.1 is released to rubygems.org.

2.9.1 is a minor feature release that drops support for Ruby 2.2 and earlier.

Changes between Bunny 2.9.0 and 2.9.1 (Jan 11th, 2018)

Default CA Certificate Paths are Respected Again

GitHub issue: #539.

Contributed by Carl Hörberg.

Changes between Bunny 2.8.0 and 2.9.0 (Jan 8th, 2018)

Ruby 2.2 Requirement

Bunny now requires Ruby 2.2.

Support for Additional URI Query Parameters

GitHub issue: #534.

Contributed by Andrew Babichev.

Changes between Bunny 2.7.0 and 2.8.0 (Dec 18th, 2018)

This release has minor breaking public API changes.

Bunny::Channel#close on a Closed Channel Now Raises a Sensible Exception

Bunny::Channel#close on an already closed channel will now raise a sensible exception. If the channel was closed due to a channel-level protocol exception, that exception will be mentioned.

GitHub issue: #528, see 9df7cb for details.

JRuby 9K Compatibility

A JRuby 9K compatibility issue was corrected by Marian Posăceanu. Note that JRuby users are recommended to use March Hare, a JRuby-oriented client, instead of Bunny.

GitHub issue: #529

Connection Exceptions are Logged as Warning with Automatic Recovery

When automatic recovery is enabled, connection errors are now logged as warnings and not errors.

Contributed by Merten Falk.

GitHub issue: #531

Server Heartbeat Value as a String

It is now possible to specify a server-defined heartbeat value as a string ("server"), not just a symbol. This makes it easier to load settings from YAML files.

Contributed by Tyrone Wilson.

GitHub issue: #524

Changes between Bunny 2.7.0 and 2.7.1 (Sep 25th, 2017)

Sensible Socket Read Timeouts When RabbitMQ is Configured to Disabled Heartbeats

Bunny now correctly handles scenarios where server is configured to disable heartbeats (which is a terrible idea, don’t do it!)

GitHub issue: #519.

Bunny::Channel#basic_get Usability

Bunny::Channel#basic_get invoked with a non-existent queue now throws a channel exception instead of a generic operation timeout.

GitHub issue: #518.

Spec Suite Improvements

BUNNY_CERTIFICATE_DIR environment variable now can be used to override local CA and client certificate/key pair directory. The directory is expected to be the result directory generated by the basic tls-gen profile.

TLSv1.0 is no longer used in tests because it’s being disabled by default by more and more installations as it has known vulnerabilities and is no longer considered to be acceptable by several compliance standards (e.g. PCI DSS).

Improved Synchronisation for channel.close Handlers

channel.close handler will now acquire a lock . This avoids concurrency hazards in some rare scenarios when a channel is closed due a protocol exception by the server and concurrently opened by user code at the same time.

More Meaningful Error Messages in Bunny::Session#create_channel

Sometimes users attempt to open a channel on a connection that isn’t connected yet because Bunny::Session#start was never invoked.

Bunny::Session#create_channel will now provide a more sensible exception message in those cases.

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.7.0 Is Released

TL;DR

Bunny 2.7.0 is released to rubygems.org.

2.7.0 is a maintenance release that introduces a couple of minor breaking changes.

In case your applications use Date/Time/DateTime serialisation with Bunny, all of them must upgraded to 2.7.0 at the same time.

Changes between Bunny 2.6.x and 2.7.0 (May 11th, 2017)

amq-protocol Update

Minimum amq-protocol version is now [2.2.0]](https://github.com/ruby-amqp/amq-protocol/blob/master/ChangeLog.md#changes-between-210-and-220-may-11th-2017) which includes a change in how timestamps are encoded.

Bunny::ContinuationQueue#poll Less Prone to Race Conditions

Bunny::ContinuationQueue#poll was reworked with feedback from Joseph Wong.

GitHub issue: #462

Recovery Attempt Counting Strategy Changed

Previous behehavior is not unreasonable but is not what many users and even RabbitMQ team members come to expect. Therefore it can be considered a bug.

Previously a reconnection counter was preserved between successful recoveries. This made the integration test that uses server-sent connection.close possible.

With this change, the counter is reset after successful reconnection but there’s an option to go back to the original behavior. We also do a hell of a lot more logging.

GitHub issue: #408

Absolute Windows File Paths are No Longer treated as Inline Certs

Contributed by Jared Smartt.

GitHub issue: #492.

Opening a Channel on an Intentionally Closed Connection Immediately Raises an Exception

Contributed by Alessandro Verlato.

GitHub issue: #465

Bunny::ConsumerWorkPool#shutdown Terminates Early When It’s Safe to Do So

Bunny::ConsumerWorkPool#shutdown(true) waited for consumer shutdown even if the pool wasn’t active (there were no consumers on its channel).

GitHub issue: #438.

Retry on new Ruby 2.1+ variations of EAGAIN, EWOULDBLOCK

GitHub issue: #456

Do Not Modify Host Arrays

Bunny now can work with frozen host arrays.

GitHub issue: #446

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.6.6 Is Released

TL;DR

Bunny 2.6.6 is released to rubygems.org.

2.6.6 is a maintenance release.

Changes between Bunny 2.6.5 and 2.6.6 (May 11th, 2017)

Connection Recovery Improvements

System call exceptions now will trigger connection recovery.

Contributed by Alessandro Verlato.

GitHub issue: #491.

Changes between Bunny 2.6.4 and 2.6.5 (April 15th, 2017)

Absolute Windows File Paths are No Longer treated as Inline Certs

Contributed by Jared Smartt.

GitHub issue: #492.

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.6.4 Is Released

TL;DR

Bunny 2.6.4 is released to rubygems.org.

2.6.4 is a maintenance release.

Changes between Bunny 2.6.3 and 2.6.4

Bunny::ContinuationQueue#poll Less Prone to Race Conditions

Bunny::ContinuationQueue#poll was reworked with feedback from Joseph Wong.

GitHub issue: #462

Recovery Attempt Counting Strategy Changed

Previous behehavior is not unreasonable but is not what many users and even RabbitMQ team members come to expect. Therefore it can be considered a bug.

Previously a reconnection counter was preserved between successful recoveries. This made the integration test that uses server-sent connection.close possible.

With this change, the counter is reset after successful reconnection but there’s an option to go back to the original behavior. We also do a hell of a lot more logging.

GitHub issue: #408

Opening a Channel on an Intentionally Closed Connection Immediately Raises an Exception

Contributed by Alessandro Verlato.

GitHub issue: #465

Changes between Bunny 2.6.2 and 2.6.3

Retry on new Ruby 2.1+ variations of EAGAIN, EWOULDBLOCK

GitHub issue: #456

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 3.0.0 Is Released

TL;DR

March Hare 3.0.0 is released to rubygems.org.

With this release March Hare switched to RabbitMQ Java client 4.x under the hood.

Changes Between 2.22.0 and 3.0.0 (February 20th, 2017)

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to the final version of 4.1.0.

Changes Between 2.21.0 and 2.22.0 (January 14th, 2017)

Convert Long Protocol Strings to java.lang.String

GitHub issue: #109

Contributed by Andrew Cholakian.

Changes Between 2.20.0 and 2.21.0 (November 24th, 2016)

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to the final version of 3.6.6.

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

Bunny 2.6.2 Is Released

TL;DR

Bunny 2.6.2 is released to rubygems.org.

2.6.2 is a maintenance release.

Changes between Bunny 2.6.2 and 2.6.3

Retry on new Ruby 2.1+ variations of EAGAIN, EWOULDBLOCK

GitHub issue: #456

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.20.0 Is Released

TL;DR

March Hare 2.20.0 is released to rubygems.org.

This is a maintenance release.

Changes Between 2.19.0 and 2.20.0 (November 2nd, 2016)

Connection Recovery Should Retry on Protocol Handshake Timeout

When an intermediary such as HAproxy with no backends online (or a problematic server node) doesn’t respond to a protocol header sent to it, RabbitMQ Java client will throw a generic operation timeout exception because the heartbeat mechanism is not yet enabled (it has not yet negotiated a timeout value for it!)

March Hare should handle this exception and retry, as if it was an I/O or skipped heartbeats exception.

Kudos to Andrew Cholakian and Jordan Sissel for digging this issue out.

GitHub issues: #107, logstash-plugins/logstash-input-rabbitmq#76

Changes Between 2.18.0 and 2.19.0 (October 26th, 2016)

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to a milestone version of 3.6.6 to include a number of bug fixes early.

Thread Pool Leak

GitHub issue: #97.

Contributed by Michael Reis.

Removed Unused Thread Pool

March Hare relies on RabbitMQ Java client for consumer dispatch but one (unused) thread pool was still instantiated.

GitHub issue: #96.

Contributed by Ivo Anjo.

Channel Allocation Failure Throws an Exception

GitHub issue: #98.

Contributed by Michael Reis.

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

Bunny 2.6.1 Is Released

TL;DR

Bunny 2.6.1 is released to rubygems.org.

2.6.1 is a maintenance release.

Changes between Bunny 2.6.0 and 2.6.1

Bunny::ConsumerWorkPool#shutdown Terminates Early When It’s Safe to Do So

Bunny::ConsumerWorkPool#shutdown(true) waited for consumer shutdown even if the pool wasn’t active (there were no consumers on its channel).

GitHub issue: #438.

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.6.0 Is Released

TL;DR

Bunny 2.6.0 is released to rubygems.org.

2.6.0 is a maintenance release.

Changes between Bunny 2.5.0 and 2.6.0

Graceful Shutdown of Consumers

Consumer work pool will now allow for a grace period before stopping pool threads so that delivery processing in progress can have a chance to finish.

GitHub issue: #437

Contributed by Stefan Sedich.

Bunny::Channel#wait_for_confirms Now Throws When Used on a Closed Channel

GitHub issue: #428

Contributed by Dimitar Dimitrov.

Race Condition Eliminated in Bunny::Channel#wait_for_confirms

GitHub issue: #424

Contributed by Dimitar Dimitrov.

More Defensive Consumer Work Pool

Bunny::ConsumerWorkPool#join and Bunny::ConsumerWorkPool#pause no longer fails with a NoMethodError on nil when executed on a work pool that doesn’t have active threads (consumers).

This change is largely cosmetic and won’t affect the majority of of projects in any way.

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.5.1 Is Released

TL;DR

Bunny 2.5.1 is released to rubygems.org.

2.5.1 is a maintenance release.

Changes between Bunny 2.5.0 and 2.5.1

More Defensive Consumer Work Pool

Bunny::ConsumerWorkPool#join and Bunny::ConsumerWorkPool#pause no longer fails with a NoMethodError on nil when executed on a work pool that doesn’t have active threads (consumers).

This change is largely cosmetic and won’t affect the majority of of projects in any way.

Full Change Log

Full change log can be found on GitHub.

About the Author

Michael maintains Bunny and several other RabbitMQ client libraries.