This is a JRuby-specific bug fix release.
We encourage all Bunny users to upgrade to it.
Changes between Bunny 1.0.0 and 1.0.1
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).
This is the 1.0.0 GA release, a major milestone for Bunny. It is
100% backwards compatible with 0.10.x.
Finally 1.0.0
Bunny is not a new library. Started in early
2009 by Chris Duncan, it was full of limitations for a few
years. However, it also was the easiest Ruby client to use and did not
have some inherent limitations of amqp gem.
In 2012 and 2013, Bunny pretty much rewritten from scratch for the
0.9.0 release to address the limitation, as well as redesign it for
the multicore CPUs age. In addition, documentation
guides were ported from amqp gem. Dozens
refinement releases and a few RCs later, it is in a good shape to go
1.0.
Since 0.9.0 shipped, Bunn has being adopted by many commercial users
and fairly mature open source projects, such as
Hutch.
Bunny::AuthenticationFailureError is a new auth failure exception
that subclasses Bunny::PossibleAuthenticationFailureError for
backwards compatibility.
As such, Bunny::PossibleAuthenticationFailureError’s error message
has changed.
This extension is available in RabbitMQ 3.2+.
Bunny::Session#exchange_exists?
Bunny::Session#exchange_exists? is a new predicate that makes it
easier to check if a exchange exists.
It uses a one-off channel and exchange.declare with passive set to true
under the hood.
Bunny::Session#queue_exists?
Bunny::Session#queue_exists? is a new predicate that makes it
easier to check if a queue exists.
It uses a one-off channel and queue.declare with passive set to true
under the hood.
Inline TLS Certificates and Keys
It is now possible to provide inline client
certificate and private key (as strings) instead
of filesystem paths. The options are the same:
:tls which, when set to true, will set SSL context up and switch to TLS port (5671)
:tls_cert which now can be a client certificate (public key) in PEM format
:tls_key which now can be a client key (private key) in PEM format
:tls_ca_certificates which is an array of string paths to CA certificates in PEM format
Bunny::AuthenticationFailureError is a new auth failure exception
that subclasses Bunny::PossibleAuthenticationFailureError for
backwards compatibility.
As such, Bunny::PossibleAuthenticationFailureError’s error message
has changed.
This extension is available in RabbitMQ 3.2+.
Bunny::Session#exchange_exists?
Bunny::Session#exchange_exists? is a new predicate that makes it
easier to check if a exchange exists.
It uses a one-off channel and exchange.declare with passive set to true
under the hood.
Bunny::Session#queue_exists?
Bunny::Session#queue_exists? is a new predicate that makes it
easier to check if a queue exists.
It uses a one-off channel and queue.declare with passive set to true
under the hood.
Inline TLS Certificates and Keys
It is now possible to provide inline client
certificate and private key (as strings) instead
of filesystem paths. The options are the same:
:tls which, when set to true, will set SSL context up and switch to TLS port (5671)
:tls_cert which now can be a client certificate (public key) in PEM format
:tls_key which now can be a client key (private key) in PEM format
:tls_ca_certificates which is an array of string paths to CA certificates in PEM format
This release is a release candidate of 2.0 that introduces another
usability improvement.
2.0 should be production ready from the stability perspective but has
breaking API changes.
Changes Between 2.0.0-rc2 and 2.0.0-rc3
Consumer Work Pool Tuning Improvements
MarchHare 1.x used to maintain a separate executor (thread pool) per non-blocking
consumer. This is not optimal and reimplements the wheel RabbitMQ Java client
already has invented: it dispatches consumer methods in a thread pool maintained
by every connection.
Instead of maintaining its own executor, MarchHare now relies on the Java client
to do the job. The key difference is that 1.x versions used to maintain
a thread pool per channel while 2.x has a thread pool per connection.
rc3 introduces an easier way to configure the executor: it is now sufficient
to only provide pool size. For example:
1
MarchHare.connect(:thread_pool_size=>16)
It is still possible to override the executor when opening a connection by
providing an executor factory (any Ruby callable):
This release includes a couple of usability improvements, internal
code reorganization (amq-client is no longer used), amq-protocol
update and more long time deprecated API elements removed.
All users are encouraged to upgrade.
Changes Between 1.0.0 and 1.1.0
amq-protocol Update
Minimum amq-protocol version is now 1.8.0 which includes
a bug fix for messages exactly 128 Kb in size.
AMQ::Client is Removed
amq-client has been incorporated into amqp gem. AMQ::Client and related
modules are no longer available.
AMQP::Channel#confirm_select is Now Delayed
AMQP::Channel#confirm_select is now delayed until after the channel
is opened, making it possible to use it with the pseudo-synchronous
code style.
RabbitMQ Extensions are Now in Core
amqp gem has been targeting RabbitMQ exclusively for a while now.
RabbitMQ extensions are now loaded by default and will be even more
tightly integrated in the future.
AMQP::Channel.default is Removed
AMQP::Channel.default and method_missing-based operations on the default
channel has been removed. They’ve been deprecated since 0.6.
AMQP::Channel#rpc is Removed
AMQP::RPC-related code has been removed. It has been deprecated
since 0.7.
AMQP::Channel.on_error is Removed
Long time deprecated AMQP::Channel.on_error is removed.