This chapter provides an overview of the new features and improvements that have been introduced with Spring Integration 4.1. If you are interested in more details, please see the Issue Tracker tickets that were resolved as part of the 4.1 development process.
A Reactor Promise
return type is now supported for Messaging Gateway methods.
See Section 7.2.9, “Asynchronous Gateway”.
The WebSocket module is now available. It is fully based on the Spring WebSocket
and Spring Messaging modules and provides an <inbound-channel-adapter>
and an
<outbound-channel-adapter>
.
More documentation to follow.
The Boon JsonObjectMapper
is now provided
for the JSON transformers. See Section 6.1, “Transformer” for more information.
Elements that utilize a message listener container (inbound endpoints, channel)
now support the missing-queues-fatal
attribute.
See Chapter 10, AMQP Support for more information.
The AMQP outbound endpoints support a new property lazy-connect
(default true). When true, the connection to the broker is not established
until the first message arrives (assuming there are no inbound endpoints, which
always attempt to establish the connection during startup). When set the 'false' an
attempt to establish the connection is made during application startup.
See Chapter 10, AMQP Support for more information.
The SimpleMessageStore
no longer makes a copy of the group
when calling getMessageGroup()
.
See Caution with SimpleMessageStore for more information.
The <ws:outbound-gateway/>
now
provides an encode-uri
attribute to allow disabling the encoding of the URI object
before sending the request.
The <http:inbound-channel-adapter>
can now be configured with a
status-code-expression
to override the default 200 OK
status.
See Section 16.4, “HTTP Namespace Support” for more information.
The MQTT channel adapters can now be configured to connect to multiple servers, for example, to support High Availability (HA). See Chapter 22, MQTT Support for more information.
The MQTT message-driven channel adapter now supports specifying the QoS setting for each subscription. See Section 22.2, “Inbound (message-driven) Channel Adapter” for more information.
The MQTT outbound channel adapter now supports asynchronous sends, avoiding blocking until delivery is confirmed. See Section 22.3, “Outbound Channel Adapter” for more information.
It is now possible to programmatically subscribe to and unsubscribe from topics at runtime. See Section 22.2, “Inbound (message-driven) Channel Adapter” for more information.
The FTP and SFTP outbound channel adapters now support appending to remote files, as
well as taking specific actions when a remote file already exists. The remote file
templates now also support this as well as rmdir()
and exists()
.
In addition, the remote file templates provide access to the underlying client object
enabling access to low-level APIs.
See Chapter 14, FTP/FTPS Adapters and Chapter 26, SFTP Adapters for more information.
Splitter
components now support an Iterator
as the result object
for producing output messages.
See Section 5.3, “Splitter” for more information.
Aggregator
s now support a new attribute expire-groups-on-timeout
.
See Section 5.4.4, “Configuring an Aggregator” for more information.
Add null-result-expression attribute, which will be evaluated and returned if <enricher>
returns null.
It can be added in <header>
and <property>
.
See Section 6.2, “Content Enricher” for more information.
The <header-enricher/>
's <header-channels-to-string/>
element can now override the header channel registry's default time for retaining channel
mappings.
See the section called “Header Channel Registry” for more information.
Improvements have been made to the orderly shutdown algorithm. See Section 8.6, “Orderly Shutdown” for more information.
The RecipientListRouter
provides now several management
operations to configure recipients at runtime.
With that the <recipient-list-router>
can now be configured without any
<recipient>
from the start.
See the section called “RecipientListRouterManagement” for more information.
The AbstractHeaderMapper
implementations now provides the additional
NON_STANDARD_HEADERS
token to map any user-defined headers, which aren't mapped by default.
See Section 10.8, “AMQP Message Headers” for more information.
The new template-channel-transacted
attribute has been introduced for AMQP
MessageChannel
s.
See Section 10.7, “AMQP Backed Message Channels” for more information.
The default syslog message converter now has an option to retain the original message in the payload, while still setting the headers. See Section 28.2, “Syslog <inbound-channel-adapter>” for more information.
In addition to the Promise
return type mentioned above,
gateway methods may now return a ListenableFuture
, introduced
in Spring Framework 4.0. You can also disable the async processing in the gateway,
allowing a downstream flow to directly return a Future
.
See Section 7.2.9, “Asynchronous Gateway”.