The spring-erlang
jar is no longer included in the distribution.
Use the RabbitMQ REST API instead.
Previously, if the connection factory was configured with a host and port but an empty String was also supplied for
addresses
, the host and port were ignored.
Now, an empty addresses
String is treated the same as a null
, and the host and port are used.
The CachingConnectionFactory
has an additional constructor, with a URI
parameter, to configure the broker connection.
A new method called resetConnection()
has been added to let users reset the connection (or connections).
You might use this, for example, to reconnect to the primary broker after failing over to the secondary broker.
This does impact in-process operations.
The existing destroy()
method does exactly the same, but the new method has a less daunting name.
When the listener container consumers start, they attempt to passively declare the queues to ensure they are available
on the broker.
Previously, if these declarations failed (for example, because the queues didn’t exist) or when an HA queue was being
moved, the retry logic was fixed at three retry attempts at five-second intervals.
If the queues still do not exist, the behavior is controlled by the missingQueuesFatal
property (default: true
).
Also, for containers configured to listen from multiple queues, if only a subset of queues are available, the consumer
retried the missing queues on a fixed interval of 60 seconds.
The declarationRetries
, failedDeclarationRetryInterval
, and retryDeclarationInterval
properties are now configurable.
See Message Listener Container Configuration for more information.
The RabbitGatewaySupport
class has been moved from o.s.amqp.rabbit.core.support
to o.s.amqp.rabbit.core
.
You can now configure the DefaultMessagePropertiesConverter
to
determine the maximum length of a LongString
that is converted
to a String
rather than to a DataInputStream
.
The converter has an alternative constructor that takes the value as a limit.
Previously, this limit was hard-coded at 1024
bytes.
(Also available in 1.4.4).
The bindings
attribute has been added to the @RabbitListener
annotation as mutually exclusive with the queues
attribute to allow the specification of the queue
, its exchange
, and binding
for declaration by a RabbitAdmin
on
the Broker.
The default reply address (@SendTo
) for a @RabbitListener
can now be a SpEL expression.
You can now use a combination of SpEL and property placeholders to specify multiple queues for a listener.
See Annotation-driven Listener Endpoints for more information.
You can now declare beans that define a collection of these entities, and the RabbitAdmin
adds the
contents to the list of entities that it declares when a connection is established.
See Declaring Collections of Exchanges, Queues, and Bindings for more information.
The reply-address
attribute has been added to the <rabbit-template>
component as an alternative reply-queue
.
See Request/Reply Messaging for more information.
(Also available in 1.4.4 as a setter on the RabbitTemplate
).
The RabbitTemplate
now supports blocking in receive
and convertAndReceive
methods.
See Polling Consumer for more information.
When the mandatory
flag is set when using the sendAndReceive
and convertSendAndReceive
methods, the calling thread
throws an AmqpMessageReturnedException
if the request message cannot be delivered.
See Reply Timeout for more information.
The framework tries to verify proper configuration of a reply listener container when using a named reply queue.
See Reply Listener Container for more information.
The RabbitManagementTemplate
has been introduced to monitor and configure the RabbitMQ Broker by using the REST API provided by its management plugin.
See [management-rest-api] for more information.
Important
|
The Normal Spring bean name overrides are applied.
If a later When migrating to this release, if you have |
However, to support starting and stopping containers as a group, a new group
attribute has been added.
When this attribute is defined, the containers created by this element are added to a bean with this name, of type Collection<SimpleMessageListenerContainer>
.
You can iterate over this group to start and stop containers.
The @RabbitListener
annotation can now be applied at the class level.
Together with the new @RabbitHandler
method annotation, this lets you select the handler method based on payload type.
See Multi-method Listeners for more information.
The SimpleMessageListenerContainer
can now be supplied with a BackOff
instance for consumer
startup recovery.
See Message Listener Container Configuration for more information.
A mechanism to control the log levels of channel closure has been introduced. See Channel Close Logging.
The SimpleMessageListenerContainer
now emits application events when consumers fail.
See Consumer Events for more information.
Previously, the consumer tags for asynchronous consumers were generated by the broker. With this release, it is now possible to supply a naming strategy to the listener container. See Consumer Tags.
The MessageListenerAdapter
now supports a map of queue names (or consumer tags) to method names, to determine
which delegate method to call based on the queue from which the message was received.
LocalizedQueueConnectionFactory
is a new connection factory that connects to the node in a cluster where a mirrored queue actually resides.
Starting with version 1.5.3, you can now control how AnonymousQueue
names are generated.
See AnonymousQueue
for more information.