1. What’s new in Spring Integration 4.2?

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.

1.1 New Components

1.1.1 Major JMX Rework

A new MetricsFactory strategy interface has been introduced. This, together with other changes in the JMX infrastructure provides much more control over JMX configuration and runtime performance.

However, this has some important implications for (some) user environments.

For complete details, see the section called “JMX Improvements”.

1.1.2 MongodDB Metadata Store

The MongoDbMetadataStore is now available. For more information, see Section 21.3.2, “MongodDB Metadata Store”.

1.1.3 SecuredChannel Annotation

The @SecuredChannel annotation has been introduced, replacing the deprecated ChannelSecurityInterceptorFactoryBean. For more information, see Appendix D, Security in Spring Integration.

1.2 General Changes

1.2.1 Wire Tap

As an alternative to the existing selector attribute, the <wire-tap/> now supports the selector-expression attribute.

1.2.2 File Changes

The <int-file:outbound-channel-adapter> and <int-file:outbound-gateway> now support an append-new-line attribute. If set to true, a new line is appended to the file after a message is written. The default attribute value is false.

The ignore-hidden attribute has been introduced for the <int-file:inbound-channel-adapter> to pick up or not the hidden files from the source directory. It is true by default.

See Chapter 13, File Support for more information.

1.2.3 Class Package Change

The ScatterGatherHandler class has been moved from the org.springframework.integration.handler to the org.springframework.integration.scattergather.

1.2.4 TCP Serializers

The TCP Serializers no longer flush() the OutputStream; this is now done by the TcpNxxConnection classes. If you are using the serializers directly within user code, you may have to flush() the OutputStream.

1.2.5 Server Socket Exceptions

TcpConnectionServerExceptionEvent s are now published whenever an unexpected exception occurs on a TCP server socket (also added to 4.1.3, 4.0.7). See Section 29.5, “TCP Connection Events” for more information.

1.2.6 TCP Gateway Remote Timeout

The TcpOutboundGateway now supports remote-timeout-expression as an alternative to the existing remote-timeout attribute. This allows setting the timeout based on each message.

Also, the remote-timeout no longer defaults to the same value as reply-timeout which has a completely different meaning.

See Table 29.7, “TCP Outbound Gateway Attributes” for more information.

1.2.7 @InboundChannelAdapter

Previously, the @Poller on an inbound channel adapter defaulted the maxMessagesPerPoll attribute to -1 (infinity). This was inconsistent with the XML configuration of <inbound-channel-adapter/> s, which defaults to 1. The annotation now defaults this attribute to 1.

1.2.8 API Changes

o.s.integtation.util.FunctionIterator now requires a o.s.integration.util.Function instead of a reactor.function.Function. This was done to remove an unnecessary hard dependency on Reactor. Any uses of this iterator will need to change the import.

Of course, Reactor is still supported for functionality such as the Promise gateway; the dependency was removed for those users who don’t need it.

1.2.9 JMS Changes

The error-channel now is used for the conversion errors, which have caused a transaction rollback and message redelivery previously.

See Section 19.2, “Message-Driven Channel Adapter” for more information.

1.2.10 Conditional Pollers

Much more flexibility is now provided for dynamic polling.

See Section 3.2.3, “Conditional Pollers for Message Sources” for more information.

1.2.11 AMQP Changes

The <int-amqp:outbound-gateway> now supports confirm-correlation-expression and confirm-(n)ack-channel attributes with similar purpose as for <int-amqp:outbound-channel-adapter>.

See Chapter 10, AMQP Support for more information.

1.2.12 XPath Splitter Improvements

The XPathMessageSplitter (<int-xml:xpath-splitter>) now allows the configuration of output-properties for the internal javax.xml.transform.Transformer and supports an Iterator mode (defaults to true) for the xpath evaluation org.w3c.dom.NodeList result.

See Section 33.5, “Splitting XML Messages” for more information.

1.2.13 HTTP Changes

The HTTP Inbound Endpoints (<int-http:inbound-channel-adapter> and <int-http:inbound-gateway>) now allow the configuration of Cross-Origin Resource Sharing (CORS).

See Section 16.4.4, “Cross-Origin Resource Sharing (CORS) Support” for more information.

1.2.14 Persistent File List Filter Changes

The AbstractPersistentFileListFilter has a new property flushOnUpdate which, when set to true, will flush() the metadata store if it implements Flushable (e.g. the PropertiesPersistenMetadataStore).