Ruby RabbitMQ clients blog

News and updates about various Ruby clients for RabbitMQ

March Hare 2.1.2 Is Released

TL;DR

March Hare 2.1.2 is released to rubygems.org.

This is a bug fix release.

Changes Between 2.1.1 and 2.1.2

Internal Exchanges

Exchanges now can be declared as internal:

1
2
ch = conn.create_channel
x  = ch.fanout("marchhare.tests.exchanges.internal", :internal => true)

Internal exchanges cannot be published to by clients and are solely used for Exchange-to-Exchange bindings and various plugins but apps may still need to bind them. Now it is possible to do so with March Hare.

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

TL;DR

Bunny 1.1.2 is released to rubygems.org.

This is a usability release.

Changes between Bunny 1.1.1 and 1.1.2

Internal Exchanges

Exchanges now can be declared as internal:

1
2
ch = conn.create_channel
x  = ch.fanout("bunny.tests.exchanges.internal", :internal => true)

Internal exchanges cannot be published to by clients and are solely used for Exchange-to-Exchange bindings and various plugins but apps may still need to bind them. Now it is possible to do so with Bunny.

Full Change Log

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

Amqp Gem 1.3.0 Is Released

TL;DR

amqp gem 1.3.0 is released to rubygems.org.

This release includes a couple of minor features.

Changes Between 1.2.0 and 1.3.0

Exchange-to-Exchange Bindings Support

amqp gem now supports Exchange-to-Exchange Bindings, a RabbitMQ extension.

AMQP::Exchange#bind and AMQP::Exchange#unbind work very much like AMQP::Queue#bind and AMQP::Queue#unbind, with the argument exchange being the source one.

Contributed by Stefan Kaes.

Internal Exchange Declaration

amqp gem now supports declaration of internal exchanges (used via exchange-to-exchange bindings, cannot be published to by clients).

To declare an exchange as internal, add :internal => true to declaration options.

Contributed by Stefan Kaes.

Initial Connection Failures Retries

Set connection status to closed on connection failure, which means connection retries succeed.

Contributed by Marius Hanne.

Full Change Log

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

March Hare 2.1.1 Is Released

TL;DR

March Hare 2.1.1 is released to rubygems.org.

This is a bug fix release.

Changes Between 2.1.0 and 2.1.1

Custom Executor Shutdown

MarchHare::Session#close now will always shut down the custom executor service it was using, if any.

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

TL;DR

Bunny 1.1.1 is released to rubygems.org.

This is a usability release.

Changes between Bunny 1.0.0 and 1.1.1

Uncaught Consumer Exceptions

Uncaught consumer exceptions are now handled by uncaught exceptions handler that can be defined per channel:

1
2
3
ch.on_uncaught_exception do |e, consumer|
  # ...
end

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

Amqp Gem 1.2.1 Is Released

TL;DR

amqp gem 1.2.1 is released to rubygems.org.

This release is 100% backwards compatible.

Changes Between 1.2.0 and 1.2.1

Initial Connection Failures Retries

Set connection status to closed on connection failure, which means connection retries succeed.

Contributed by Marius Hanne.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

March Hare 2.1.0 Is Released

TL;DR

March Hare 2.1.0 is released to rubygems.org.

2.1 is a follow-up release to 2.0 which introduces one usability improvement. Please consult the change log to learn about the changes.

Changes Between 2.0.0 and 2.1.0

Full Channel State Recovery

Channel recovery now involves recovery of publisher confirms and transaction modes.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

Hutch 0.7.0 Is Released

TL;DR

Hutch 0.7.0 is released to rubygems.org.

This release introduces several minor new features.

Changes Between 0.6.0 and 0.7.0

Optional HTTP API Use

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 Arguments for Hutch::Broker#publish

Extra options passed to Hutch::Broker#publish will now be propagated.

Content-Type for Messages

Messages published with Hutch now have content type set to application/json.

Greater Heartbeat Interval

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).

Custom Queue Names

It is now possible to specify an optional queue name:

1
2
3
4
5
6
7
8
9
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 for Publishers

Global properties can now be specified for publishing:

1
2
3
Hutch.global_properties = proc {
  { app_id: 'api', headers: { request_id: RequestId.request_id } }
}

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Hutch maintainers Team.

Amqp Gem 1.2.0 Is Released

TL;DR

amqp gem 1.2.0 is released to rubygems.org.

This release is 100% backwards compatible.

Changes Between 1.1.0 and 1.2.0

Authentication Failure Notification Support

amqp gem now supports Authentication Failure Notification. Public API for authentication failure handling hasn’t changed.

This extension is available in RabbitMQ 3.2+.

basic.qos Recovery Fix

basic.qos setting will now be recovered first thing after channel recovery, to the most recent value passed via :prefetch channel constructor option or AMQP::Channel#prefetch.

amq-protocol Update

Minimum amq-protocol version is now 1.9.2.

Automatic Recovery Fix

Automatic connection recovery now correctly recovers bindings again.

Contributed by Devin Christensen.

65535 Channels Per Connection

amqp gem now allows for 65535 channels per connection and not Ruby process.

Contributed by Neo (http://neo.com) developers.

channel.close is Delayed Until After Channel is Open

This eliminates a race condition in some codebases that use very short lived channels.

ConnectionClosedError is Back

ConnectionClosedError from amq-client is now defined again.

Fixed Exceptions in AMQP::Exchange#handle_declare_ok

AMQP::Exchange#handle_declare_ok no longer raises an exception about undefined methods #anonymous? and #exchange.

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team

Bunny 1.1.0 Is Released

TL;DR

Bunny 1.1.0 is released to rubygems.org.

This is a usability release that adds a few minor features to what’s in 1.0.x. We encourage all Bunny users to upgrade to it.

Changes between Bunny 1.0.0 and 1.1.0

Synchronized Session#create_channel and Session#close_channel

Full bodies of Bunny::Session#create_channel and Bunny::Session#close_channel are now synchronized, which makes sure concurrent channel.open and subsequent operations (e.g. exchange.declare) do not result in connection-level exceptions (incorrect connection state transitions).

Corrected Recovery Log Message

Bunny will now use actual recovery interval in the log.

Contributed by Chad Fowler.

Full Channel State Recovery

Channel recovery now involves recovery of publisher confirms and transaction modes.

TLS Without Peer Verification

Bunny now successfully performs TLS upgrade when peer verification is disabled.

Contributed by Jordan Curzon.

Bunny::Session#with_channel Ensures the Channel is Closed

Bunny::Session#with_channel now makes sure the channel is closed even if provided block raises an exception

Contributed by Carl Hoerberg.

Channel Number = 0 is Rejected

Bunny::Session#create_channel will now reject channel number 0.

Single Threaded Mode Fixes

Single threaded mode no longer fails with

1
undefined method `event_loop'

connection.tune.channel_max No Longer Overflows

connection.tune.channel_max could previously be configured to values greater than 216 - 1 (65535). This would result in a silent overflow during serialization. The issue was harmless in practice but is still a bug that can be quite confusing.

Bunny now caps max number of channels to 65535. This allows it to be forward compatible with future RabbitMQ versions that may allow limiting total # of open channels via server configuration.

amq-protocol Update

Minimum amq-protocol version is now 1.9.0 which includes bug fixes and performance improvements for channel ID allocator.

Thread Leaks Fixes

Bunny will now correctly release heartbeat sender when allocating a new one (usually happens only when connection recovers from a network failure).

Versioned Delivery Tag Fix

Versioned delivery tag now ensures all the arguments it operates (original delivery tag, atomic fixnum instances, etc) are coerced to Integer before comparison.

GitHub issues: #171.

User-Provided Loggers

Bunny now can use any logger that provides the same API as Ruby standard library’s Logger:

1
2
3
4
5
6
require "logger"
require "stringio"

io = StringIO.new
# will log to `io`
Bunny.new(:logger => Logger.new(io))

Default CA’s Paths Are Disabled on JRuby

Bunny uses OpenSSL provided CA certificate paths. This caused problems on some platforms on JRuby (see jruby/jruby#155).

To avoid these issues, Bunny no longer uses default CA certificate paths on JRuby (there are no changes for other Rubies), so it’s necessary to provide CA certificate explicitly.

Fixes CPU Burn on JRuby

Bunny now uses slightly different ways of continuously reading from the socket on CRuby and JRuby, to prevent abnormally high CPU usage on JRuby after a certain period of time (the frequency of EWOULDBLOCK being raised spiked sharply).

Full change log can be found on GitHub.

About the Author

Michael on behalf of the Ruby RabbitMQ Clients Team