This version is still in development and is not considered stable yet. For the latest stable version, please use Spring AMQP 3.2.0! |
Changes in 3.0 Since 2.4
Observation
Enabling observation for timers and tracing using Micrometer is now supported. See Micrometer Observation for more information.
Native Images
Support for creating native images is provided. See Native Images for more information.
AsyncRabbitTemplate
The AsyncRabbitTemplate now returns CompletableFuture s instead of ListenableFuture s.
See Async Rabbit Template for more information.
|
Stream Support Changes
RabbitStreamOperations and RabbitStreamTemplate methods now return CompletableFuture instead of ListenableFuture .
|
Super streams and single active consumers thereon are now supported.
See Using the RabbitMQ Stream Plugin for more information.
@RabbitListener
Changes
Batch listeners can now consume Collection<?>
as well as List<?>
.
The batch messaging adapter now ensures that the method is suitable for consuming batches.
When setting the container factory consumerBatchEnabled
to true
, the batchListener
property is also set to true
.
See @RabbitListener with Batching for more information.
MessageConverter
s can now return Optional.empty()
for a null value; this is currently implemented by the Jackson2JsonMessageConverter
.
See Converting from a Message
for more information
You can now configure a ReplyPostProcessor
via the container factory rather than via a property on @RabbitListener
.
See Reply Management for more information.
The @RabbitListener
(and @RabbitHandler
) methods can now be declared as Kotlin suspend
functions.
See Asynchronous @RabbitListener
Return Types for more information.
Starting with version 3.0.5, listeners with async return types (including Kotlin suspend functions) invoke the RabbitListenerErrorHandler
(if configured) after a failure.
Previously, the error handler was only invoked with synchronous invocations.
Connection Factory Changes
The default addressShuffleMode
in AbstractConnectionFactory
is now RANDOM
.
This results in connecting to a random host when multiple addresses are provided.
See Connecting to a Cluster for more information.
The LocalizedQueueConnectionFactory
no longer uses the RabbitMQ http-client
library to determine which node is the leader for a queue.
See Queue Affinity and the LocalizedQueueConnectionFactory
for more information.