Skip to content

Releases: rabbitmq/rabbitmq-java-client

4.4.1

19 Dec 09:44
Compare
Choose a tag to compare

Changes between 4.4.0 and 4.4.1

This is a patch release that includes a bug fix. This release is backward-compatible with 4.3.0. Users of the 3.6.x and 4.x.x series are encouraged to use this version.

Fix client version property file name

A warning log message was emitted because of a misnamed file.

GitHub issue: #335

5.1.0

18 Dec 09:41
Compare
Choose a tag to compare

Changes between 5.0.0 and 5.1.0

This maintenance release catches up with new features and bug fixes from 4.3.0 and 4.4.0. It is compatible with 5.0.0. All users of 5.0.0 are encouraged to upgrade to this version. Users of previous version should check the 5.0.0 changelog for breaking changes.

Add property file-based initialization

It's now possible to use a property file to configure the ConnectionFactory (e.g. host, username, password, etc).

GitHub issue: #324

Add Java 9 module name

The Automatic-Module-Name: com.rabbitmq.client entry has been added to the JAR manifest, for interoperability with JDK 9 module system.

GitHub issue: #320

Get rid of read retry in NIO

The NIO mode used to use retries on network reading to make sure the outstanding frame would be completed in the current loop iteration. It now handle partial frames and moves on if a frame cannot be completed immediately. This behaviour is more consistent with NIO usage.

GitHub issue: #319

Load client version in a more reliable way

This could affect classpath-sensitive environments like OSGi.

GitHub issue: #334

Support Micrometer

The Java Client supports Micrometer through its MicrometerMetricsCollector implementation of MetricsCollector. Micrometer is an instrumentation facade, which supports popular metrics backends (Atlas, Graphite, Ganglia, Datadog, JMX, etc). Note Micrometer requires Java 8 or more. The Java Client 4.3.x still supports Java 6, but Micrometer support isn't usable on Java 6 and Java 7.

GitHub issue: #313

Make auto-recovery retry interval calculation pluggable

The RecoveryDelayHandler interface has been introduced to calculate the retry interval between each connection recovery attempt. The default strategy is still the same: a constant interval (5 seconds by default). The ExponentialBackoffDelayHandler implementation can be used to have an exponential retry interval.

Thanks to @vikinghawk for this contribution.

GitHub issue: #308

Handle several buffer underflow results in SslEngineByteBufferInputStream

Thanks to @dimas for this fix.

GitHub issue: #317

4.4.0

18 Dec 09:23
Compare
Choose a tag to compare

Changes between 4.3.0 and 4.4.0

This is a maintenance release that includes 2 new features and 2 bug fixes. This release is backward-compatible with 4.3.0. Users of the 3.6.x and 4.x.x series are encouraged to use this version.

Add property file-based initialization

It's now possible to use a property file to configure the ConnectionFactory (e.g. host, username, password, etc).

GitHub issue: #324

Add Java 9 module name

The Automatic-Module-Name: com.rabbitmq.client entry has been added to the JAR manifest, for interoperability with JDK 9 module system.

GitHub issue: #320

Get rid of read retry in NIO

The NIO mode used to use retries on network reading to make sure the outstanding frame would be completed in the current loop iteration. It now handle partial frames and moves on if a frame cannot be completed immediately. This behaviour is more consistent with NIO usage.

GitHub issue: #319

Load client version in a more reliable way

This could affect classpath-sensitive environments like OSGi.

GitHub issue: #334

5.1.0.RC1

11 Dec 13:09
Compare
Choose a tag to compare
5.1.0.RC1 Pre-release
Pre-release

Changes between 5.0.0 and 5.1.0.RC1

This is a pre-release for 5.1.0, a maintenance release that catches up with new features and bug fixes from 4.3.0 and 4.4.0. It is compatible with 5.0.0. All users of 5.0.0 are encouraged to test this pre-release. Users of previous version should check the 5.0.0 changelog for breaking changes.

Add property file-based initialization

It's now possible to use a property file to configure the ConnectionFactory (e.g. host, username, password, etc).

GitHub issue: #324

Add Java 9 module name

The Automatic-Module-Name: com.rabbitmq.client entry has been added to the JAR manifest, for interoperability with JDK 9 module system.

GitHub issue: #320

Get rid of read retry in NIO

The NIO mode used to use retries on network reading to make sure the outstanding frame would be completed in the current loop iteration. It now handle partial frames and moves on if a frame cannot be completed immediately. This behaviour is more consistent with NIO usage.

GitHub issue: #319

Load client version in a more reliable way

This could affect classpath-sensitive environments like OSGi.

GitHub issue: #334

Support Micrometer

The Java Client supports Micrometer through its MicrometerMetricsCollector implementation of MetricsCollector. Micrometer is an instrumentation facade, which supports popular metrics backends (Atlas, Graphite, Ganglia, Datadog, JMX, etc). Note Micrometer requires Java 8 or more. The Java Client 4.3.x still supports Java 6, but Micrometer support isn't usable on Java 6 and Java 7.

GitHub issue: #313

Make auto-recovery retry interval calculation pluggable

The RecoveryDelayHandler interface has been introduced to calculate the retry interval between each connection recovery attempt. The default strategy is still the same: a constant interval (5 seconds by default). The ExponentialBackoffDelayHandler implementation can be used to have an exponential retry interval.

Thanks to @vikinghawk for this contribution.

GitHub issue: #308

Handle several buffer underflow results in SslEngineByteBufferInputStream

Thanks to @dimas for this fix.

GitHub issue: #317

4.4.0.RC2

11 Dec 12:52
Compare
Choose a tag to compare
4.4.0.RC2 Pre-release
Pre-release

Changes between 4.3.0 and 4.4.0.RC2

This is a release candidate for 4.4.0, a maintenance release that includes 2 new features and 2 bug fixes. This pre-release is backward-compatible with 4.3.0.

Add property file-based initialization

It's now possible to use a property file to configure the ConnectionFactory (e.g. host, username, password, etc).

GitHub issue: #324

Add Java 9 module name

The Automatic-Module-Name: com.rabbitmq.client entry has been added to the JAR manifest, for interoperability with JDK 9 module system.

GitHub issue: #320

Get rid of read retry in NIO

The NIO mode used to use retries on network reading to make sure the outstanding frame would be completed in the current loop iteration. It now handle partial frames and moves on if a frame cannot be completed immediately. This behaviour is more consistent with NIO usage.

GitHub issue: #319

Load client version in a more reliable way

This could affect classpath-sensitive environments like OSGi.

GitHub issue: #334

4.4.0.RC1

27 Nov 09:35
Compare
Choose a tag to compare
4.4.0.RC1 Pre-release
Pre-release

Changes between 4.3.0 and 4.4.0.RC1

This is a release candidate for 4.4.0, a maintenance release that includes 2 new features and bug fix. This pre-release is backward-compatible with 4.3.0.

Add property file-based initialization

It's now possible to use a property file to configure the ConnectionFactory (e.g. host, username, password, etc).

GitHub issue: #324

Add Java 9 module name

The Automatic-Module-Name: com.rabbitmq.client entry has been added to the JAR manifest, for interoperability with JDK 9 module system.

GitHub issue: #320

Get rid of read retry in NIO

The NIO mode used to use retries on network reading to make sure the outstanding frame would be completed in the current loop iteration. It now handle partial frames and moves on if a frame cannot be completed immediately. This behaviour is more consistent with NIO usage.

GitHub issue: #319

4.3.0

20 Oct 13:34
Compare
Choose a tag to compare

Changes between 4.2.2 and 4.3.0

This maintenance release includes 2 new features and a bug fix. It's backward compatible with 4.2.x. Users of the 4.x.x and 3.6.x series are encouraged to use this release.

Support Micrometer

The Java Client supports Micrometer through its MicrometerMetricsCollector implementation of MetricsCollector. Micrometer is an instrumentation facade, which supports popular metrics backends (Atlas, Graphite, Ganglia, Datadog, JMX, etc). Note Micrometer requires Java 8 or more. The Java Client 4.3.x still supports Java 6, but Micrometer support isn't usable on Java 6 and Java 7.

GitHub issue: #313

Make auto-recovery retry interval calculation pluggable

The RecoveryDelayHandler interface has been introduced to calculate the retry interval between each connection recovery attempt. The default strategy is still the same: a constant interval (5 seconds by default). The ExponentialBackoffDelayHandler implementation can be used to have an exponential retry interval.

Thanks to @vikinghawk for this contribution.

GitHub issue: #308

Handle several buffer underflow results in SslEngineByteBufferInputStream

Thanks to @dimas for this fix.

GitHub issue: #317

4.3.0.RC2

17 Oct 09:40
Compare
Choose a tag to compare
4.3.0.RC2 Pre-release
Pre-release

Changes between 4.2.2 and 4.3.0.RC2

This is a release candidate for 4.3.0, a maintenance release that includes 2 new features and bug fix. This release is backward-compatible with 4.2.2.

Support Micrometer

The Java Client supports Micrometer through its MicrometerMetricsCollector implementation of MetricsCollector. Micrometer is an instrumentation facade, which supports popular metrics backends (Atlas, Graphite, Ganglia, Datadog, JMX, etc). Note Micrometer requires Java 8 or more. The Java Client 4.3.x still supports Java 6, but Micrometer support isn't usable on Java 6 and Java 7.

GitHub issue: #313

Make auto-recovery retry interval calculation pluggable

The RecoveryDelayHandler interface has been introduced to calculate the retry interval between each connection recovery attempt. The default strategy is still the same: a constant interval (5 seconds by default). The ExponentialBackoffDelayHandler implementation can be used to have an exponential retry interval.

Thanks to @vikinghawk for this contribution.

GitHub issue: #308

Handle several buffer underflow results in SslEngineByteBufferInputStream

Thanks to @dimas for this fix.

GitHub issue: #317

4.3.0.RC1

12 Oct 13:06
Compare
Choose a tag to compare
4.3.0.RC1 Pre-release
Pre-release

Changes between 4.2.2 and 4.3.0.RC1

This is a release candidate for 4.3.0.RC1, a maintenance release that includes 2 new features. This release is backward-compatible with 4.2.2.

Support Micrometer

The Java Client supports Micrometer through its MicrometerMetricsCollector implementation of MetricsCollector. Micrometer is an instrumentation facade, which supports popular metrics backends (Atlas, Graphite, Ganglia, Datadog, JMX, etc). Note Micrometer requires Java 8 or more. The Java Client 4.3.x still supports Java 6, but Micrometer support isn't usable on Java 6 and Java 7.

GitHub issue: #313

Make auto-recovery retry interval calculation pluggable

The RecoveryDelayHandler interface has been introduced to calculate the retry interval between each connection recovery attempt. The default strategy is still the same: a constant interval (5 seconds by default). The ExponentialBackoffDelayHandler implementation can be used to have an exponential retry interval.

Thanks to @vikinghawk for this contribution.

GitHub issue: #308

5.0.0

22 Sep 12:25
Compare
Choose a tag to compare

Changes between 4.x.x and 5.0.0

This major release requires Java 8. It introduces several new features and lambda-oriented methods for common use cases. It has also a few breaking changes that should have minor or no impact on most applications.

Users running Java 8 or Java 9 are encouraged to upgrade to this release.

Java 8 is Now Required

The client no longer supports JDK 6 and 7. JDK 8 is now required to both build and run (use) this library. Starting with the 5.0 release, there are Java 8-specific features in the API (e.g. lambdas).

Because of the Java 8 requirement, this client only supports Android 7.0 or later. If support
for earlier Android versions is desired, use the 4.x releases instead.

GitHub issue: #304.

Lambda-oriented API for Consumers

Channel has now basicConsume methods with functional interfaces as arguments, making it possible to use lambdas in the method call. Note that not all the methods of Consumer are supported, we retained only the "essential" ones: when a message is delivered, when the consumer is cancelled, and when the channel/connection is closed. Simple or straightforward consumers will benefit from these lambda-based methods, more advanced consumers can still implement all the callbacks they need in the Consumer interface. Have a look at the test class for examples of usage.

GitHub issue: #247

Make it possible to use lambdas instead of *Listener objects

It's now possible to use lambdas for the following listeners: ConfirmListener, ReturnListener, and BlockedListener, thanks to new functional interfaces and new methods in Connection and in Channel. The original *Listener methods and interfaces are still around though. Have a look at the test class for examples of usage.

GitHub issue: #246

Add an asynchronous method which returns a CompletableFuture

Channel has a new method to handle AMQP asynchronous calls:

CompletableFuture<Command> asyncCompletableRpc(Method method) throws IOException;

This method is a foundation to build so-called reactive applications, thanks to the returned CompletableFuture. It's on purpose quite low-level (using the Method type as an argument).

GitHub issue: #215

Introduce SslContextFactory interface to create SSLContext instances

ConnectionFactory has now a new SslContextFactory property to create SSLContext contexts for connections. The connection name (part of the connection properties) can be used to conditionally create the SSLContext instance for the connection. This way the same ConnectionFactory instance can create connections with different certificates but sharing the same resources (e.g. IO threads when using NIO). This features introduces a breaking change: the FrameHandlerFactory#create method has now an extra connectionName String argument. This shouldn't impact applications as FrameHandlerFactory is an interface meant to be used internally. Note all the ConnectionFactory#useSslProtocol methods still work the same way, they use the SslContextFactory interface under the covers.

GitHub issue: #241

Remove QueueingConsumer from RpcServer

RpcServer was using QueueingConsumer internally, which has been removed in this release. Depending on the use of RpcServer, this can imply breaking changes (see below). The overall behavior of RpcServer shouldn't change, as it's using now its own private version of a QueueingConsumer.

GitHub issue: #221

Replace AssertionErrors with more appropriate exceptions

AssertionErrors have been replaced by more appropriate, less dramatic exceptions classes (e.g. IllegalArgumentException). AssertionsErrors were used in a few places of internal APIs, this change shouldn't impact application code.

GitHub issue: #239

Channel implements AutoCloseable

Channel can now be used inside try-with-resources statements. The JVM will automatically close the Channel once the program exits from a try-with-resources statement.

Thanks to Venil Noronha for this contribution.

GitHub issue: #258

Removal of deprecated classes and methods

The following deprecated classes and interfaces have been removed: QueueingConsumer, NullTrustManager, FlowListener, and SingleShotLinearTimer. Please see the implications below.

GitHub issue: #212

Breaking changes

Connection

A new method has been introduced, addBlockedListener(BlockedCallback, UnblockedCallback). This is a concern only if you implement your own Connection. If you only use Connection in your application, the rest of the API hasn't changed.

Channel

New methods have been introduced: addReturnListener(ReturnCallback), addConfirmListener(ConfirmCallback, ConfirmCallback), asyncCompletableRpc(Method), and "lambda-enabled" basicConsume methods. This is a concern only if you implement your own Channel. If you only use Channel in your application, the rest of the API hasn't changed.

RpcServer

RpcServer doesn't rely anymore on QueueingConsumer, which has been removed. If your RpcServer implementation relies on QueueingConsumer.Delivery, use RpcServer.Delivery instead (it has the same API). If you override setupConsumer to create the consumer, you need now to create an implementation of RpcServer.RpcConsumer in this method.

FrameHandlerFactory

FrameHandlerFactory#create has an extra connectionName String parameter. Note this interface isn't meant to be used in applications, so this change shouldn't impact application code.

Removal of AssertionError usages

AssertionsErrors were used in a few places of internal APIs (e.g. BlockingCell), not meant to be used by applications. Nevertheless, if you use those, have a look at the code changes in the GitHub issue #239.

Removal of QueueuingConsumer

QueueingConsumer had been originally introduced to allow applications to overcome a limitation in the way Connection managed threads and consumer dispatching. The threading behavior of Connection and Channel has been changed since then, making QueueingConsumer less relevant. If blocking behavior is needed, applications can use DefaultConsumer and a JDK BlockingQueue.

Removal of NullTrustManager

Use TrustEverythingTrustManager instead, it has the same behavior, but a more meaningful name.

Removal of FlowListener

Channel flow events have been superseded by TCP back pressure. Corresponding methods have been removed from the Channel and ExceptionHandler interfaces, so implementations of those interfaces need to remove them as well (most likely ExceptionHandler implementations, Channel not being an interface implemented in applications).