# Change History ## Change History ### Changes between 5.3 and 5.4 ### New Components #### Channel Adapters for Apache Kafka The standalone [Spring Integration for Apache Kafka](https://projects.spring.io/spring-integration-kafka/) project has been merged as a `spring-integration-kafka` module to this project. The `KafkaProducerMessageHandler` `sendTimeoutExpression` default has changed. You can now access the `Future` for underlying `send()` operations. See [Spring for Apache Kafka Support](./kafka.html#kafka) for more information. #### R2DBC Channel Adapters The Channel Adapters for R2DBC database interaction have been introduced. See [R2DBC Support](./r2dbc.html#r2dbc) for more information. #### Redis Stream Support The Channel Adapters for Redis Stream support have been introduced. See [Redis Stream Outbound Channel Adapter](./redis.html#redis-stream-outbound) for more information. #### Renewable Lock Registry A Renewable lock registry has been introduced to allow renew lease of a distributed lock. See [JDBC implementation](./jdbc.html#jdbc-lock-registry) for more information. #### ZeroMQ Support `ZeroMqChannel`, `ZeroMqMessageHandler` and `ZeroMqMessageProducer` have been introduced. See [ZeroMQ Support](./zeromq.html#zeromq) for more information. ### General Changes The one-way messaging gateway (the `void` method return type) now sets a `nullChannel` explicitly into the `replyChannel` header to ignore any possible downstream replies. See [Setting the Default Reply Channel](./gateway.html#gateway-default-reply-channel) for more information. Also the gateway method invokers (`GatewayProxyFactoryBean.MethodInvocationGateway`) are now supplied with the managed bean name as a combination of gateway proxy bean name plus method signature. For example: `sampleGateway#echo(String)`. This effects message history and metrics exposed for the gateway method calls and also give fine-grained logs during start and close of application context. The aggregator (and resequencer) can now expire orphaned groups (groups in a persistent store where no new messages arrive after an application restart). See [Aggregator Expiring Groups](./aggregator.html#aggregator-expiring-groups) for more information. The legacy metrics that were replaced by Micrometer meters have been removed. The [Thread Barrier](./barrier.html#barrier) has now two separate timeout options: `requestTimeout` and `triggerTimeout`. ### TCP/UDP Changes Connection factories now support multiple sending components (`TcpSender`); they remain limited to one receiving component (`TcpListener`). This allows, for example, an inbound gateway and outbound channel adapter to share the same factory, supporting both request/reply and arbitrary messaging from the server to the client. Shared factories should not be used with outbound gateways, unless single-use connections or the `ThreadAffinityClientConnectionFactory` are being used. See [Collaborating Channel Adapters](./ip.html#ip-collaborating-adapters) and [TCP Gateways](./ip.html#tcp-gateways) for more information. The UDP channel adapters can now be configured with a `SocketCustomizer` which allows the setting of socket properties that are not directly supported by the adapters. See [UDP Adapters](./ip.html#udp-adapters) for more information. ### RMI Changes The `spring-integration-rmi` module is deprecated with no replacement and is going to be removed in the next major version. See [RMI Support](./rmi.html#rmi) for more information. ### AMQP Changes The outbound endpoints now have a new mechanism for handling publisher confirms and returns. See [Alternative Mechanism for Publisher Confirms and Returns](./amqp.html#alternative-confirms-returns) for more information. A new `BatchMode.EXTRACT_PAYLOAD_WITH_HEADERS` is supported by the `AmqpInboundChannelAdapter`. See [Inbound Channel Adapter](./amqp.html#amqp-inbound-channel-adapter) for more information. ### Mail Changes The `AbstractMailReceiver` can now produce the `MimeMessage` as-is without eager fetching its content. See [Mail-receiving Channel Adapter](./mail.html#mail-inbound) for more information. ### Changes between 5.2 and 5.3 ### New Components #### Integration Pattern The `IntegrationPattern` abstraction has been introduced to indicate which enterprise integration pattern (an `IntegrationPatternType`) and category a Spring Integration component belongs to. See its JavaDocs and [Integration Graph](./graph.html#integration-graph) for more information about this abstraction and its use-cases. #### `ReactiveMessageHandler` The `ReactiveMessageHandler` is now natively supported in the framework. See [ReactiveMessageHandler](./reactive-streams.html#reactive-message-handler) for more information. #### `ReactiveMessageSourceProducer` The `ReactiveMessageSourceProducer` is a reactive implementation of the `MessageProducerSupport` to wrap a provided `MessageSource` into a `Flux` for on demand `receive()` calls. See [Reactive Streams Support](./reactive-streams.html#reactive-streams) for more information. #### Java DSL Extensions A new `IntegrationFlowExtension` API has been introduced to allow extension of the existing Java DSL with custom or composed EIP-operators. This also can be used to introduce customizers for any out-of-the-box `IntegrationComponentSpec` extensions. See [DSL Extensions](./dsl.html#java-dsl-extensions) for more information. #### Kotlin DSL The Kotlin DSL for integration flow configurations has been introduced. See [Kotlin DSL Chapter](./kotlin-dsl.html#kotlin-dsl) for more information. #### ReactiveRequestHandlerAdvice A `ReactiveRequestHandlerAdvice` is provided to customize `Mono` replies from message handlers. See [Reactive Advice](./handler-advice.html#reactive-advice) for more information. #### HandleMessageAdviceAdapter A `HandleMessageAdviceAdapter` is provided to wrap any `MethodInterceptor` for applying on the `MessageHandler.handleMessage()` instead of a default `AbstractReplyProducingMessageHandler.RequestHandler.handleRequestMessage()` behavior. See [Handling Message Advice](./handler-advice.html#handle-message-advice) for more information. #### MongoDB Reactive Channel Adapters The `spring-integration-mongodb` module now provides channel adapter implementations for the Reactive MongoDb driver support in Spring Data. Also, a reactive implementation for MongoDb change stream support is present with the `MongoDbChangeStreamMessageProducer`. See [MongoDB Support](./mongodb.html#mongodb) for more information. #### ReceiveMessageAdvice A special `ReceiveMessageAdvice` has been introduced to proxy exactly `MessageSource.receive()` or `PollableChannel.receive()`. See [Smart Polling](./polling-consumer.html#smart-polling) for more information. ### General Changes The gateway proxy now doesn’t proxy `default` methods by default. See [Invoking `default` Methods](./gateway.html#gateway-calling-default-methods) for more information. Internal components (such as `_org.springframework.integration.errorLogger`) now have a shortened name when they are represented in the integration graph. See [Integration Graph](./graph.html#integration-graph) for more information. In the aggregator, when the `MessageGroupProcessor` returns a `Message`, the `MessageBuilder.popSequenceDetails()` is performed on the output message if the `sequenceDetails` matches the header in the first message of the group. See [Aggregator Programming Model](./aggregator.html#aggregator-api) for more information. A new `publishSubscribeChannel()` operator, based on the `BroadcastCapableChannel` and `BroadcastPublishSubscribeSpec`, was added into Java DSL. This fluent API has its advantage when we configure sub-flows as pub-sub subscribers for broker-backed channels like `SubscribableJmsChannel`, `SubscribableRedisChannel` etc. See [Sub-flows support](./dsl.html#java-dsl-subflows) for more information. Transactional support in Spring Integration now also includes options to configure a `ReactiveTransactionManager` if a `MessageSource` or `MessageHandler` implementation produces a reactive type for payload to send. See `TransactionInterceptorBuilder` for more information. See also [Reactive Transactions](./transactions.html#reactive-transactions). A new `intercept()` operator to register `ChannelInterceptor` instances without creating explicit channels was added into Java DSL. See [Operator intercept()](./dsl.html#java-dsl-intercept) for more information. The `MessageStoreSelector` has a new mechanism to compare an old and new value. See [Idempotent Receiver Enterprise Integration Pattern](./handler-advice.html#idempotent-receiver) for more information. The `MessageProducerSupport` base class now has a `subscribeToPublisher(Publisher>)` API to allow implementation of message-driven producer endpoints which emit messages via reactive `Publisher`. See [Reactive Streams Support](./reactive-streams.html#reactive-streams) for more information. ### AMQP Changes The outbound channel adapter has a new property `multiSend` allowing multiple messages to be sent within the scope of one `RabbitTemplate` invocation. See [AMQP Outbound Channel Adapter](./amqp.html#amqp-outbound-channel-adapter) for more information. The inbound channel adapter now supports a listener container with the `consumerBatchEnabled` property set to `true`. See [AMQP Inbound Channel Adapter](./amqp.html#amqp-inbound-channel-adapter) ### HTTP Changes The `encodeUri` property on the `AbstractHttpRequestExecutingMessageHandler` has been deprecated in favor of newly introduced `encodingMode`. See `DefaultUriBuilderFactory.EncodingMode` JavaDocs and [Controlling URI Encoding](./http.html#http-uri-encoding) for more information. This also affects `WebFluxRequestExecutingMessageHandler`, respective Java DSL and XML configuration. The same option is added into an `AbstractWebServiceOutboundGateway`. ### Web Services Changes Java DSL support has been added for Web Service components. The `encodeUri` property on the `AbstractWebServiceOutboundGateway` has been deprecated in favor of newly introduced `encodingMode` - similar to HTTP changes above. See [Web Services Support](./ws.html#ws) for more information. ### TCP Changes The `FailoverClientConnectionFactory` no longer fails back, by default, until the current connection fails. See [TCP Failover Client Connection Factory](./ip.html#failover-cf) for more information. The `TcpOutboundGateway` now supports asynchronous request/reply. See [TCP Gateways](./ip.html#tcp-gateways) for more information. You can now configure client connections to perform some arbitrary test on new connections. See [Testing Connections](./ip.html#testing-connections) for more information. ### RSocket Changes A `decodeFluxAsUnit` option has been added to the `RSocketInboundGateway` with the meaning to decode incoming `Flux` as a single unit or apply decoding for each event in it. See [RSocket Inbound Gateway](./rsocket.html#rsocket-inbound) for more information. ### Zookeeper Changes A `LeaderInitiatorFactoryBean` (as well as its XML ``) exposes a `candidate` option for more control over a `Candidate` configuration. See [Leadership event handling](./zookeeper.html#zk-leadership) for more information. ### MQTT Changes The inbound channel adapter can now be configured to provide user control over when a message is acknowledged as being delivered. See [Manual Acks](./mqtt.html#mqtt-ack-mode) for more information. The outbound adapter now publishes a `MqttConnectionFailedEvent` when a connection can’t be created, or is lost. Previously, only the inbound adapter did so. See [MQTT Events](./mqtt.html#mqtt-events). ### FTP Changes The `FileTransferringMessageHandler` (for FTP and SFTP, for example) in addition to `File`, `byte[]`, `String` and `InputStream` now also supports an `org.springframework.core.io.Resource`. See [SFTP Support](./sftp.html#sftp) and [FTP Support](./ftp.html#ftp) for more information. ### File Changes The `FileSplitter` doesn’t require a Jackson processor (or similar) dependency any more for the `markersJson` mode. It uses a `SimpleJsonSerializer` for a straightforward string representation of the `FileSplitter.FileMarker` instances. See [FileSplitter](./file.html#file-splitter) for more information. ### Changes between 5.1 and 5.2 ### Package and Class Changes `Pausable` has been moved from `o.s.i.endpoint` to `o.s.i.core`. ### Behavior Changes See the [Migration Guide](https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-5.1-to-5.2-Migration-Guide) about behavior changes in this version. ### New Components #### RSocket Support The `spring-integration-rsocket` module is now available with channel adapter implementations for RSocket protocol support. See [RSocket Support](./rsocket.html#rsocket) for more information. #### Rate Limit Advice Support The `RateLimiterRequestHandlerAdvice` is now available for limiting requests rate on handlers. See [Rate Limiter Advice](./handler-advice.html#rate-limiter-advice) for more information. #### Caching Advice Support The `CacheRequestHandlerAdvice` is now available for caching request results on handlers. See [Caching Advice](./handler-advice.html#cache-advice) for more information. #### Kotlin Scripts Support The JSR223 scripting module now includes a support for Kotlin scripts. See [Scripting Support](./scripting.html#scripting) for more information. #### Flux Aggregator Support The `FluxAggregatorMessageHandler` is now available for grouping and windowing messages logic based on the Project Reactor `Flux` operators. See [Flux Aggregator](./aggregator.html#flux-aggregator) for more information. #### FTP/SFTP Event Publisher The FTP and SFTP modules now provide an event listener for certain Apache Mina FTP/SFTP server events. See [Apache Mina FTP Server Events](./ftp.html#ftp-server-events) and [Apache Mina SFTP Server Events](./sftp.html#sftp-server-events) for more information. #### Avro Transformers Simple Apache Avro transformers are now provided. See [Avro Transformers](./transformers.html#avro-transformers) for more information. ### General Changes The `JsonToObjectTransformer` now supports generics for the target object to deserialize into. See [JSON Transformers](./transformer.html#json-transformers) for more information. The `splitter` now supports a `discardChannel` configuration option. See [Splitter](./splitter.html#splitter) for more information. The Control Bus can now handle `Pausable` (extension of `Lifecycle`) operations. See [Control Bus](./control-bus.html#control-bus) for more information. The `Function>` strategy has been introduced for the aggregator component to merge and compute headers for output messages. See [Aggregator Programming Model](./aggregator.html#aggregator-api) for more information. All the `MessageHandlingException` s thrown in the framework, includes now a bean resource and source for back tracking a configuration part in case no end-user code involved. See [Error Handling](./error-handling.html#error-handling) for more information. For better end-user experience, Java DSL now provides a configurer variant for starting flow with a gateway interface. See `IntegrationFlows.from(Class serviceInterface, Consumer endpointConfigurer)` JavaDocs for more information. Also a `MethodArgsHolder` is now a root object for evaluation context for all the expressions in the `GatewayProxyFactoryBean`. The `#args` and `#method` evaluation context variables are now deprecated. See [Messaging Gateways](./gateway.html#gateway) for more information. #### AMQP Changes The outbound endpoints can now be configured to synthesize a "nack" if no publisher confirm is received within a timeout. See [Outbound Channel Adapter](./amqp.html#amqp-outbound-endpoints) for more information. The inbound channel adapter can now receive batched messages as a `List` payload instead of receiving a discrete message for each batch fragment. See [Batched Messages](./amqp.html#amqp-debatching) for more information. The outbound channel adapter can now be configured to block the calling thread until a publisher confirm (acknowledgment) is received. See [Outbound Channel Adapter](./amqp.html#amqp-outbound-channel-adapter) for more information. #### File Changes Some improvements to filtering remote files have been made. See [Remote Persistent File List Filters](./file.html#remote-persistent-flf) for more information. #### TCP Changes The length header used by the `ByteArrayLengthHeaderSerializer` can now include the length of the header in addition to the payload. See [Message Demarcation (Serializers and Deserializers)](./ip.html#tcp-codecs) for more information. When using a `TcpNioServerConnectionFactory`, priority is now given to accepting new connections over reading from existing connections, but it is configurable. See [About Non-blocking I/O (NIO)](./ip.html#note-nio) for more information. The outbound gateway has a new property `closeStreamAfterSend`; when used with a new connection for each request/reply it signals EOF to the server, without closing the connection. This is useful for servers that use the EOF to signal end of message instead of some delimiter in the data. See [TCP Gateways](./ip.html#tcp-gateways) for more information. The client connection factories now support `connectTimeout` which causes an exception to be thrown if the connection is not established in that time. See [TCP Connection Factories](./ip.html#tcp-connection-factory) for more information. `SoftEndOfStreamException` is now a `RuntimeException` instead of extending `IOException`. #### Mail Changes The `AbstractMailReceiver` has now an `autoCloseFolder` option (`true` by default), to disable an automatic folder close after a fetch, but populate `IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE` header instead for downstream interaction. See [Mail-receiving Channel Adapter](./mail.html#mail-inbound) for more information. #### HTTP Changes The HTTP inbound endpoint now support a request payload validation. See [HTTP Support](./http.html#http) for more information. #### WebFlux Changes The `WebFluxRequestExecutingMessageHandler` now supports a `Publisher`, `Resource` and `MultiValueMap` as a request message `payload`. The `WebFluxInboundEndpoint` now supports a request payload validation. See [WebFlux Support](./webflux.html#webflux) for more information. #### MongoDb Changes The `MongoDbMessageStore` can now be configured with custom converters. See [MongoDB Support](./mongodb.html#mongodb) for more information. #### Router Changes You can now disable falling back to the channel key as the channel bean name. See [Dynamic Routers](./router.html#dynamic-routers) for more information. #### FTP/SFTP Changes The `RotatingServerAdvice` is decoupled now from the `RotationPolicy` and its `StandardRotationPolicy`. The remote file information, including host/port and directory are included now into message headers in the `AbstractInboundFileSynchronizingMessageSource` and `AbstractRemoteFileStreamingMessageSource` implementations. Also this information is included into headers in the read operations results of the `AbstractRemoteFileOutboundGateway` implementations. The FTP outbound endpoints now support `chmod` to change permissions on the uploaded file. (SFTP already supported it since version 4.3). See [FTP(S) Support](./ftp.html#ftp) and [SFTP Support](./sftp.html#sftp) for more information. ### Changes between 5.0 and 5.1 #### New Components The following components are new in 5.1: * [`AmqpDedicatedChannelAdvice`](#x5.1-AmqpDedicatedChannelAdvice) ##### `AmqpDedicatedChannelAdvice` See [Strict Message Ordering](./amqp.html#amqp-strict-ordering). ##### Improved Function Support The `java.util.function` interfaces now have improved integration support in the Framework components. Also Kotlin lambdas now can be used for handler and source methods. See [`java.util.function` Interfaces Support](./functions-support.html#functions-support). ##### `@LongRunningTest` A JUnit 5 `@LongRunningTest` conditional annotation is provided to check the environment or system properties for the `RUN_LONG_INTEGRATION_TESTS` entry with the value of `true` to determine if test should be run or skipped. See [JUnit Rules and Conditions](./testing.html#test-junit-rules). #### General Changes The following changes have been made in version 5.1: * [Java DSL](#x5.1-java-dsl) * [Dispatcher Exceptions](#x5.1-dispatcher-exceptions) * [Global Channel Interceptors](#x5.1-global-channel-interceptors) * [`ObjectToJsonTransformer`](#x5.1-object-to-json-transformer) * [Integration Flows: Generated Bean Names](#x5.1-integration-flows-generated-bean-names) * [Aggregator Changes](#x5.1-aggregator) * [@Publisher annotation changes](#x5.1-publisher) * [Integration Graph Customization](#x51.-integration-graph) * [Integration Global Properties](#x51.-global-properties) * [The `receiveTimeout` for `@Poller`](#x51.-poller-annotation) ##### Java DSL The `IntegrationFlowContext` is now an interface and `IntegrationFlowRegistration` is an inner interface of `IntegrationFlowContext`. A new `logAndReply()` operator has been introduced for convenience when you wish to log at the end of a flow for request-reply configurations. This avoid confusion with `log()` which is treated as a one-way end flow component. A generated bean name for any `NamedComponent` within an integration flow is now based on the component type for better readability from visual tools, logs analyzers and metrics collectors. The `GenericHandler.handle()` now excepts a `MessageHeaders` type for the second argument. ##### Dispatcher Exceptions Exceptions caught and re-thrown by `AbstractDispatcher` are now more consistent: * A `MessagingException` of any kind that has a `failedMessage` property is re-thrown unchanged. * All other exceptions are wrapped in a `MessageDeliveryException` with the `failedMessage` property set. Previously: * A `MessagingException` of any kind that has a `failedMessage` property was re-thrown unchanged * A `MessagingException` that had no `failedMessage` property was wrapped in a `MessagingException` with the `failedMessage` property set. * Other `RuntimeException` instances were re-thrown unchanged. * Checked exceptions were wrapped in a `MessageDeliveryException` with the `failedMessage` property set. ##### Global Channel Interceptors Global channel interceptors now apply to dynamically registered channels, such as through the `IntegrationFlowContext` when using the Java DSL or beans that are initialized using `beanFactory.initializeBean()`. Previously, when beans were created after the application context was refreshed, interceptors were not applied. ##### Channel Interceptors `ChannelInterceptor.postReceive()` is no longer called when no message is received; it is no longer necessary to check for a `null` `Message`. Previously, the method was called. If you have an interceptor that relies on the previous behavior, implement `afterReceiveCompleted()` instead, since that method is invoked, regardless of whether a message is received or not. Furthermore, the `PolledAmqpChannel` and `PolledJmsChannel` previously did not invoke `afterReceiveCompleted()` with `null`; they now do. ##### `ObjectToJsonTransformer` A new `ResultType.BYTES` mode is introduced for the `ObjectToJsonTransformer`. See [JSON Transformers](./transformer.html#json-transformers) for more information. ##### Integration Flows: Generated Bean Names Starting with version 5.0.5, generated bean names for the components in an `IntegrationFlow` include the flow bean name, followed by a dot, as a prefix. For example, if a flow bean were named `flowBean`, a generated bean might be named `flowBean.generatedBean`. See [Working With Message Flows](./dsl.html#java-dsl-flows) for more information. ##### Aggregator Changes If the `groupTimeout` is evaluated to a negative value, an aggregator now expires the group immediately. Only `null` is considered as a signal to do nothing for the current message. A new `popSequence` property has been introduced to allow (by default) to call a `MessageBuilder.popSequenceDetails()` for the output message. Also an `AbstractAggregatingMessageGroupProcessor` returns now an `AbstractIntegrationMessageBuilder` instead of the whole `Message` for optimization. See [Aggregator](./aggregator.html#aggregator) for more information. ##### @Publisher annotation changes Starting with version 5.1, you must explicitly turn on the `@Publisher` AOP functionality by using `@EnablePublisher` or by using the `` child element on ``. Also the `proxy-target-class` and `order` attributes have been added for tuning the `ProxyFactory` configuration. See [Annotation-driven Configuration with the `@Publisher` Annotation](./message-publishing.html#publisher-annotation) for more information. #### Files Changes If you are using `FileExistsMode.APPEND` or `FileExistsMode.APPEND_NO_FLUSH` you can provide a `newFileCallback` that will be called when creating a new file. This callback receives the newly created file and the message that triggered the callback. This could be used to write a CSV header, for an example. The `FileReadingMessageSource` now doesn’t check and create a directory until its `start()` is called. So, if an Inbound Channel Adapter for the `FileReadingMessageSource` has `autoStartup = false`, there are no failures against the file system during application start up. See [File Support](./file.html#files) for more information. #### AMQP Changes We have made `ID` and `Timestamp` header mapping changes in the `DefaultAmqpHeaderMapper`. See the note near the bottom of [AMQP Message Headers](./amqp.html#amqp-message-headers) for more information. The `contentType` header is now correctly mapped as an entry in the general headers map. See [contentType Header](./amqp.html#amqp-content-type) for more information. Starting with version 5.1.3, if a message conversion exception occurs when using manual acknowledgments, and an error channel is defined, the payload is a `ManualAckListenerExecutionFailedException` with additional `channel` and `deliveryTag` properties. This enables the error flow to ack/nack the original message. See [Inbound Message Conversion](./amqp.html#amqp-conversion-inbound) for more information. #### JDBC Changes A confusing `max-rows-per-poll` property on the JDBC Inbound Channel Adapter and JDBC Outbound Gateway has been deprecated in favor of the newly introduced `max-rows` property. The `JdbcMessageHandler` supports now a `batchUpdate` functionality when the payload of the request message is an instance of an `Iterable` type. The indexes for the `INT_CHANNEL_MESSAGE` table (for the `JdbcChannelMessageStore`) have been optimized. If you have large message groups in such a store, you may wish to alter the indexes. See [JDBC Support](./jdbc.html#jdbc) for more information. #### FTP and SFTP Changes A `RotatingServerAdvice` is now available to poll multiple servers and directories with the inbound channel adapters. See [Inbound Channel Adapters: Polling Multiple Servers and Directories](./ftp.html#ftp-rotating-server-advice) and [Inbound Channel Adapters: Polling Multiple Servers and Directories](./sftp.html#sftp-rotating-server-advice) for more information. Also, inbound adapter `localFilenameExpression` instances can contain the `#remoteDirectory` variable, which contains the remote directory being polled. The generic type of the comparators (used to sort the fetched file list for the streaming adapters) has changed from `Comparator>` to `Comparator`. See [FTP Streaming Inbound Channel Adapter](./ftp.html#ftp-streaming) and [SFTP Streaming Inbound Channel Adapter](./sftp.html#sftp-streaming) for more information. In addition, the synchronizers for inbound channel adapters can now be provided with a `Comparator`. This is useful when using `maxFetchSize` to limit the files retrieved. The `CachingSessionFactory` has a new property `testSession` which, when true, causes the factory to perform a `test()` operation on the `Session` when checking out an existing session from the cache. See [SFTP Session Caching](./sftp.html#sftp-session-caching) and [FTP Session Caching](./ftp.html#ftp-session-caching) for more information. The outbound gateway MPUT command now supports a message payload with a collection of files or strings. See [SFTP Outbound Gateway](./sftp.html#sftp-outbound-gateway) and [FTP Outbound Gateway](./ftp.html#ftp-outbound-gateway) for more information. #### TCP Support When using SSL, host verification is now enabled, by default, to prevent man-in-the-middle attacks with a trusted certificate. See [Host Verification](./ip.html#tcp-ssl-host-verification) for more information. In addition the key and trust store types can now be configured on the `DefaultTcpSSLContextSupport`. #### Twitter Support Since the Spring Social project has moved to [end of life status](https://spring.io/blog/2018/07/03/spring-social-end-of-life-announcement), Twitter support in Spring Integration has been moved to the Extensions project. See [Spring Integration Social Twitter](https://github.com/spring-projects/spring-integration-extensions/tree/main/spring-integration-social-twitter) for more information. #### JMS Support The `JmsSendingMessageHandler` now provides `deliveryModeExpression` and `timeToLiveExpression` options to determine respective QoS options for JMS message to send at runtime. The `DefaultJmsHeaderMapper` now allows to map inbound `JMSDeliveryMode` and `JMSExpiration` properties via setting to `true` respective `setMapInboundDeliveryMode()` and `setMapInboundExpiration()` options. When a `JmsMessageDrivenEndpoint` or `JmsInboundGateway` is stopped, the associated listener container is now shut down; this closes its shared connection and any consumers. You can configure the endpoints to revert to the previous behavior. See [JMS Support](./jms.html#jms) for more information. #### HTTP/WebFlux Support The `statusCodeExpression` (and `Function`) is now supplied with the `RequestEntity` as a root object for evaluation context, so request headers, method, URI and body are available for target status code calculation. See [HTTP Support](./http.html#http) and [WebFlux Support](./webflux.html#webflux) for more information. #### JMX Changes Object name key values are now quoted if they contain any characters other than those allowed in a Java identifier (or period `.`). For example `org.springframework.integration:type=MessageChannel,` `name="input:foo.myGroup.errors"`. This has the side effect that previously "allowed" names, with such characters, will now be quoted. For example `org.springframework.integration:type=MessageChannel,` `name="input#foo.myGroup.errors"`. #### Micrometer Support Changes It is now simpler to customize the standard Micrometer meters created by the framework. See [Micrometer Integration](./metrics.html#micrometer-integration) for more information. #### Integration Graph Customization It is now possible to add additional properties to the `IntegrationNode` s via `Function> additionalPropertiesCallback` on the `IntegrationGraphServer`. See [Integration Graph](./graph.html#integration-graph) for more information. #### Integration Global Properties The Integration global properties (including defaults) can now be printed in the logs, when a `DEBUG` logic level is turned on for the `org.springframework.integration` category. See [Global Properties](./configuration.html#global-properties) for more information. #### The `receiveTimeout` for `@Poller` The `@Poller` annotation now provides a `receiveTimeout` option for convenience. See [Using the `@Poller` Annotation](./configuration.html#configuration-using-poller-annotation) for more information. ### Changes between 4.3 and 5.0 See the [Migration Guide](https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.3-to-5.0-Migration-Guide) for important changes that might affect your applications. You can find migration guides for all versions back to 2.1 on the [wiki](https://github.com/spring-projects/spring-integration/wiki). #### New Components Version 5.0 added a number of new components. ##### Java DSL The separate [Spring Integration Java DSL](https://github.com/spring-projects/spring-integration-java-dsl) project has now been merged into the core Spring Integration project. The `IntegrationComponentSpec` implementations for channel adapters and gateways are distributed to their specific modules. See [Java DSL](./dsl.html#java-dsl) for more information about Java DSL support. See also the [4.3 to 5.0 Migration Guide](https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.3-to-5.0-Migration-Guide#java-dsl) for the required steps to move to Spring Integration 5.0. ##### Testing Support We created a new Spring Integration Test Framework to help with testing Spring Integration applications. Now, with the `@SpringIntegrationTest` annotation on test classes and the `MockIntegration` factory, you can make your JUnit tests for integration flows somewhat easier. See [Testing support](./testing.html#testing) for more information. ##### MongoDB Outbound Gateway The new `MongoDbOutboundGateway` lets you make queries to the database on demand by sending a message to its request channel. See [MongoDB Outbound Gateway](./mongodb.html#mongodb-outbound-gateway) for more information. ##### WebFlux Gateways and Channel Adapters We introduced the new WebFlux support module for Spring WebFlux Framework gateways and channel adapters. See [WebFlux Support](./webflux.html#webflux) for more information. ##### Content Type Conversion Now that we use the new `InvocableHandlerMethod`-based infrastructure for service method invocations, we can perform `contentType` conversion from the payload to a target method argument. See [Content Type Conversion](./endpoint.html#content-type-conversion) for more information. ##### `ErrorMessagePublisher` and `ErrorMessageStrategy` We added `ErrorMessagePublisher` and the `ErrorMessageStrategy` for creating `ErrorMessage` instances. See [Error Handling](./error-handling.html#error-handling) for more information. ##### JDBC Metadata Store We added a JDBC implementation of the `MetadataStore` implementation. This is useful when you need to ensure transactional boundaries for metadata. See [JDBC Metadata Store](./jdbc.html#jdbc-metadata-store) for more information. #### General Changes Spring Integration is now fully based on Spring Framework `5.0` and Project Reactor `3.1`. Previous Project Reactor versions are no longer supported. ##### Core Changes The `@Poller` annotation now has the `errorChannel` attribute for easier configuration of the underlying `MessagePublishingErrorHandler`. See [Annotation Support](./configuration.html#annotations) for more information. All the request-reply endpoints (based on `AbstractReplyProducingMessageHandler`) can now start transactions and, therefore, make the whole downstream flow transactional. See [Transaction Support](./handler-advice.html#tx-handle-message-advice) for more information. The `SmartLifecycleRoleController` now provides methods to obtain status of endpoints in roles. See [Endpoint Roles](./endpoint.html#endpoint-roles) for more information. By default, POJO methods are now invoked by using an `InvocableHandlerMethod`, but you can configure them to use SpEL, as before. See [POJO Method invocation](./overview.html#pojo-invocation) for more information. When targeting POJO methods as message handlers, you can now mark one of the service methods with the `@Default` annotation to provide a fallback mechanism for non-matched conditions. See [Configuring Service Activator](./service-activator.html#service-activator-namespace) for more information. We added a simple `PassThroughTransactionSynchronizationFactory` to always store a polled message in the current transaction context. That message is used as a `failedMessage` property of the `MessagingException`, which wraps any raw exception thrown during transaction completion. See [Transaction Synchronization](./transactions.html#transaction-synchronization) for more information. The aggregator expression-based `ReleaseStrategy` now evaluates the expression against the `MessageGroup` instead of just the collection of `Message`. See [Aggregators and Spring Expression Language (SpEL)](./aggregator.html#aggregator-spel) for more information. You can now supply the `ObjectToMapTransformer` with a customized `JsonObjectMapper`. See [Aggregators and Spring Expression Language (SpEL)](./aggregator.html#aggregator-spel) for more information. The `@GlobalChannelInterceptor` annotation and `` now support negative patterns (via `!` prepending) for component names matching. See [Global Channel Interceptor Configuration](./channel.html#global-channel-configuration-interceptors) for more information. When a candidate failed to acquire the lock, the `LockRegistryLeaderInitiator` now emits a new `OnFailedToAcquireMutexEvent` through `DefaultLeaderEventPublisher`. See `[Leadership Event Handling](./endpoint.html#leadership-event-handling)` for more information. ##### Gateway Changes When the gateway method has a `void` return type and an error channel is provided, the gateway now correctly sets the `errorChannel` header. Previously, the header was not populated. This caused synchronous downstream flows (running on the calling thread) to send the exception to the configured channel, but an exception on an asynchronous downstream flow would be sent to the default `errorChannel` instead. The `RequestReplyExchanger` interface now has a `throws MessagingException` clause to meet the proposed messages exchange contract. You can now specify the request and reply timeouts with SpEL expressions. See [Messaging Gateways](./gateway.html#gateway) for more information. ##### Aggregator Performance Changes By default, aggregators now use a `SimpleSequenceSizeReleaseStrategy`, which is more efficient, especially with large groups. Empty groups are now scheduled for removal after `empty-group-min-timeout`. See [Aggregator](./aggregator.html#aggregator) for more information. ##### Splitter Changes The splitter component can now handle and split Java `Stream` and Reactive Streams `Publisher` objects. If the output channel is a `ReactiveStreamsSubscribableChannel`, the `AbstractMessageSplitter` builds a `Flux` for subsequent iteration instead of a regular `Iterator`, independent of the object being split. In addition, `AbstractMessageSplitter` provides `protected obtainSizeIfPossible()` methods to allow determination of the size of the `Iterable` and `Iterator` objects, if that is possible. See [Splitter](./splitter.html#splitter) for more information. ##### JMS Changes Previously, Spring Integration JMS XML configuration used a default bean name of `connectionFactory` for the JMS connection factory, letting the property be omitted from component definitions. We renamed it to `jmsConnectionFactory`, which is the bean name used by Spring Boot to auto-configure the JMS connection factory bean. If your application relies on the previous behavior, you can rename your `connectionFactory` bean to `jmsConnectionFactory` or specifically configure your components to use your bean by using its current name. See [JMS Support](./jms.html#jms) for more information. ##### Mail Changes Some inconsistencies with rendering IMAP mail content have been resolved. See [the note in the “Mail-receiving Channel Adapter” section](./mail.html#imap-format-important) for more information. ##### Feed Changes Instead of the `com.rometools.fetcher.FeedFetcher`, which is deprecated in ROME, we introduced a new `Resource` property for the `FeedEntryMessageSource`. See [Feed Adapter](./feed.html#feed) for more information. ##### File Changes We introduced the new `FileHeaders.RELATIVE_PATH` message header to represent relative path in `FileReadingMessageSource`. The tail adapter now supports `idleEventInterval` to emit events when there is no data in the file during that period. The flush predicates for the `FileWritingMessageHandler` now have an additional parameter. The file outbound channel adapter and gateway (`FileWritingMessageHandler`) now support the `REPLACE_IF_MODIFIED` `FileExistsMode`. They also now support setting file permissions on the newly written file. A new `FileSystemMarkerFilePresentFileListFilter` is now available. See [Dealing With Incomplete Data](./file.html#file-incomplete) for more information. The `FileSplitter` now provides a `firstLineAsHeader` option to carry the first line of content as a header in the messages emitted for the remaining lines. See [File Support](./file.html#files) for more information. ##### FTP and SFTP Changes The inbound channel adapters now have a property called `max-fetch-size`, which is used to limit the number of files fetched during a poll when no files are currently in the local directory. By default, they also are configured with a `FileSystemPersistentAcceptOnceFileListFilter` in the `local-filter`. You can also provide a custom `DirectoryScanner` implementation to inbound channel adapters by setting the newly introduced `scanner` attribute. You can now configure the regex and pattern filters to always pass directories. This can be useful when you use recursion in the outbound gateways. By default, all the inbound channel adapters (streaming and synchronization-based) now use an appropriate `AbstractPersistentAcceptOnceFileListFilter` implementation to prevent duplicate downloads of remote files. The FTP and SFTP outbound gateways now support the `REPLACE_IF_MODIFIED` `FileExistsMode` when fetching remote files. The FTP and SFTP streaming inbound channel adapters now add remote file information in a message header. The FTP and SFTP outbound channel adapters (as well as the `PUT` command for outbound gateways) now support `InputStream` as `payload`, too. The inbound channel adapters can now build file trees locally by using a newly introduced `RecursiveDirectoryScanner`. See the `scanner` option in the [FTP Inbound Channel Adapter](./ftp.html#ftp-inbound) section for injection. Also, you can now switch these adapters to the `WatchService` instead. We added The `NLST` command to the `AbstractRemoteFileOutboundGateway` to perform the list files names remote command. You can now supply the `FtpOutboundGateway` with `workingDirExpression` to change the FTP client working directory for the current request message. The `RemoteFileTemplate` is supplied now with the `invoke(OperationsCallback action)` to perform several `RemoteFileOperations` calls in the scope of the same, thread-bounded, `Session`. We added new filters for detecting incomplete remote files. The `FtpOutboundGateway` and `SftpOutboundGateway` now support an option to remove the remote file after a successful transfer by using the `GET` or `MGET` commands. See [FTP/FTPS Adapters](./ftp.html#ftp) and [SFTP Adapters](./sftp.html#sftp) for more information. ##### Integration Properties Version 4.3.2 added a new `spring.integration.readOnly.headers` global property to let you customize the list of headers that should not be copied to a newly created `Message` by the `MessageBuilder`. See [Global Properties](./configuration.html#global-properties) for more information. ##### Stream Changes We added a new option on the `CharacterStreamReadingMessageSource` to let it be used to “pipe” stdin and publish an application event when the pipe is closed. See [Reading from Streams](./stream.html#stream-reading) for more information. ##### Barrier Changes The `BarrierMessageHandler` now supports a discard channel to which late-arriving trigger messages are sent. See [Thread Barrier](./barrier.html#barrier) for more information. ##### AMQP Changes The AMQP outbound endpoints now support setting a delay expression when you use the RabbitMQ Delayed Message Exchange plugin. The inbound endpoints now support the Spring AMQP `DirectMessageListenerContainer`. Pollable AMQP-backed channels now block the poller thread for the poller’s configured `receiveTimeout` (default: one second). Headers, such as `contentType`, that are added to message properties by the message converter are now used in the final message. Previously, it depended on the converter type as to which headers and message properties appeared in the final message. To override the headers set by the converter, set the `headersMappedLast` property to `true`. See [AMQP Support](./amqp.html#amqp) for more information. ##### HTTP Changes By default, the `DefaultHttpHeaderMapper.userDefinedHeaderPrefix` property is now an empty string instead of `X-`. See [HTTP Header Mappings](./http.html#http-header-mapping) for more information. By default, `uriVariablesExpression` now uses a `SimpleEvaluationContext` (since 5.0.4). See [Mapping URI Variables](./http.html#mapping-uri-variables) for more information. ##### MQTT Changes Inbound messages are now mapped with the `RECEIVED_TOPIC`, `RECEIVED_QOS`, and `RECEIVED_RETAINED` headers to avoid inadvertent propagation to outbound messages when an application relays messages. The outbound channel adapter now supports expressions for the topic, qos, and retained properties. The defaults remain the same. See [MQTT Support](./mqtt.html#mqtt) for more information. ##### STOMP Changes We changed the STOMP module to use `ReactorNettyTcpStompClient`, based on the Project Reactor `3.1` and `reactor-netty` extension. We renamed `Reactor2TcpStompSessionManager` to `ReactorNettyTcpStompSessionManager`, according to the `ReactorNettyTcpStompClient` foundation. See [STOMP Support](./stomp.html#stomp) for more information. ##### Web Services Changes You can now supply `WebServiceOutboundGateway` instances with an externally configured `WebServiceTemplate` instances. `DefaultSoapHeaderMapper` can now map a `javax.xml.transform.Source` user-defined header to a SOAP header element. Simple WebService inbound and outbound gateways can now deal with the complete `WebServiceMessage` as a `payload`, allowing the manipulation of MTOM attachments. See [Web Services Support](./ws.html#ws) for more information. ##### Redis Changes The `RedisStoreWritingMessageHandler` is supplied now with additional `String`-based setters for SpEL expressions (for convenience with Java configuration). You can now configure the `zsetIncrementExpression` on the `RedisStoreWritingMessageHandler` as well. In addition, this property has been changed from `true` to `false` since the `INCR` option on `ZADD` Redis command is optional. You can now supply the `RedisInboundChannelAdapter` with an `Executor` for executing Redis listener invokers. In addition, the received messages now contain a `RedisHeaders.MESSAGE_SOURCE` header to indicate the source of the message (topic or pattern). See [Redis Support](./redis.html#redis) for more information. ##### TCP Changes We added a new `ThreadAffinityClientConnectionFactory` to bind TCP connections to threads. You can now configure the TCP connection factories to support `PushbackInputStream` instances, letting deserializers “unread” (push back) bytes after “reading ahead”. We added a `ByteArrayElasticRawDeserializer` without `maxMessageSize` to control and buffer incoming data as needed. See [TCP and UDP Support](./ip.html#ip) for more information. ##### Gemfire Changes The `GemfireMetadataStore` now implements `ListenableMetadataStore`, letting you listen to cache events by providing `MetadataStoreListener` instances to the store. See [Pivotal GemFire and Apache Geode Support](./gemfire.html#gemfire) for more information. ##### JDBC Changes The `JdbcMessageChannelStore` now provides a setter for `ChannelMessageStorePreparedStatementSetter`, letting you customize message insertion in the store. The `ExpressionEvaluatingSqlParameterSourceFactory` now provides a setter for `sqlParameterTypes`, letting you customize the SQL types of the parameters. See [JDBC Support](./jdbc.html#jdbc) for more information. ##### Metrics Changes [Micrometer](https://micrometer.io/) application monitoring is now supported (since version 5.0.2). See [Micrometer Integration](./metrics.html#micrometer-integration) for more information. | |Changes were made to the Micrometer `Meters` in version 5.0.3 to make them more suitable for use in dimensional systems.
Further changes were made in 5.0.4.
If you use Micrometer, we recommend a minimum of version 5.0.4.| |---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ##### `@EndpointId` Annotations Introduced in version 5.0.4, this annotation provides control over bean naming when you use Java configuration. See [Endpoint Bean Names](./overview.html#endpoint-bean-names) for more information. ### Changes between 4.2 and 4.3 See the [Migration Guide](https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.2-to-4.3-Migration-Guide)for important changes that might affect your applications. You can find migration guides for all versions back to 2.1 on the [Wiki](https://github.com/spring-projects/spring-integration/wiki). #### New Components Version 4.3 added a number of new components. ##### AMQP Async Outbound Gateway See [Asynchronous Outbound Gateway](./amqp.html#amqp-async-outbound-gateway). ##### `MessageGroupFactory` We introduced the `MessageGroupFactory` strategy to allow control over `MessageGroup` instances in `MessageGroupStore` logic. We added `SimpleMessageGroupFactory` implementation for the `SimpleMessageGroup`, with the `GroupType.HASH_SET` as the default factory for the standard `MessageGroupStore` implementations. See [Message Store](./message-store.html#message-store) for more information. ##### `PersistentMessageGroup` We added the `PersistentMessageGroup` (lazy-load proxy) implementation for persistent `MessageGroupStore` instances, which return this instance for the `getMessageGroup()` when their `lazyLoadMessageGroups` is `true` (the default). See [Message Store](./message-store.html#message-store) for more information. ##### FTP and SFTP Streaming Inbound Channel Adapters We added inbound channel adapters that return an `InputStream` for each file, letting you retrieve remote files without writing them to the local file system. See [FTP Streaming Inbound Channel Adapter](./ftp.html#ftp-streaming) and [SFTP Streaming Inbound Channel Adapter](./sftp.html#sftp-streaming) for more information. ##### `StreamTransformer` We added `StreamTransformer` to transform an `InputStream` payload to either a `byte[]` or a `String`. See [Stream Transformer](./transformer.html#stream-transformer) for more information. ##### Integration Graph We added `IntegrationGraphServer`, together with the `IntegrationGraphController` REST service, to expose the runtime model of a Spring Integration application as a graph. See [Integration Graph](./graph.html#integration-graph) for more information. ##### JDBC Lock Registry We added `JdbcLockRegistry` for distributed locks shared through a database table. See [JDBC Lock Registry](./jdbc.html#jdbc-lock-registry) for more information. ##### `LeaderInitiator` for `LockRegistry` We added `LeaderInitiator` implementation based on the `LockRegistry` strategy. See [Leadership Event Handling](./endpoint.html#leadership-event-handling) for more information. #### General Changes This section describes general changes that version 4.3 brought to Spring Integration. ##### Core Changes This section describes general changes to the core of Spring Integration. ###### Outbound Gateway within a Chain Previously, you could specify a `reply-channel` on an outbound gateway within a chain. It was completely ignored. The gateway’s reply goes to the next chain element or, if the gateway is the last element, to the chain’s output channel. This condition is now detected and disallowed. If you have such a configuration, remove the `reply-channel`. ###### Asynchronous Service Activator We added an option to make the service activator be synchronous. See [Asynchronous Service Activator](./service-activator.html#async-service-activator) for more information. ###### Messaging Annotation Support changes The messaging annotation support does not require a `@MessageEndpoint` (or any other `@Component`) annotation declaration on the class level. To restore the previous behavior, set the `spring.integration.messagingAnnotations.require.componentAnnotation` of`spring.integration.properties` to `true`. See [Global Properties](./configuration.html#global-properties) and [Annotation Support](./configuration.html#annotations) for more information. ##### Mail Changes This section describes general changes to the Spring Integration Mail functionality. ###### Customizable User Flag The customizable `userFlag` (added in 4.2.2 to provide customization of the flag used to denote that the mail has been seen) is now available in the XML namespace. See [Marking IMAP Messages When `\Recent` Is Not Supported](./mail.html#imap-seen) for more information. ###### Mail Message Mapping You can now map inbound mail messages with the `MessageHeaders` containing the mail headers and the payload containing the email content. Previously, the payload was always the raw `MimeMessage`. See [Inbound Mail Message Mapping](./mail.html#mail-mapping) for more information. ##### JMS Changes This section describes general changes to the Spring Integration JMS functionality. ###### Header Mapper The `DefaultJmsHeaderMapper` now maps the standard `correlationId` header as a message property by invoking its `toString()` method. See [Mapping Message Headers to and from JMS Message](./jms.html#jms-header-mapping) for more information. ###### Asynchronous Gateway The JMS outbound gateway now has an `async` property. See [Async Gateway](./jms.html#jms-async-gateway) for more information. ##### Aggregator Changes There is a change in behavior when a POJO aggregator releases a collection of `Message` objects. This is rare, but, if your application does that, you need to make a small change to your POJO. See this [IMPORTANT: The `SimpleMessageGroup.getMessages()` method returns an `unmodifiableCollection`.](./aggregator.html#agg-message-collection) note for more information. ##### TCP/UDP Changes This section describes general changes to the Spring Integration TCP/UDP functionality. ###### Events A new `TcpConnectionServerListeningEvent` is emitted when a server connection factory is started. See [TCP Connection Events](./ip.html#tcp-events) for more information. You can now use the `destination-expression` and `socket-expression` attributes on ``. See [UDP Adapters](./ip.html#udp-adapters) for more information. ###### Stream Deserializers The various deserializers that cannot allocate the final buffer until the whole message has been assembled now support pooling the raw buffer into which the data is received rather than creating and discarding a buffer for each message. See [TCP Connection Factories](./ip.html#tcp-connection-factories) for more information. ###### TCP Message Mapper The message mapper now, optionally, sets a configured content type header. See [IP Message Headers](./ip.html#ip-msg-headers) for more information. ##### File Changes This section describes general changes to the Spring Integration File functionality. ###### Destination Directory Creation The generated file name for the `FileWritingMessageHandler` can represent a sub-path to save the desired directory structure for a file in the target directory. See [Generating File Names](./file.html#file-writing-file-names) for more information. The `FileReadingMessageSource` now hides the `WatchService` directory scanning logic in the inner class. We added the `use-watch-service` and `watch-events` options to enable this behavior. We deprecated the top-level `WatchServiceDirectoryScanner` because of inconsistency around the API. See [`WatchServiceDirectoryScanner`](./file.html#watch-service-directory-scanner) for more information. ###### Buffer Size When writing files, you can now specify the buffer size. ###### Appending and Flushing You can now avoid flushing files when appending and use a number of strategies to flush the data during idle periods. See [Flushing Files When Using `APPEND_NO_FLUSH`](./file.html#file-flushing) for more information. ###### Preserving Timestamps You can now configure the outbound channel adapter to set the destination file’s `lastmodified` timestamp. See [File Timestamps](./file.html#file-timestamps) for more information. ###### Splitter Changes The `FileSplitter` now automatically closes an FTP or SFTP session when the file is completely read. This applies when the outbound gateway returns an `InputStream` or when you use the new FTP or SFTP streaming channel adapters. We also introduced a new `markers-json` option to convert `FileSplitter.FileMarker` to JSON `String` for relaxed downstream network interaction. See [File Splitter](./file.html#file-splitter) for more information. ###### File Filters We added `ChainFileListFilter` as an alternative to `CompositeFileListFilter`. See [Reading Files](./file.html#file-reading) for more information. ##### AMQP Changes This section describes general changes to the Spring Integration AMQP functionality. ###### Content Type Message Converter The outbound endpoints now support a `RabbitTemplate` configured with a `ContentTypeDelegatingMessageConverter` such that you can choose the converter based on the message content type. See [Outbound Message Conversion](./amqp.html#content-type-conversion-outbound) for more information. ###### Headers for Delayed Message Handling Spring AMQP 1.6 adds support for [delayed message exchanges](https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq/). Header mapping now supports the headers (`amqp_delay` and `amqp_receivedDelay`) used by this feature. ###### AMQP-Backed Channels AMQP-backed channels now support message mapping. See [AMQP-backed Message Channels](./amqp.html#amqp-channels) for more information. ##### Redis Changes This section describes general changes to the Spring Integration Redis functionality. ###### List Push/Pop Direction Previously, the queue channel adapters always used the Redis list in a fixed direction, pushing to the left end and reading from the right end. You can now configure the reading and writing direction with the `rightPop` and `leftPush` options for the`RedisQueueMessageDrivenEndpoint` and `RedisQueueOutboundChannelAdapter`, respectively. See [Redis Queue Inbound Channel Adapter](./redis.html#redis-queue-inbound-channel-adapter) and [Redis Queue Outbound Channel Adapter](./redis.html#redis-queue-outbound-channel-adapter) for more information. ###### Queue Inbound Gateway Default Serializer The default serializer in the inbound gateway has been changed to a `JdkSerializationRedisSerializer` for compatibility with the outbound gateway. See [Redis Queue Inbound Gateway](./redis.html#redis-queue-inbound-gateway) for more information. ##### HTTP Changes Previously, with requests that had a body (such as `POST`) that had no `content-type` header, the body was ignored. With this release, the content type of such requests is considered to be `application/octet-stream` as recommended by RFC 2616. See [Http Inbound Components](./http.html#http-inbound) for more information. `uriVariablesExpression` now uses a `SimpleEvaluationContext` by default (since 4.3.15). See [Mapping URI Variables](./http.html#mapping-uri-variables) for more information. ##### SFTP Changes This section describes general changes to the Spring Integration SFTP functionality. ###### Factory Bean We added a new factory bean to simplify the configuration of Jsch proxies for SFTP. See [Proxy Factory Bean](./sftp.html#sftp-proxy-factory-bean) for more information. ###### `chmod` Changes The SFTP outbound gateway (for `put` and `mput` commands) and the SFTP outbound channel adapter now support the `chmod` attribute to change the remote file permissions after uploading. See `[SFTP Outbound Channel Adapter](./sftp.html#sftp-outbound)` and `[SFTP Outbound Gateway](./sftp.html#sftp-outbound-gateway)` for more information. ##### FTP Changes This section describes general changes to the Spring Integration FTP functionality. ###### Session Changes The `FtpSession` now supports `null` for the `list()` and `listNames()` methods, since underlying FTP Client can use it. With that, you can now configure the `FtpOutboundGateway` without the `remoteDirectory` expression. You can also configure the `` without `remote-directory` or `remote-directory-expression`. See [FTP/FTPS Adapters](./ftp.html#ftp) for more information. ##### Router Changes The `ErrorMessageExceptionTypeRouter` now supports the `Exception` superclass mappings to avoid duplication for the same channel in case of multiple inheritors. For this purpose, the `ErrorMessageExceptionTypeRouter` loads mapping classes during initialization to fail-fast for a `ClassNotFoundException`. See [Routers](./router.html#router) for more information. ##### Header Mapping This section describes the changes to header mapping between version 4.2 and 4.3. ###### General AMQP, WS, and XMPP header mappings (such as `request-header-mapping` and `reply-header-mapping`) now support negated patterns. See [AMQP Message Headers](./amqp.html#amqp-message-headers), [WS Message Headers](./ws.html#ws-message-headers), and [XMPP Message Headers](./xmpp.html#xmpp-message-headers) for more information. ###### AMQP Header Mapping Previously, only standard AMQP headers were mapped by default. You had to explicitly enable mapping of user-defined headers. With this release, all headers are mapped by default. In addition, the inbound `amqp_deliveryMode` header is no longer mapped by default. See [AMQP Message Headers](./amqp.html#amqp-message-headers) for more information. ##### Groovy Scripts You can now configure groovy scripts with the `compile-static` hint or any other `CompilerConfiguration` options. See [Groovy Configuration](./groovy.html#groovy-config) for more information. ##### `@InboundChannelAdapter` Changes The `@InboundChannelAdapter` now has an alias `channel` attribute for the regular `value`. In addition, the target `SourcePollingChannelAdapter` components can now resolve the target `outputChannel` bean from its provided name (`outputChannelName` options) in a late-binding manner. See [Annotation Support](./configuration.html#annotations) for more information. ##### XMPP Changes The XMPP channel adapters now support the XMPP Extensions (XEP). See [XMPP Extensions](./xmpp.html#xmpp-extensions) for more information. ##### WireTap Late Binding The `WireTap` `ChannelInterceptor` now can accept a `channelName` that is resolved to the target `MessageChannel`later, during the first active interceptor operation. See [Wire Tap](./channel.html#channel-wiretap) for more information. ##### `ChannelMessageStoreQueryProvider` Changes The `ChannelMessageStoreQueryProvider` now supports H2 databases. See [Backing Message Channels](./jdbc.html#jdbc-message-store-channels) for more information. ##### WebSocket Changes The `ServerWebSocketContainer` now exposes an `allowedOrigins` option, and `SockJsServiceOptions` exposes a `suppressCors` option. See [WebSockets Support](./web-sockets.html#web-sockets) for more information. ### Changes between 4.1 and 4.2 See the [Migration Guide](https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.1-to-4.2-Migration-Guide) for important changes that might affect your applications. You can find migration guides for all versions back to 2.1 on the [wiki](https://github.com/spring-projects/spring-integration/wiki). #### New Components Version 4.2 added a number of new components. ##### Major Management/JMX Rework We added a new `MetricsFactory` strategy interface. This change, together with other changes in the JMX and management infrastructure, provides much more control over management configuration and runtime performance. However, this has some important implications for (some) user environments. For complete details, see [Metrics and Management](./metrics.html#metrics-management) and [JMX Improvements](./jmx.html#jmx-42-improvements). ##### MongoDB Metadata Store The `MongoDbMetadataStore` is now available. For more information, see [MongoDB Metadata Store](./mongodb.html#mongodb-metadata-store). ##### SecuredChannel Annotation We introduced the `@SecuredChannel` annotation, replacing the deprecated `ChannelSecurityInterceptorFactoryBean`. For more information, see [Security in Spring Integration](./security.html#security). ##### `SecurityContext` Propagation We introduced the `SecurityContextPropagationChannelInterceptor` for the `SecurityContext` propagation from one message flow’s thread to another. For more information, see [Security in Spring Integration](./security.html#security). ##### FileSplitter In 4.1.2, we added `FileSplitter`, which splits text files into lines. It now has full support in the `int-file:` namespace. See [File Splitter](./file.html#file-splitter) for more information. ##### Zookeeper Support We added Zookeeper support to the framework to assist when running on a clustered or multi-host environment. The change impacts the following features: * `ZookeeperMetadataStore` * `ZookeeperLockRegistry` * Zookeeper Leadership See [Zookeeper Support](./zookeeper.html#zookeeper) for more information. ##### Thread Barrier A new thread `` component is available, letting a thread be suspended until some asynchronous event occurs. See [Thread Barrier](./barrier.html#barrier) for more information. ##### STOMP Support We added STOMP support to the framework as an inbound and outbound channel adapters pair. See [STOMP Support](./stomp.html#stomp) for more information. ##### Codec A new `Codec` abstraction has been introduced, to encode and decode objects to and from `byte[]`. We added an implementation that uses Kryo. We also added codec-based transformers and message converters. See [Codec](./codec.html#codec) for more information. ##### Message PreparedStatement Setter A new `MessagePreparedStatementSetter` functional interface callback is available for the `JdbcMessageHandler` (`` and ``) as an alternative to using `SqlParameterSourceFactory` to populate parameters on the `PreparedStatement` with the `requestMessage` context. See [Outbound Channel Adapter](./jdbc.html#jdbc-outbound-channel-adapter) for more information. #### General Changes This section describes general changes from version 4.1 to version 4.2. ##### WireTap As an alternative to the existing `selector` attribute, the `` element now supports the `selector-expression` attribute. ##### File Changes See [File Support](./file.html#files) for more information about these changes. ###### Appending New Lines The `` and `` 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`. ###### Ignoring Hidden Files We added the `ignore-hidden` attribute for the `` to let you set whether to pick up hidden files from the source directory. It defaults to `true`. ###### Writing `InputStream` Payloads The `FileWritingMessageHandler` now also accepts `InputStream` as a valid message payload type. ###### `HeadDirectoryScanner` You can now use the `HeadDirectoryScanner` with other `FileListFilter` implementations. ###### Last Modified Filter We added the `LastModifiedFileListFilter`. ###### Watch Service Directory Scanner We added the `WatchServiceDirectoryScanner`. ###### Persistent File List Filter Changes The `AbstractPersistentFileListFilter` has a new property (`flushOnUpdate`) which, when set to `true`, calls `flush()` on the metadata store if it implements `Flushable` (for example, `PropertiesPersistingMetadataStore`). ##### Class Package Change We moved the `ScatterGatherHandler` class from the `org.springframework.integration.handler` to the `org.springframework.integration.scattergather`. ##### TCP Changes This section describes general changes to the Spring Integration TCP functionality. ###### TCP Serializers The TCP `Serializers` no longer `flush()` the `OutputStream`. This is now done by the `TcpNxxConnection` classes. If you use the serializers directly within your code, you may have to `flush()` the `OutputStream`. ###### Server Socket Exceptions `TcpConnectionServerExceptionEvent` instances are now published whenever an unexpected exception occurs on a TCP server socket (also added to 4.1.3 and 4.0.7). See [TCP Connection Events](./ip.html#tcp-events) for more information. ###### TCP Server Port If you configure a TCP server socket factory to listen on a random port, you can now obtain the actual port chosen by the OS by using `getPort()`.`getServerSocketAddress()` is also available. See "[TCP Connection Factories](./ip.html#tcp-connection-factories)" for more information. ###### 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 [.TCP Outbound Gateway Attributes](./ip.html#tcp-ob-gateway-attributes) for more information. ###### TCP SSLSession Available for Header Mapping `TcpConnection` implementations now support `getSslSession()` to let you extract information from the session to add to message headers. See [IP Message Headers](./ip.html#ip-msg-headers) for more information. ###### TCP Events New events are now published whenever a correlation exception occurs — such as sending a message to a non-existent socket. The `TcpConnectionEventListeningMessageProducer` is deprecated. Use the generic event adapter instead. See [TCP Connection Events](./ip.html#tcp-events) for more information. ##### `@InboundChannelAdapter` Changes Previously, the `@Poller` on an inbound channel adapter defaulted the `maxMessagesPerPoll` attribute to `-1` (infinity). This was inconsistent with the XML configuration of ``, which defaults to `1`. The annotation now defaults this attribute to `1`. ##### API Changes `o.s.integration.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 need to change the import. Reactor is still supported for functionality such as the `Promise` gateway. The dependency was removed for those users who do not need it. ##### JMS Changes This section describes general changes to the Spring Integration TCP functionality. ###### Reply Listener Lazy Initialization You can now configure the reply listener in JMS outbound gateways to be initialized on-demand and stopped after an idle period, instead of being controlled by the gateway’s lifecycle. See [Outbound Gateway](./jms.html#jms-outbound-gateway) for more information. ###### Conversion Errors in Message-Driven Endpoints The `error-channel` is now used for the conversion errors. In previous versions, they caused transaction rollback and message redelivery. See [Message-driven Channel Adapter](./jms.html#jms-message-driven-channel-adapter) and [Inbound Gateway](./jms.html#jms-inbound-gateway) for more information. ###### Default Acknowledge Mode When using an implicitly defined `DefaultMessageListenerContainer`, the default `acknowledge` is now `transacted`. We recommend using `transacted` when using this container, to avoid message loss. This default now applies to the message-driven inbound adapter and the inbound gateway. It was already the default for JMS-backed channels. See [Message-driven Channel Adapter](./jms.html#jms-message-driven-channel-adapter) and [Inbound Gateway](./jms.html#jms-inbound-gateway) for more information. ###### Shared Subscriptions We added Namespace support for shared subscriptions (JMS 2.0) to message-driven endpoints and the ``. Previously, you had to wire up listener containers as `` declarations to use shared connections. See [JMS Support](./jms.html#jms) for more information. ##### Conditional Pollers We now provide much more flexibility for dynamic polling. See [Conditional Pollers for Message Sources](./polling-consumer.html#conditional-pollers) for more information. ##### AMQP Changes This section describes general changes to the Spring Integration AMQP functionality. ###### Publisher Confirmations The `` now supports `confirm-correlation-expression`, `confirm-ack-channel`, and `confirm-nack-channel` attributes (which have a purpose similar to that of ``). ###### Correlation Data For both the outbound channel adapter and the inbound gateway, if the correlation data is a `Message`, it becomes the basis of the message on the ack or nack channel, with the additional header(s) added. Previously, any correlation data (including `Message`) was returned as the payload of the ack or nack message. ###### Inbound Gateway Properties The `` now exposes the `amqp-template` attribute to allow more control over an external bean for the reply `RabbitTemplate`. You can also provide your own `AmqpTemplate` implementation. In addition, you can use `default-reply-to` if the request message does not have a `replyTo` property. See [AMQP Support](./amqp.html#amqp) for more information. ##### XPath Splitter Improvements The `XPathMessageSplitter` (``) 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 [Splitting XML Messages](./xml.html#xml-xpath-splitting) for more information. ##### HTTP Changes This section describes general changes to the Spring Integration HTTP functionality. ###### CORS The HTTP inbound endpoints (`` and ``) now allow the configuration of Cross-origin Resource Sharing (CORS). See [Cross-origin Resource Sharing (CORS) Support](./http.html#http-cors) for more information. ###### Inbound Gateway Timeout You can configure the HTTP inbound gate way to return a status code that you specify when a request times out. The default is now `500 Internal Server Error` instead of `200 OK`. See [Response Status Code](./http.html#http-response-statuscode) for more information. ###### Form Data We added documentation for proxying `multipart/form-data` requests. See [HTTP Support](./http.html#http) for more information. ##### Gateway Changes This section describes general changes to the Spring Integration Gateway functionality. ###### Gateway Methods can Return `CompletableFuture` When using Java 8, gateway methods can now return `CompletableFuture`. See [`CompletableFuture`](./gateway.html#gw-completable-future) for more information. ###### MessagingGateway Annotation The request and reply timeout properties are now `String` instead of `Long` to allow configuration with property placeholders or SpEL. See [`@MessagingGateway` Annotation](./gateway.html#messaging-gateway-annotation). ##### Aggregator Changes This section describes general changes to the Spring Integration aggregator functionality. ###### Aggregator Performance This release includes some performance improvements for aggregating components (aggregator, resequencer, and others), by more efficiently removing messages from groups when they are released. New methods (`removeMessagesFromGroup`) have been added to the message store. Set the `removeBatchSize` property (default: `100`) to adjust the number of messages deleted in each operation. Currently, the JDBC, Redis, and MongoDB message stores support this property. ###### Output Message Group Processor When using a `ref` or inner bean for the aggregator, you can now directly bind a `MessageGroupProcessor`. In addition, we added a `SimpleMessageGroupProcessor` that returns the collection of messages in the group. When an output processor produces a collection of `Message`, the aggregator releases those messages individually. Configuring the `SimpleMessageGroupProcessor` makes the aggregator a message barrier, where messages are held up until they all arrive and are then released individually. See [Aggregator](./aggregator.html#aggregator) for more information. ##### FTP and SFTP Changes This section describes general changes to the Spring Integration FTP and SFTP functionality. ###### Inbound Channel Adapters You can now specify a `remote-directory-expression` on the inbound channel adapters, to determine the directory at runtime. See [FTP/FTPS Adapters](./ftp.html#ftp) and [SFTP Adapters](./sftp.html#sftp) for more information. ###### Gateway Partial Results When you use FTP or SFTP outbound gateways to operate on multiple files (with `mget` and `mput`), an exception can occur after part of the request is completed. If such a condition occurs, a `PartialSuccessException` that contains the partial results is thrown. See [FTP Outbound Gateway](./ftp.html#ftp-outbound-gateway) and [SFTP Outbound Gateway](./sftp.html#sftp-outbound-gateway) for more information. ###### Delegating Session Factory We added a delegating session factory, enabling the selection of a particular session factory based on some thread context value. See [Delegating Session Factory](./ftp.html#ftp-dsf) and [Delegating Session Factory](./sftp.html#sftp-dsf) for more information. ###### Default Sftp Session Factory Previously, the `DefaultSftpSessionFactory` unconditionally allowed connections to unknown hosts. This is now configurable (default: `false`). The factory now requires a configured `knownHosts`, file unless the `allowUnknownKeys` property is `true` (default: `false`). See [`allowUnknownKeys`::Set to `true` to allow connections to hosts with unknown (or changed) keys.](./sftp.html#sftp-unk-keys) for more information. ###### Message Session Callback We introduced the `MessageSessionCallback` to perform any custom `Session` operations with the `requestMessage` context in the ``. See [Using `MessageSessionCallback`](./ftp.html#ftp-session-callback) and [MessageSessionCallback](./sftp.html#sftp-session-callback) for more information. ##### Websocket Changes We added `WebSocketHandlerDecoratorFactory` support to the `ServerWebSocketContainer` to allow chained customization for the internal `WebSocketHandler`. See [WebSockets Namespace Support](./web-sockets.html#web-sockets-namespace) for more information. ##### Application Event Adapters changes The `ApplicationEvent` adapters can now operate with `payload` as an `event` to directly allow omitting custom `ApplicationEvent` extensions. For this purpose, we introduced the `publish-payload` boolean attribute has been introduced on the ``. See [Spring `ApplicationEvent` Support](./event.html#applicationevent) for more information. ### Changes between 4.0 and 4.1 See the [Migration Guide](https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.0-to-4.1-Migration-Guide) for important changes that might affect your applications. You can find migration guides for all versions back to 2.1 on the [wiki](https://github.com/spring-projects/spring-integration/wiki). #### New Components Version 4.1 added a number of new components. ##### Promise\ Gateway The messaging gateway methods now support a Reactor `Promise` return type. See [Asynchronous Gateway](./gateway.html#async-gateway). ##### WebSocket support The `WebSocket` module is now available. It is fully based on the Spring WebSocket and Spring Messaging modules and provides an `` and an ``. See [WebSockets Support](./web-sockets.html#web-sockets) for more information. ##### Scatter-Gather Enterprise Integration Pattern We implemented the scatter-gather enterprise integration pattern. See [Scatter-Gather](./scatter-gather.html#scatter-gather) for more information. ##### Routing Slip Pattern We added the routing slip EIP pattern implementation. See [Routing Slip](./router.html#routing-slip) for more information. ##### Idempotent Receiver Pattern We added the idempotent receiver enterprise integration pattern implementation by adding the `` component in XML or the `IdempotentReceiverInterceptor` and `IdempotentReceiver` annotations for Java configuration. See [Idempotent Receiver Enterprise Integration Pattern](./handler-advice.html#idempotent-receiver) and the [Javadoc](https://docs.spring.io/spring-integration/api/index.html) for more information. ##### Boon `JsonObjectMapper` We added the Boon `JsonObjectMapper` for the JSON transformers. See [Transformer](./transformer.html#transformer) for more information. ##### Redis Queue Gateways We added the `` and `` components. See [Redis Queue Inbound Gateway](./redis.html#redis-queue-inbound-gateway) and [Redis Queue Outbound Gateway](./redis.html#redis-queue-outbound-gateway). ##### `PollSkipAdvice` We added the `PollSkipAdvice`, which you can use within the `` of the `` to determine if the current poll should be suppressed (skipped) by some condition that you implement with `PollSkipStrategy`. See [Poller](./polling-consumer.html#polling-consumer) for more information. #### General Changes This section describes general changes from version 4.0 to version 4.1. ##### AMQP Inbound Endpoints, Channel Elements that use a message listener container (inbound endpoints and channel) now support the `missing-queues-fatal` attribute. See [AMQP Support](./amqp.html#amqp) for more information. ##### AMQP Outbound Endpoints The AMQP outbound endpoints support a new property called `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 try to establish the connection during startup). When set to `false`, an attempt to establish the connection is made during application startup. See [AMQP Support](./amqp.html#amqp) for more information. ##### SimpleMessageStore The `SimpleMessageStore` no longer makes a copy of the group when calling `getMessageGroup()`. See [[WARNING]](./message-store.html#sms-caution) for more information. ##### Web Service Outbound Gateway: `encode-uri` The `` now provides an `encode-uri` attribute to allow disabling the encoding of the URI object before sending the request. ##### Http Inbound Channel Adapter and Status Code The `` can now be configured with a `status-code-expression` to override the default `200 OK` status. See [HTTP Namespace Support](./http.html#http-namespace) for more information. ##### MQTT Adapter Changes You can now configure the MQTT channel adapters to connect to multiple servers — for example, to support High Availability (HA). See [MQTT Support](./mqtt.html#mqtt) for more information. The MQTT message-driven channel adapter now supports specifying the QoS setting for each subscription. See [Inbound (Message-driven) Channel Adapter](./mqtt.html#mqtt-inbound) for more information. The MQTT outbound channel adapter now supports asynchronous sends, avoiding blocking until delivery is confirmed. See [Outbound Channel Adapter](./mqtt.html#mqtt-outbound) for more information. It is now possible to programmatically subscribe to and unsubscribe from topics at runtime. See [Inbound (Message-driven) Channel Adapter](./mqtt.html#mqtt-inbound) for more information. ##### FTP and SFTP Adapter Changes The FTP and SFTP outbound channel adapters now support appending to remote files and taking specific actions when a remote file already exists. The remote file templates now also supports 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 [FTP/FTPS Adapters](./ftp.html#ftp) and [SFTP Adapters](./sftp.html#sftp) for more information. ##### Splitter and Iterator `Splitter` components now support an `Iterator` as the result object for producing output messages. See [Splitter](./splitter.html#splitter) for more information. ##### Aggregator `Aggregator` instancess now support a new attribute `expire-groups-upon-timeout`. See [Aggregator](./aggregator.html#aggregator) for more information. ##### Content Enricher Improvements We added a `null-result-expression` attribute, which is evaluated and returned if `` returns `null`. You can add it in `
` and ``. See [Content Enricher](./content-enrichment.html#content-enricher) for more information. We added an `error-channel` attribute, which is used to handle an error flow if an `Exception` occurs downstream of the `request-channel`. This lets you return an alternative object to use for enrichment. See [Content Enricher](./content-enrichment.html#content-enricher) for more information. ##### Header Channel Registry The `` element’s `` child element can now override the header channel registry’s default time for retaining channel mappings. See [Header Channel Registry](./content-enrichment.html#header-channel-registry) for more information. ##### Orderly Shutdown We made improvements to the orderly shutdown algorithm. See [Orderly Shutdown](./shutdown.html#jmx-shutdown) for more information. ##### Management for `RecipientListRouter` The `RecipientListRouter` now provides several management operations to configure recipients at runtime. With that, you can now configure the `` without any `` from the start. See [`RecipientListRouterManagement`](./router.html#recipient-list-router-management) for more information. ##### AbstractHeaderMapper: NON\_STANDARD\_HEADERS token The `AbstractHeaderMapper` implementation now provides the additional `NON_STANDARD_HEADERS` token to map any user-defined headers, which are not mapped by default. See [AMQP Message Headers](./amqp.html#amqp-message-headers) for more information. ##### AMQP Channels: `template-channel-transacted` We introduced the `template-channel-transacted` attribute for AMQP `MessageChannel` instances. See [AMQP-backed Message Channels](./amqp.html#amqp-channels) for more information. ##### Syslog Adapter The default syslog message converter now has an option to retain the original message in the payload while still setting the headers. See [Syslog Inbound Channel Adapter](./syslog.html#syslog-inbound-adapter) for more information. ##### Asynchronous Gateway In addition to the `Promise` return type [mentioned earlier](#x4.1-promise-gateway), gateway methods may now return a `ListenableFuture`, introduced in Spring Framework 4.0. You can also disable asynchronous processing in the gateway, letting a downstream flow directly return a `Future`. See [Asynchronous Gateway](./gateway.html#async-gateway). ##### Aggregator Advice Chain `Aggregator` and `Resequencer` now support `` and `` child elements to advise the `forceComplete` operation. See [Configuring an Aggregator with XML](./aggregator.html#aggregator-xml) for more information. ##### Outbound Channel Adapter and Scripts The `` now supports the `