Ruby RabbitMQ clients blog

News and updates about various Ruby clients for RabbitMQ

Bunny 0.10.0 Is Released

TL;DR

Bunny 0.10.0 is released to rubygems.org.

This is a usability improvement release that is one breaking API change with 0.9.x.

We encourage all Bunny users to upgrade to it.

Changes between Bunny 0.9.8 and 0.10.0

Safe[r] basic.ack, basic.nack and basic.reject implementation

Previously if a channel was recovered (reopened) by automatic connection recovery before a message was acknowledged or rejected, it would cause any operation on the channel that uses delivery tags to fail and cause the channel to be closed.

To avoid this issue, every channel keeps a counter of how many times it has been reopened and marks delivery tags with them. Using a stale tag to ack or reject a message will produce no method sent to RabbitMQ. Note that unacknowledged messages will be requeued by RabbitMQ when connection goes down anyway.

This involves an API change: Bunny::DeliveryMetadata#delivery_tag is now an instance of a class that responds to #tag and #to_i and is accepted by Bunny::Channel#ack and related methods.

Integers are still accepted by the same methods.

Full change log can be found on GitHub.

Michael on behalf of the Ruby RabbitMQ Clients Team