Change History

Change History

Changes between 5.5 and 6.0

New Components

A Groovy DSL implementation for integration flow definitions has been added. See Groovy DSL for more information.spring-doc.cn

MQTT ClientManager

A new MQTT ClientManager has been added to support a reusable MQTT connection across different channel adapters. See Shared MQTT Client Support for more information.spring-doc.cn

GraphQL Support

The GraphQL support has been added. See GraphQL Support for more information.spring-doc.cn

Apache Camel Support

Support for Apache Camel routes has been introduced. See Apache Camel Support for more information.spring-doc.cn

Hazelcast Support

The Hazelcast Spring Integration Extensions project has been migrated as the spring-integration-hazelcast module. See Hazelcast Support for more information.spring-doc.cn

SMB Support

SMB support has been added from the Spring Integration Extensions project. The Java DSL (see org.springframework.integration.smb.dsl.Smb factory) also has been added to this module. An SmbStreamingMessageSource and SmbOutboundGateway implementation are introduced. See SMB Support for more information.spring-doc.cn

PostgreSQL Push Notification

A PostgresSubscribableChannel allows to receive push notifications via PostgresChannelMessageTableSubscriber upon new messages add to the JdbcChannelMessageStore.spring-doc.cn

RabbitMQ Stream Queue Support

The AMQP module has been enhanced to provide support for inbound and outbound channel adapters using RabbitMQ Stream Queues. See RabbitMQ Stream Queue Support for more information.spring-doc.cn

Apache MINA SFTP

The SFTP modules has been fully reworked from outdated JCraft JSch library to more robust and modern org.apache.sshd:sshd-sftp module of the Apache MINA project.spring-doc.cn

See SFTP Adapters for more information.spring-doc.cn

Micrometer Observation

Enabling observation for timers and tracing using Micrometer is now supported. See Micrometer Observation for more information.spring-doc.cn

GraalVM Polyglot Support

The Scripting module now provides a PolyglotScriptExecutor implementation based on the GraalVM Polyglot support. JavaScript support is now based on this executor since its JSR223 implementation has been removed from Java by itself. See Scripting Support for more information.spring-doc.cn

Apache Cassandra Support

The Apache Cassandra Spring Integration Extensions project has been migrated as the spring-integration-cassandra module. See Apache Cassandra Support for more information.spring-doc.cn

Kotlin Coroutines

Kotlin Coroutines support has been introduced to the framework.spring-doc.cn

See Kotlin Coroutines for more information.spring-doc.cn

Native Images

Support for creating GraalVM native images is provided. See Native Images Support for more information.spring-doc.cn

General Changes

The messaging annotations are now @Repeatable and the same type can be declared several times on the same service method. The messaging annotations don’t require a poller attribute as an array of @Poller anymore.spring-doc.cn

See Annotation Support for more information.spring-doc.cn

For convenience, the XML and Java DSL for Scatter-Gather, based on the RecipientListRouter, now sets an applySequence = true, so the gatherer part can rely on the default correlation strategies.spring-doc.cn

See Scatter-Gather for more information.spring-doc.cn

Another convenient behavior change has been made to the AbstractMappingMessageRouter. Now, setting a defaultOutputChannel also resets the channelKeyFallback property to false, so no attempts will be made to resolve a channel from its key, but the logic immediately falls back to sending the message to the defaultOutputChannel.spring-doc.cn

See Router Options for more information.spring-doc.cn

The AggregatingMessageHandler now does not split a Collection<Message<?>> result of the MessageGroupProcessor (unless it is a SimpleMessageGroupProcessor) on the output, but emits a single message containing this whole collection as a payload.spring-doc.cn

See Aggregator for more information.spring-doc.cn

The IntegrationFlows factory is now marked as deprecated in favor of the fluent API available in the IntegrationFlow interface itself. The factory class will be removed in the future releases.spring-doc.cn

See Java DSL for more information.spring-doc.cn

The org.springframework.util.concurrent.ListenableFuture has been deprecated starting with Spring Framework 6.0. All Spring Integration async API has been migrated to the CompletableFuture.spring-doc.cn

The Messaging Gateway interface method can now return Future<Void> and Mono<Void> with a proper asynchronous execution of the downstream flow.spring-doc.cn

Alongside with a @MessagingGateway annotation the interface can also be marked with a @Primary.spring-doc.cn

@MessagingGateway interfaces can now be use as an @Import resources for configuration.spring-doc.cn

The default naming strategy for gateway proxy beans can be customized via @IntegrationComponentScan.nameGenerator() attribute. If AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR bean is present, it is consulted otherwise before falling back to the AnnotationBeanNameGenerator.spring-doc.cn

See Messaging Gateway for more information.spring-doc.cn

The integrationGlobalProperties bean is now declared by the framework as an instance of org.springframework.integration.context.IntegrationProperties instead of the previously deprecated java.util.Properties.spring-doc.cn

Message handlers which produce a collection as a reply (e.g. JpaOutboundGateway, JdbcOutboundGateway and other DB-based gateways) now return an empty result list if no records are returned by the query. Previously, null was returned ending the flow, or throwing an exception, depending on requiresReply.spring-doc.cn

RMI Removal

The spring-integration-rmi module has been removed altogether after being deprecated in previous versions. There is no replacement: it is recommended to migrate to more secure network and application protocols, such as WebSockets, RSockets, gRPC or REST.spring-doc.cn

GemFire Removal

The spring-integration-gemfire module has been removed altogether since there is no Spring Data 2022.0.0 support for VMware GemFire or Apache Geode.spring-doc.cn

HTTP Changes

The #cookies variable for expression evaluation context, exposed in the HttpRequestHandlingEndpointSupport, is now a MultiValueMap to carry all the values for cookies set by the client. See HTTP Support for more information.spring-doc.cn

Apache Kafka Changes

When providing a RetryTemplate on the inbound gateway or message-driven channel adapter, if an errorChannel is also provided, an ErrorMessageSendingRecoverer is automatically configured.spring-doc.cn

In addition, the new KafkaErrorMessageSendingRecoverer is provided; this can be used with a DefaultErrorHandler to avoid issues with long aggregated retry delays causing partitions rebalances.spring-doc.cn

JDBC Changes

The DefaultLockRepository can now be supplied with a PlatformTransactionManager instead of relying on the primary bean from the application context.spring-doc.cn

See JDBC Lock Registry for more information.spring-doc.cn

TCP/IP Changes

The lookupHost property of the AbstractConnectionFactory and DatagramPacketMessageMapper is now set to false by default to avoid delays in the environments where DNS is not configured.spring-doc.cn

See TCP and UDP Support for more information.spring-doc.cn

JMS Changes

The JmsOutboundGateway now creates a TemporaryTopic instead of TemporaryQueue if replyPubSubDomain option is set to true.spring-doc.cn

See JMS Support for more information.spring-doc.cn

Security Changes

The ChannelSecurityInterceptor and its annotation @SecuredChannel and XML <secured-channels> configurations have been deprecated in favor of AuthorizationChannelInterceptor.spring-doc.cn

See Security Support for more information.spring-doc.cn

Webflux Request Attributes Support

Webclient Request attributes support has been added for WebFluxRequestExecutingMessageHandler.spring-doc.cn

See WebFlux Request Attributes for more information.spring-doc.cn

Changes between 5.4 and 5.5

New Components

File Aggregator

A FileSplitter.FileMaker-based implementation of CorrelationStrategy, ReleaseStrategy and MessageGroupProcessor as a FileAggregator component was introduced. See File Aggregator for more information.spring-doc.cn

MQTT v5 Support

The Mqttv5PahoMessageDrivenChannelAdapter and Mqttv5PahoMessageHandler (including respective MqttHeaderMapper) were introduced to support MQTT v5 protocol communication. See MQTT v5 Support for more information.spring-doc.cn

General Changes

All the persistent MessageGroupStore implementation provide a streamMessagesForGroup(Object groupId) contract based on the target database streaming API. See Message Store for more information.spring-doc.cn

The integrationGlobalProperties bean (if declared) must be now an instance of org.springframework.integration.context.IntegrationProperties instead of java.util.Properties, which support is deprecated for backward compatibility. The spring.integration.channels.error.requireSubscribers=true global property is added to indicate that the global default errorChannel must be configured with the requireSubscribers option (or not). The spring.integration.channels.error.ignoreFailures=true global property is added to indicate that the global default errorChannel must ignore (or not) dispatching errors and pass the message to the next handler. See Global Properties for more information.spring-doc.cn

An AbstractPollingEndpoint (source polling channel adapter and polling consumer) treats maxMessagesPerPoll == 0 as to skip calling the source. It can be changed to different value later on, e.g. via a Control Bus. See Polling Consumer for more information.spring-doc.cn

The ConsumerEndpointFactoryBean now accept a reactiveCustomizer Function to any input channel as reactive stream source and use a ReactiveStreamsConsumer underneath. This is covered as a ConsumerEndpointSpec.reactive() option in Java DSL and as a @Reactive nested annotation for the messaging annotations. See Reactive Streams Support for more information.spring-doc.cn

The groupTimeoutExpression for a correlation message handler (an Aggregator and Resequencer) can now be evaluated to a java.util.Date for some fine-grained scheduling use-cases. Also the BiFunction groupConditionSupplier option is added to the AbstractCorrelatingMessageHandler to supply a MessageGroup condition against a message to be added to the group. See Aggregator for more information.spring-doc.cn

The MessageGroup abstraction can be supplied with a condition to evaluate later on to make a decision for the group. See Message Group Condition for more information.spring-doc.cn

Integration Flows Composition

The new IntegrationFlows.from(IntegrationFlow) factory method has been added to allow starting the current IntegrationFlow from the output of an existing flow. In addition, the IntegrationFlowDefinition has added a to(IntegrationFlow) terminal operator to continue the current flow at the input channel of some other flow. See Integration Flows Composition for more information.spring-doc.cn

AMQP Changes

The AmqpInboundChannelAdapter and AmqpInboundGateway (and the respective Java DSL builders) now support an org.springframework.amqp.rabbit.retry.MessageRecoverer as an AMQP-specific alternative to the general purpose RecoveryCallback. See AMQP Support for more information.spring-doc.cn

Redis Changes

The ReactiveRedisStreamMessageProducer has now setters for all the StreamReceiver.StreamReceiverOptionsBuilder options, including an onErrorResume function. See Redis Support for more information.spring-doc.cn

HTTP Changes

The HttpRequestExecutingMessageHandler doesn’t fallback to the application/x-java-serialized-object content type any more and lets the RestTemplate make the final decision for the request body conversion based on the HttpMessageConverter provided. It also has now an extractResponseBody flag (which is true by default) to return just the response body, or to return the whole ResponseEntity as the reply message payload, independently of the provided expectedResponseType. Same option is presented for the WebFluxRequestExecutingMessageHandler, too. See HTTP Support for more information.spring-doc.cn

File/FTP/SFTP Changes

The persistent file list filters now have a boolean property forRecursion. Setting this property to true, also sets alwaysAcceptDirectories, which means that the recursive operation on the outbound gateways (ls and mget) will now always traverse the full directory tree each time. This is to solve a problem where changes deep in the directory tree were not detected. In addition, forRecursion=true causes the full path to files to be used as the metadata store keys; this solves a problem where the filter did not work properly if a file with the same name appears multiple times in different directories. IMPORTANT: This means that existing keys in a persistent metadata store will not be found for files beneath the top level directory. For this reason, the property is false by default; this may change in a future release.spring-doc.cn

The FileInboundChannelAdapterSpec has now a convenient recursive(boolean) option instead of requiring an explicit reference to the RecursiveDirectoryScanner.spring-doc.cn

The remoteDirectoryExpression can now be used in the mv command for convenience.spring-doc.cn

MongoDb Changes

The MongoDbMessageSourceSpec was added into MongoDd Java DSL. An update option is now exposed on both the MongoDbMessageSource and ReactiveMongoDbMessageSource implementations.spring-doc.cn

See MongoDb Support for more information.spring-doc.cn

WebSockets Changes

The WebSocket channel adapters based on ServerWebSocketContainer can now be registered and removed at runtime.spring-doc.cn

See WebSockets Support for more information.spring-doc.cn

JPA Changes

The JpaOutboundGateway now supports an Iterable message payload for a PersistMode.DELETE.spring-doc.cn

See Outbound Channel Adapter for more information.spring-doc.cn

Gateway Changes

Previously, when using XML configuration, @Gateway.payloadExpression was ignored for no-argument methods. There is one possible breaking change - if the method is annotated with @Payload as well as @Gateway (with a different expression) previously, the @Payload would be applied, now the @Gateway.payloadExpression is applied. See Gateway Configuration with Annotations and XML and Invoking No-Argument Methods for more information.spring-doc.cn

Changes between 5.3 and 5.4

New Components

Channel Adapters for Apache Kafka

The standalone Spring Integration for Apache Kafka project has been merged as a spring-integration-kafka module to this project.spring-doc.cn

The KafkaProducerMessageHandler sendTimeoutExpression default has changed.spring-doc.cn

You can now access the Future<?> for underlying send() operations.spring-doc.cn

R2DBC Channel Adapters

The Channel Adapters for R2DBC database interaction have been introduced. See R2DBC Support for more information.spring-doc.cn

Redis Stream Support

The Channel Adapters for Redis Stream support have been introduced. See Redis Stream Outbound Channel Adapter for more information.spring-doc.cn

Renewable Lock Registry

A Renewable lock registry has been introduced to allow renew lease of a distributed lock. See JDBC implementation for more information.spring-doc.cn

ZeroMQ Support

ZeroMqChannel, ZeroMqMessageHandler and ZeroMqMessageProducer have been introduced. See ZeroMQ Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

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 for more information.spring-doc.cn

The legacy metrics that were replaced by Micrometer meters have been removed.spring-doc.cn

The Thread Barrier has now two separate timeout options: requestTimeout and triggerTimeout.spring-doc.cn

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 and TCP Gateways for more information.spring-doc.cn

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 for more information.spring-doc.cn

AMQP Changes

The outbound endpoints now have a new mechanism for handling publisher confirms and returns. See Alternative Mechanism for Publisher Confirms and Returns for more information.spring-doc.cn

A new BatchMode.EXTRACT_PAYLOAD_WITH_HEADERS is supported by the AmqpInboundChannelAdapter. See Inbound Channel Adapter for more information.spring-doc.cn

Mail Changes

The AbstractMailReceiver can now produce the MimeMessage as-is without eager fetching its content. See Mail-receiving Channel Adapter for more information.spring-doc.cn

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 for more information about this abstraction and its use-cases.spring-doc.cn

ReactiveMessageHandler

The ReactiveMessageHandler is now natively supported in the framework. See ReactiveMessageHandler for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

Kotlin DSL

The Kotlin DSL for integration flow configurations has been introduced. See Kotlin DSL Chapter for more information.spring-doc.cn

ReactiveRequestHandlerAdvice

A ReactiveRequestHandlerAdvice is provided to customize Mono replies from message handlers. See Reactive Advice for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

ReceiveMessageAdvice

A special ReceiveMessageAdvice has been introduced to proxy exactly MessageSource.receive() or PollableChannel.receive(). See Smart Polling for more information.spring-doc.cn

General Changes

The gateway proxy now doesn’t proxy default methods by default. See Invoking default Methods for more information.spring-doc.cn

Internal components (such as _org.springframework.integration.errorLogger) now have a shortened name when they are represented in the integration graph. See Integration Graph for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

A new intercept() operator to register ChannelInterceptor instances without creating explicit channels was added into Java DSL. See Operator intercept() for more information.spring-doc.cn

The MessageStoreSelector has a new mechanism to compare an old and new value. See Idempotent Receiver Enterprise Integration Pattern for more information.spring-doc.cn

The MessageProducerSupport base class now has a subscribeToPublisher(Publisher<? extends Message<?>>) API to allow implementation of message-driven producer endpoints which emit messages via reactive Publisher. See Reactive Streams Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

The inbound channel adapter now supports a listener container with the consumerBatchEnabled property set to true. See AMQP Inbound Channel Adapterspring-doc.cn

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 for more information. This also affects WebFluxRequestExecutingMessageHandler, respective Java DSL and XML configuration. The same option is added into an AbstractWebServiceOutboundGateway.spring-doc.cn

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 for more information.spring-doc.cn

TCP Changes

The FailoverClientConnectionFactory no longer fails back, by default, until the current connection fails. See TCP Failover Client Connection Factory for more information.spring-doc.cn

The TcpOutboundGateway now supports asynchronous request/reply. See TCP Gateways for more information.spring-doc.cn

You can now configure client connections to perform some arbitrary test on new connections. See Testing Connections for more information.spring-doc.cn

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 for more information.spring-doc.cn

Zookeeper Changes

A LeaderInitiatorFactoryBean (as well as its XML <int-zk:leader-listener>) exposes a candidate option for more control over a Candidate configuration. See Leadership event handling for more information.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

(S)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 and FTP Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

Behavior Changes

See the Migration Guide about behavior changes in this version.spring-doc.cn

New Components

RSocket Support

The spring-integration-rsocket module is now available with channel adapter implementations for RSocket protocol support. See RSocket Support for more information.spring-doc.cn

Rate Limit Advice Support

The RateLimiterRequestHandlerAdvice is now available for limiting requests rate on handlers. See Rate Limiter Advice for more information.spring-doc.cn

Caching Advice Support

The CacheRequestHandlerAdvice is now available for caching request results on handlers. See Caching Advice for more information.spring-doc.cn

Kotlin Scripts Support

The JSR223 scripting module now includes a support for Kotlin scripts. See Scripting Support for more information.spring-doc.cn

Flux Aggregator Support

The FluxAggregatorMessageHandler is now available for grouping and windowing messages logic based on the Project Reactor Flux operators. See Flux Aggregator for more information.spring-doc.cn

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 and Apache Mina SFTP Server Events for more information.spring-doc.cn

Avro Transformers

Simple Apache Avro transformers are now provided. See Avro Transformers for more information.spring-doc.cn

General Changes

The JsonToObjectTransformer now supports generics for the target object to deserialize into. See JSON Transformers for more information.spring-doc.cn

The splitter now supports a discardChannel configuration option. See Splitter for more information.spring-doc.cn

The Control Bus can now handle Pausable (extension of Lifecycle) operations. See Control Bus for more information.spring-doc.cn

The Function<MessageGroup, Map<String, Object>> strategy has been introduced for the aggregator component to merge and compute headers for output messages. See Aggregator Programming Model for more information.spring-doc.cn

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 for more information.spring-doc.cn

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<GatewayProxySpec> 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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

The outbound channel adapter can now be configured to block the calling thread until a publisher confirm (acknowledgment) is received. See Outbound Channel Adapter for more information.spring-doc.cn

File Changes

Some improvements to filtering remote files have been made. See Remote Persistent File List Filters for more information.spring-doc.cn

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) for more information.spring-doc.cn

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) for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

SoftEndOfStreamException is now a RuntimeException instead of extending IOException.spring-doc.cn

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 for more information.spring-doc.cn

HTTP Changes

The HTTP inbound endpoint now support a request payload validation. See HTTP Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

MongoDb Changes

The MongoDbMessageStore can now be configured with custom converters. See MongoDB Support for more information.spring-doc.cn

Router Changes

You can now disable falling back to the channel key as the channel bean name. See Dynamic Routers for more information.spring-doc.cn

FTP/SFTP Changes

The RotatingServerAdvice is decoupled now from the RotationPolicy and its StandardRotationPolicy.spring-doc.cn

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 and SFTP Support for more information.spring-doc.cn

Changes between 5.0 and 5.1

New Components

The following components are new in 5.1:spring-doc.cn

AmqpDedicatedChannelAdvice
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.spring-doc.cn

@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.spring-doc.cn

General Changes

The following changes have been made in version 5.1:spring-doc.cn

Java DSL

The IntegrationFlowContext is now an interface and IntegrationFlowRegistration is an inner interface of IntegrationFlowContext.spring-doc.cn

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 avoids confusion with log() which is treated as a one-way end flow component.spring-doc.cn

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.spring-doc.cn

The GenericHandler.handle() now excepts a MessageHeaders type for the second argument.spring-doc.cn

Dispatcher Exceptions

Exceptions caught and re-thrown by AbstractDispatcher are now more consistent:spring-doc.cn

  • A MessagingException of any kind that has a failedMessage property is re-thrown unchanged.spring-doc.cn

  • All other exceptions are wrapped in a MessageDeliveryException with the failedMessage property set.spring-doc.cn

Previously:spring-doc.cn

  • A MessagingException of any kind that has a failedMessage property was re-thrown unchangedspring-doc.cn

  • A MessagingException that had no failedMessage property was wrapped in a MessagingException with the failedMessage property set.spring-doc.cn

  • Other RuntimeException instances were re-thrown unchanged.spring-doc.cn

  • Checked exceptions were wrapped in a MessageDeliveryException with the failedMessage property set.spring-doc.cn

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.spring-doc.cn

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.spring-doc.cn

ObjectToJsonTransformer

A new ResultType.BYTES mode is introduced for the ObjectToJsonTransformer.spring-doc.cn

See JSON Transformers for more information.spring-doc.cn

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.spring-doc.cn

See Working With Message Flows for more information.spring-doc.cn

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.spring-doc.cn

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.spring-doc.cn

See Aggregator for more information.spring-doc.cn

@Publisher annotation changes

Starting with version 5.1, you must explicitly turn on the @Publisher AOP functionality by using @EnablePublisher or by using the <int:enable-publisher> child element on <int:annotation-config>. Also the proxy-target-class and order attributes have been added for tuning the ProxyFactory configuration.spring-doc.cn

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.spring-doc.cn

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.spring-doc.cn

See File Support for more information.spring-doc.cn

AMQP Changes

We have made ID and Timestamp header mapping changes in the DefaultAmqpHeaderMapper. See the note near the bottom of AMQP Message Headers for more information.spring-doc.cn

The contentType header is now correctly mapped as an entry in the general headers map. See contentType Header for more information.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

The JdbcMessageHandler supports now a batchUpdate functionality when the payload of the request message is an instance of an Iterable type.spring-doc.cn

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.spring-doc.cn

See JDBC Support for more information.spring-doc.cn

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 and Inbound Channel Adapters: Polling Multiple Servers and Directories for more information.spring-doc.cn

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<AbstractFileInfo<F>> to Comparator<F>. See FTP Streaming Inbound Channel Adapter and SFTP Streaming Inbound Channel Adapter for more information.spring-doc.cn

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.spring-doc.cn

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.spring-doc.cn

The outbound gateway MPUT command now supports a message payload with a collection of files or strings. See SFTP Outbound Gateway and FTP Outbound Gateway for more information.spring-doc.cn

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 for more information.spring-doc.cn

In addition the key and trust store types can now be configured on the DefaultTcpSSLContextSupport.spring-doc.cn

Twitter Support

Since the Spring Social project has moved to end of life status, Twitter support in Spring Integration has been moved to the Extensions project. See Spring Integration Social Twitter for more information.spring-doc.cn

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.spring-doc.cn

See JMS Support for more information.spring-doc.cn

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.spring-doc.cn

See HTTP Support and WebFlux Support for more information.spring-doc.cn

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".spring-doc.cn

Micrometer Support Changes

It is now simpler to customize the standard Micrometer meters created by the framework. See Micrometer Integration for more information.spring-doc.cn

Integration Graph Customization

It is now possible to add additional properties to the IntegrationNode s via Function<NamedComponent, Map<String, Object>> additionalPropertiesCallback on the IntegrationGraphServer. See Integration Graph for more information.spring-doc.cn

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 for more information.spring-doc.cn

The receiveTimeout for @Poller

The @Poller annotation now provides a receiveTimeout option for convenience. See Using the @Poller Annotation for more information.spring-doc.cn

Changes between 4.3 and 5.0

See the 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.spring-doc.cn

New Components

Version 5.0 added a number of new components.spring-doc.cn

Java DSL

The separate 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 for more information about Java DSL support. See also the 4.3 to 5.0 Migration Guide for the required steps to move to Spring Integration 5.0.spring-doc.cn

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.spring-doc.cn

See Testing support for more information.spring-doc.cn

MongoDB Outbound Gateway

The new MongoDbOutboundGateway lets you make queries to the database on demand by sending a message to its request channel.spring-doc.cn

See MongoDB Outbound Gateway for more information.spring-doc.cn

WebFlux Gateways and Channel Adapters

We introduced the new WebFlux support module for Spring WebFlux Framework gateways and channel adapters.spring-doc.cn

See WebFlux Support for more information.spring-doc.cn

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.spring-doc.cn

See Content Type Conversion for more information.spring-doc.cn

ErrorMessagePublisher and ErrorMessageStrategy

We added ErrorMessagePublisher and the ErrorMessageStrategy for creating ErrorMessage instances.spring-doc.cn

See Error Handling for more information.spring-doc.cn

JDBC Metadata Store

We added a JDBC implementation of the MetadataStore implementation. This is useful when you need to ensure transactional boundaries for metadata.spring-doc.cn

See JDBC Metadata Store for more information.spring-doc.cn

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.spring-doc.cn

Core Changes

The @Poller annotation now has the errorChannel attribute for easier configuration of the underlying MessagePublishingErrorHandler. See Annotation Support for more information.spring-doc.cn

All the request-reply endpoints (based on AbstractReplyProducingMessageHandler) can now start transactions and, therefore, make the whole downstream flow transactional. See Transaction Support for more information.spring-doc.cn

The SmartLifecycleRoleController now provides methods to obtain status of endpoints in roles. See Endpoint Roles for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

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) for more information.spring-doc.cn

You can now supply the ObjectToMapTransformer with a customized JsonObjectMapper.spring-doc.cn

The @GlobalChannelInterceptor annotation and <int:channel-interceptor> now support negative patterns (via ! prepending) for component names matching. See Global Channel Interceptor Configuration for more information.spring-doc.cn

When a candidate failed to acquire the lock, the LockRegistryLeaderInitiator now emits a new OnFailedToAcquireMutexEvent through DefaultLeaderEventPublisher. See Leadership Event Handling for more information.spring-doc.cn

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.spring-doc.cn

The RequestReplyExchanger interface now has a throws MessagingException clause to meet the proposed messages exchange contract.spring-doc.cn

You can now specify the request and reply timeouts with SpEL expressions. See Messaging Gateways for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

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 for more information.spring-doc.cn

Mail Changes

Some inconsistencies with rendering IMAP mail content have been resolved. See the note in the “Mail-receiving Channel Adapter” section for more information.spring-doc.cn

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 for more information.spring-doc.cn

File Changes

We introduced the new FileHeaders.RELATIVE_PATH message header to represent relative path in FileReadingMessageSource.spring-doc.cn

The tail adapter now supports idleEventInterval to emit events when there is no data in the file during that period.spring-doc.cn

The flush predicates for the FileWritingMessageHandler now have an additional parameter.spring-doc.cn

The file outbound channel adapter and gateway (FileWritingMessageHandler) now support the REPLACE_IF_MODIFIED FileExistsMode.spring-doc.cn

They also now support setting file permissions on the newly written file.spring-doc.cn

A new FileSystemMarkerFilePresentFileListFilter is now available. See Dealing With Incomplete Data for more information.spring-doc.cn

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.spring-doc.cn

See File Support for more information.spring-doc.cn

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.spring-doc.cn

You can also provide a custom DirectoryScanner implementation to inbound channel adapters by setting the newly introduced scanner attribute.spring-doc.cn

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.spring-doc.cn

By default, all the inbound channel adapters (streaming and synchronization-based) now use an appropriate AbstractPersistentAcceptOnceFileListFilter implementation to prevent duplicate downloads of remote files.spring-doc.cn

The FTP and SFTP outbound gateways now support the REPLACE_IF_MODIFIED FileExistsMode when fetching remote files.spring-doc.cn

The FTP and SFTP streaming inbound channel adapters now add remote file information in a message header.spring-doc.cn

The FTP and SFTP outbound channel adapters (as well as the PUT command for outbound gateways) now support InputStream as payload, too.spring-doc.cn

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 section for injection. Also, you can now switch these adapters to the WatchService instead.spring-doc.cn

We added The NLST command to the AbstractRemoteFileOutboundGateway to perform the list files names remote command.spring-doc.cn

You can now supply the FtpOutboundGateway with workingDirExpression to change the FTP client working directory for the current request message.spring-doc.cn

The RemoteFileTemplate is supplied now with the invoke(OperationsCallback<F, T> action) to perform several RemoteFileOperations calls in the scope of the same, thread-bounded, Session.spring-doc.cn

We added new filters for detecting incomplete remote files.spring-doc.cn

The FtpOutboundGateway and SftpOutboundGateway now support an option to remove the remote file after a successful transfer by using the GET or MGET commands.spring-doc.cn

See FTP/FTPS Adapters and SFTP Adapters for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

Barrier Changes

The BarrierMessageHandler now supports a discard channel to which late-arriving trigger messages are sent. See Thread Barrier for more information.spring-doc.cn

AMQP Changes

The AMQP outbound endpoints now support setting a delay expression when you use the RabbitMQ Delayed Message Exchange plugin.spring-doc.cn

The inbound endpoints now support the Spring AMQP DirectMessageListenerContainer.spring-doc.cn

Pollable AMQP-backed channels now block the poller thread for the poller’s configured receiveTimeout (default: one second).spring-doc.cn

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 for more information.spring-doc.cn

HTTP Changes

By default, the DefaultHttpHeaderMapper.userDefinedHeaderPrefix property is now an empty string instead of X-. See HTTP Header Mappings for more information.spring-doc.cn

By default, uriVariablesExpression now uses a SimpleEvaluationContext (since 5.0.4).spring-doc.cn

See Mapping URI Variables for more information.spring-doc.cn

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.spring-doc.cn

The outbound channel adapter now supports expressions for the topic, qos, and retained properties. The defaults remain the same. See MQTT Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

Web Services Changes

You can now supply WebServiceOutboundGateway instances with an externally configured WebServiceTemplate instances.spring-doc.cn

DefaultSoapHeaderMapper can now map a javax.xml.transform.Source user-defined header to a SOAP header element.spring-doc.cn

Simple WebService inbound and outbound gateways can now deal with the complete WebServiceMessage as a payload, allowing the manipulation of MTOM attachments.spring-doc.cn

See Web Services Support for more information.spring-doc.cn

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.spring-doc.cn

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).spring-doc.cn

See Redis Support for more information.spring-doc.cn

TCP Changes

We added a new ThreadAffinityClientConnectionFactory to bind TCP connections to threads.spring-doc.cn

You can now configure the TCP connection factories to support PushbackInputStream instances, letting deserializers “unread” (push back) bytes after “reading ahead”.spring-doc.cn

We added a ByteArrayElasticRawDeserializer without maxMessageSize to control and buffer incoming data as needed.spring-doc.cn

See TCP and UDP Support for more information.spring-doc.cn

JDBC Changes

The JdbcMessageChannelStore now provides a setter for ChannelMessageStorePreparedStatementSetter, letting you customize message insertion in the store.spring-doc.cn

The ExpressionEvaluatingSqlParameterSourceFactory now provides a setter for sqlParameterTypes, letting you customize the SQL types of the parameters.spring-doc.cn

See JDBC Support for more information.spring-doc.cn

Metrics Changes

Micrometer application monitoring is now supported (since version 5.0.2). See Micrometer Integration for more information.spring-doc.cn

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 for more information.spring-doc.cn

Changes between 4.2 and 4.3

See the 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.spring-doc.cn

New Components

Version 4.3 added a number of new components.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 and SFTP Streaming Inbound Channel Adapter for more information.spring-doc.cn

StreamTransformer

We added StreamTransformer to transform an InputStream payload to either a byte[] or a String. See Stream Transformer for more information.spring-doc.cn

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 for more information.spring-doc.cn

JDBC Lock Registry

We added JdbcLockRegistry for distributed locks shared through a database table. See JDBC Lock Registry for more information.spring-doc.cn

LeaderInitiator for LockRegistry

We added LeaderInitiator implementation based on the LockRegistry strategy. See Leadership Event Handling for more information.spring-doc.cn

General Changes

This section describes general changes that version 4.3 brought to Spring Integration.spring-doc.cn

Core Changes

This section describes general changes to the core of Spring Integration.spring-doc.cn

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.spring-doc.cn

Asynchronous Service Activator

We added an option to make the service activator be synchronous. See Asynchronous Service Activator for more information.spring-doc.cn

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 and Annotation Support for more information.spring-doc.cn

Mail Changes

This section describes general changes to the Spring Integration Mail functionality.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

JMS Changes

This section describes general changes to the Spring Integration JMS functionality.spring-doc.cn

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 for more information.spring-doc.cn

Asynchronous Gateway

The JMS outbound gateway now has an async property. See Async Gateway for more information.spring-doc.cn

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. note for more information.spring-doc.cn

TCP/UDP Changes

This section describes general changes to the Spring Integration TCP/UDP functionality.spring-doc.cn

Events

A new TcpConnectionServerListeningEvent is emitted when a server connection factory is started. See TCP Connection Events for more information.spring-doc.cn

You can now use the destination-expression and socket-expression attributes on <int-ip:udp-outbound-channel-adapter>. See UDP Adapters for more information.spring-doc.cn

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 for more information.spring-doc.cn

TCP Message Mapper

The message mapper now, optionally, sets a configured content type header. See IP Message Headers for more information.spring-doc.cn

File Changes

This section describes general changes to the Spring Integration File functionality.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

Buffer Size

When writing files, you can now specify the buffer size.spring-doc.cn

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 for more information.spring-doc.cn

Preserving Timestamps

You can now configure the outbound channel adapter to set the destination file’s lastmodified timestamp. See File Timestamps for more information.spring-doc.cn

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 for more information.spring-doc.cn

File Filters

We added ChainFileListFilter as an alternative to CompositeFileListFilter. See Reading Files for more information.spring-doc.cn

AMQP Changes

This section describes general changes to the Spring Integration AMQP functionality.spring-doc.cn

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 for more information.spring-doc.cn

Headers for Delayed Message Handling

Spring AMQP 1.6 adds support for delayed message exchanges. Header mapping now supports the headers (amqp_delay and amqp_receivedDelay) used by this feature.spring-doc.cn

AMQP-Backed Channels

AMQP-backed channels now support message mapping. See AMQP-backed Message Channels for more information.spring-doc.cn

Redis Changes

This section describes general changes to the Spring Integration Redis functionality.spring-doc.cn

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 and Redis Queue Outbound Channel Adapter for more information.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

uriVariablesExpression now uses a SimpleEvaluationContext by default (since 4.3.15). See Mapping URI Variables for more information.spring-doc.cn

SFTP Changes

This section describes general changes to the Spring Integration SFTP functionality.spring-doc.cn

Factory Bean

We added a new factory bean to simplify the configuration of Jsch proxies for SFTP. See JschProxyFactoryBean for more information.spring-doc.cn

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 and SFTP Outbound Gateway for more information.spring-doc.cn

FTP Changes

This section describes general changes to the Spring Integration FTP functionality.spring-doc.cn

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 <int-ftp:inbound-channel-adapter> without remote-directory or remote-directory-expression. See FTP/FTPS Adapters for more information.spring-doc.cn

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.spring-doc.cn

See Routers for more information.spring-doc.cn

Header Mapping

This section describes the changes to header mapping between version 4.2 and 4.3.spring-doc.cn

General

AMQP, WS, and XMPP header mappings (such as request-header-mapping and reply-header-mapping) now support negated patterns. See AMQP Message Headers, WS Message Headers, and XMPP Message Headers for more information.spring-doc.cn

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 for more information.spring-doc.cn

Groovy Scripts

You can now configure groovy scripts with the compile-static hint or any other CompilerConfiguration options. See Groovy Configuration for more information.spring-doc.cn

@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 for more information.spring-doc.cn

XMPP Changes

The XMPP channel adapters now support the XMPP Extensions (XEP). See XMPP Extensions for more information.spring-doc.cn

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 for more information.spring-doc.cn

ChannelMessageStoreQueryProvider Changes

The ChannelMessageStoreQueryProvider now supports H2 databases. See Backing Message Channels for more information.spring-doc.cn

WebSocket Changes

The ServerWebSocketContainer now exposes an allowedOrigins option, and SockJsServiceOptions exposes a suppressCors option. See WebSockets Support for more information.spring-doc.cn

Changes between 4.1 and 4.2

See the 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.spring-doc.cn

New Components

Version 4.2 added a number of new components.spring-doc.cn

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.spring-doc.cn

However, this has some important implications for (some) user environments.spring-doc.cn

For complete details, see Metrics and Management and JMX Improvements.spring-doc.cn

MongoDB Metadata Store

The MongoDbMetadataStore is now available. For more information, see MongoDB Metadata Store.spring-doc.cn

SecuredChannel Annotation

We introduced the @SecuredChannel annotation, replacing the deprecated ChannelSecurityInterceptorFactoryBean. For more information, see Security in Spring Integration.spring-doc.cn

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.spring-doc.cn

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 for more information.spring-doc.cn

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:spring-doc.cn

See Zookeeper Support for more information.spring-doc.cn

Thread Barrier

A new thread <int:barrier/> component is available, letting a thread be suspended until some asynchronous event occurs. See Thread Barrier for more information.spring-doc.cn

STOMP Support

We added STOMP support to the framework as an inbound and outbound channel adapters pair. See STOMP Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

Message PreparedStatement Setter

A new MessagePreparedStatementSetter functional interface callback is available for the JdbcMessageHandler (<int-jdbc:outbound-gateway> and <int-jdbc:outbound-channel-adapter>) as an alternative to using SqlParameterSourceFactory to populate parameters on the PreparedStatement with the requestMessage context. See Outbound Channel Adapter for more information.spring-doc.cn

General Changes

This section describes general changes from version 4.1 to version 4.2.spring-doc.cn

WireTap

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

File Changes

See File Support for more information about these changes.spring-doc.cn

Appending New Lines

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.spring-doc.cn

Ignoring Hidden Files

We added the ignore-hidden attribute for the <int-file:inbound-channel-adapter> to let you set whether to pick up hidden files from the source directory. It defaults to true.spring-doc.cn

Writing InputStream Payloads

The FileWritingMessageHandler now also accepts InputStream as a valid message payload type.spring-doc.cn

HeadDirectoryScanner

You can now use the HeadDirectoryScanner with other FileListFilter implementations.spring-doc.cn

Last Modified Filter

We added the LastModifiedFileListFilter.spring-doc.cn

Watch Service Directory Scanner

We added the WatchServiceDirectoryScanner.spring-doc.cn

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).spring-doc.cn

Class Package Change

We moved the ScatterGatherHandler class from the org.springframework.integration.handler to the org.springframework.integration.scattergather.spring-doc.cn

TCP Changes

This section describes general changes to the Spring Integration TCP functionality.spring-doc.cn

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.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

See "TCP Connection Factories" for more information.spring-doc.cn

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.spring-doc.cn

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

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 for more information.spring-doc.cn

TCP Events

New events are now published whenever a correlation exception occurs — such as sending a message to a non-existent socket.spring-doc.cn

The TcpConnectionEventListeningMessageProducer is deprecated. Use the generic event adapter instead.spring-doc.cn

See TCP Connection Events for more information.spring-doc.cn

@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 <inbound-channel-adapter/>, which defaults to 1. The annotation now defaults this attribute to 1.spring-doc.cn

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.spring-doc.cn

Reactor is still supported for functionality such as the Promise gateway. The dependency was removed for those users who do not need it.spring-doc.cn

JMS Changes

This section describes general changes to the Spring Integration TCP functionality.spring-doc.cn

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 for more information.spring-doc.cn

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.spring-doc.cn

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.spring-doc.cn

Shared Subscriptions

We added Namespace support for shared subscriptions (JMS 2.0) to message-driven endpoints and the <int-jms:publish-subscribe-channel>. Previously, you had to wire up listener containers as <bean/> declarations to use shared connections.spring-doc.cn

See JMS Support for more information.spring-doc.cn

Conditional Pollers

We now provide much more flexibility for dynamic polling.spring-doc.cn

AMQP Changes

This section describes general changes to the Spring Integration AMQP functionality.spring-doc.cn

Publisher Confirmations

The <int-amqp:outbound-gateway> now supports confirm-correlation-expression, confirm-ack-channel, and confirm-nack-channel attributes (which have a purpose similar to that of <int-amqp:outbound-channel-adapter>).spring-doc.cn

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.spring-doc.cn

Inbound Gateway Properties

The <int-amqp:inbound-gateway> 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.spring-doc.cn

See AMQP Support for more information.spring-doc.cn

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.spring-doc.cn

See Splitting XML Messages for more information.spring-doc.cn

HTTP Changes

This section describes general changes to the Spring Integration HTTP functionality.spring-doc.cn

CORS

The HTTP inbound endpoints (<int-http:inbound-channel-adapter> and <int-http:inbound-gateway>) now allow the configuration of Cross-origin Resource Sharing (CORS).spring-doc.cn

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.spring-doc.cn

See Response Status Code for more information.spring-doc.cn

Form Data

We added documentation for proxying multipart/form-data requests. See HTTP Support for more information.spring-doc.cn

Gateway Changes

This section describes general changes to the Spring Integration Gateway functionality.spring-doc.cn

Gateway Methods can Return CompletableFuture<?>

When using Java 8, gateway methods can now return CompletableFuture<?>. See CompletableFuture for more information.spring-doc.cn

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.spring-doc.cn

Aggregator Changes

This section describes general changes to the Spring Integration aggregator functionality.spring-doc.cn

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.spring-doc.cn

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 for more information.spring-doc.cn

FTP and SFTP Changes

This section describes general changes to the Spring Integration FTP and SFTP functionality.spring-doc.cn

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 and SFTP Adapters for more information.spring-doc.cn

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 and SFTP Outbound Gateway for more information.spring-doc.cn

Delegating Session Factory

We added a delegating session factory, enabling the selection of a particular session factory based on some thread context value.spring-doc.cn

Default Sftp Session Factory

Previously, the DefaultSftpSessionFactory unconditionally allowed connections to unknown hosts. This is now configurable (default: false).spring-doc.cn

The factory now requires a configured knownHosts, file unless the allowUnknownKeys property is true (default: false).spring-doc.cn

Message Session Callback

We introduced the MessageSessionCallback<F, T> to perform any custom Session operations with the requestMessage context in the <int-(s)ftp:outbound-gateway/>.spring-doc.cn

Websocket Changes

We added WebSocketHandlerDecoratorFactory support to the ServerWebSocketContainer to allow chained customization for the internal WebSocketHandler. See WebSockets Namespace Support for more information.spring-doc.cn

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 <int-event:outbound-channel-adapter>. See Spring ApplicationEvent Support for more information.spring-doc.cn

Changes between 4.0 and 4.1

See the 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.spring-doc.cn

New Components

Version 4.1 added a number of new components.spring-doc.cn

Promise<?> Gateway

The messaging gateway methods now support a Reactor Promise return type. See Asynchronous Gateway.spring-doc.cn

WebSocket support

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>. See WebSockets Support for more information.spring-doc.cn

Scatter-Gather Enterprise Integration Pattern

We implemented the scatter-gather enterprise integration pattern. See Scatter-Gather for more information.spring-doc.cn

Routing Slip Pattern

We added the routing slip EIP pattern implementation. See Routing Slip for more information.spring-doc.cn

Idempotent Receiver Pattern

We added the idempotent receiver enterprise integration pattern implementation by adding the <idempotent-receiver> component in XML or the IdempotentReceiverInterceptor and IdempotentReceiver annotations for Java configuration. See Idempotent Receiver Enterprise Integration Pattern and the Javadoc for more information.spring-doc.cn

Boon JsonObjectMapper

We added the Boon JsonObjectMapper for the JSON transformers. See Transformer for more information.spring-doc.cn

Redis Queue Gateways

We added the <redis-queue-inbound-gateway> and <redis-queue-outbound-gateway> components. See Redis Queue Inbound Gateway and Redis Queue Outbound Gateway.spring-doc.cn

PollSkipAdvice

We added the PollSkipAdvice, which you can use within the <advice-chain> of the <poller> to determine if the current poll should be suppressed (skipped) by some condition that you implement with PollSkipStrategy. See Poller for more information.spring-doc.cn

General Changes

This section describes general changes from version 4.0 to version 4.1.spring-doc.cn

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 for more information.spring-doc.cn

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 for more information.spring-doc.cn

SimpleMessageStore

The SimpleMessageStore no longer makes a copy of the group when calling getMessageGroup(). See [WARNING] for more information.spring-doc.cn

Web Service Outbound Gateway: encode-uri

The <ws:outbound-gateway/> now provides an encode-uri attribute to allow disabling the encoding of the URI object before sending the request.spring-doc.cn

Http Inbound Channel Adapter and Status Code

The <http:inbound-channel-adapter> can now be configured with a status-code-expression to override the default 200 OK status. See HTTP Namespace Support for more information.spring-doc.cn

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 for more information.spring-doc.cn

The MQTT message-driven channel adapter now supports specifying the QoS setting for each subscription. See Inbound (Message-driven) Channel Adapter for more information.spring-doc.cn

The MQTT outbound channel adapter now supports asynchronous sends, avoiding blocking until delivery is confirmed. See Outbound Channel Adapter for more information.spring-doc.cn

It is now possible to programmatically subscribe to and unsubscribe from topics at runtime. See Inbound (Message-driven) Channel Adapter for more information.spring-doc.cn

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.spring-doc.cn

See FTP/FTPS Adapters and SFTP Adapters for more information.spring-doc.cn

Splitter and Iterator

Splitter components now support an Iterator as the result object for producing output messages. See Splitter for more information.spring-doc.cn

Aggregator

Aggregator instancess now support a new attribute expire-groups-upon-timeout. See Aggregator for more information.spring-doc.cn

Content Enricher Improvements

We added a null-result-expression attribute, which is evaluated and returned if <enricher> returns null. You can add it in <header> and <property>. See Content Enricher for more information.spring-doc.cn

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 for more information.spring-doc.cn

Header Channel Registry

The <header-enricher/> element’s <header-channels-to-string/> child element can now override the header channel registry’s default time for retaining channel mappings. See Header Channel Registry for more information.spring-doc.cn

Orderly Shutdown

We made improvements to the orderly shutdown algorithm. See Orderly Shutdown for more information.spring-doc.cn

Management for RecipientListRouter

The RecipientListRouter now provides several management operations to configure recipients at runtime. With that, you can now configure the <recipient-list-router> without any <recipient> from the start. See RecipientListRouterManagement for more information.spring-doc.cn

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 for more information.spring-doc.cn

AMQP Channels: template-channel-transacted

We introduced the template-channel-transacted attribute for AMQP MessageChannel instances. See AMQP-backed Message Channels for more information.spring-doc.cn

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 for more information.spring-doc.cn

Asynchronous Gateway

In addition to the Promise return type mentioned earlier, 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.spring-doc.cn

Aggregator Advice Chain

Aggregator and Resequencer now support <expire-advice-chain/> and <expire-transactional/> child elements to advise the forceComplete operation. See Configuring an Aggregator with XML for more information.spring-doc.cn

Outbound Channel Adapter and Scripts

The <int:outbound-channel-adapter/> now supports the <script/> child element. The underlying script must have a void return type or return null. See Groovy support and Scripting Support.spring-doc.cn

Resequencer Changes

When a message group in a resequencer times out (using group-timeout or a MessageGroupStoreReaper), late arriving messages are now, by default, discarded immediately. See Resequencer.spring-doc.cn

Optional POJO method parameter

Spring Integration now consistently handles the Java 8’s Optional type. See Configuring Service Activator.spring-doc.cn

QueueChannel backed Queue type

The QueueChannel backed Queue type has been changed from BlockingQueue to the more generic Queue. This change allows the use of any external Queue implementation (for example, Reactor’s PersistentQueue). See QueueChannel Configuration.spring-doc.cn

ChannelInterceptor Changes

The ChannelInterceptor now supports additional afterSendCompletion() and afterReceiveCompletion() methods. See Channel Interceptors.spring-doc.cn

IMAP PEEK

Since version 4.1.1 there is a change of behavior if you explicitly set the mail.[protocol].peek JavaMail property to false (where [protocol] is imap or imaps). See [IMPORTANT].spring-doc.cn

Changes between 3.0 and 4.0

See the 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.spring-doc.cn

New Components

Version 4.0 added a number of new components.spring-doc.cn

MQTT Channel Adapters

The MQTT channel adapters (previously available in the Spring Integration Extensions repository) are now available as part of the normal Spring Integration distribution. See MQTT Support.spring-doc.cn

@EnableIntegration

We added the @EnableIntegration annotation to permit declaration of standard Spring Integration beans when using @Configuration classes. See Annotation Support for more information.spring-doc.cn

@IntegrationComponentScan

We added the @IntegrationComponentScan annotation to permit classpath scanning for Spring Integration-specific components. See Annotation Support for more information.spring-doc.cn

“@EnableMessageHistory”

You can now enable message history with the @EnableMessageHistory annotation in a @Configuration class. In addition, a JMX MBean can modify the message history settings. Also, MessageHistory can track auto-created MessageHandler instances for annotated endpoints (such as @ServiceActivator, @Splitter, and others). For more information, see Message History.spring-doc.cn

@MessagingGateway

You can now configure messaging gateway interfaces with the @MessagingGateway annotation. It is an analogue of the <int:gateway/> XML element. For more information, see @MessagingGateway Annotation.spring-doc.cn

Spring Boot @EnableAutoConfiguration

As well as the @EnableIntegration annotation mentioned earlier, we introduced a hook to allow the Spring Integration infrastructure beans to be configured with Spring Boot’s @EnableAutoConfiguration annotation. For more information, see “Auto-configuration” in the Spring Boot Reference Guide.spring-doc.cn

@GlobalChannelInterceptor

As well as the @EnableIntegration annotation mentioned above, we introduced the @GlobalChannelInterceptor annotation. For more information, see Annotation Support.spring-doc.cn

@IntegrationConverter

We introduced the @IntegrationConverter annotation as an analogue of the <int:converter/> component. For more information, see Annotation Support.spring-doc.cn

@EnablePublisher

We added the @EnablePublisher annotation to allow the specification of a default-publisher-channel for @Publisher annotations. See Annotation Support for more information.spring-doc.cn

Redis Channel Message Stores

We added a Redis MessageGroupStore that is optimized for use when backing a QueueChannel for persistence. For more information, see Redis Channel Message Stores.spring-doc.cn

We added a Redis ChannelPriorityMessageStore. You can use it to retrieve messages by priority. For more information, see Redis Channel Message Stores.spring-doc.cn

MongodDB Channel Message Store

The MongoDB support now provides the MongoDbChannelMessageStore, which is a channel-specific MessageStore implementation. With priorityEnabled = true, you can use it in <int:priority-queue> elements to achieve priority order polling of persisted messages. For more information see MongoDB Channel Message Store.spring-doc.cn

@EnableIntegrationMBeanExport

You can now enable the IntegrationMBeanExporter with the @EnableIntegrationMBeanExport annotation in a @Configuration class. For more information, see MBean Exporter.spring-doc.cn

ChannelSecurityInterceptorFactoryBean

ChannelSecurityInterceptorFactoryBean now supports configuration of Spring Security for message channels that use @Configuration classes. For more information, see Security in Spring Integration.spring-doc.cn

Redis Command Gateway

The Redis support now provides the <outbound-gateway> component to perform generic Redis commands by using the RedisConnection#execute method. For more information, see Redis Outbound Command Gateway.spring-doc.cn

RedisLockRegistry

The RedisLockRegistry is now available to support global locks visible to multiple application instances and servers. These can be used with aggregating message handlers across multiple application instances such that group release occurs on only one instance. For more information, see Redis Lock Registry and Aggregator.spring-doc.cn

@Poller

Annotation-based messaging configuration can now have a poller attribute. This means that methods annotated with @ServiceActivator, @Aggregator, and similar annotations can now use an inputChannel that is a reference to a PollableChannel. For more information, see Annotation Support.spring-doc.cn

@InboundChannelAdapter and SmartLifecycle for Annotated Endpoints

We added the @InboundChannelAdapter method annotation. It is an analogue of the <int:inbound-channel-adapter> XML component. In addition, all messaging annotations now provide SmartLifecycle options. For more information, see Annotation Support.spring-doc.cn

Twitter Search Outbound Gateway

We added a new twitter endpoint: <int-twitter-search-outbound-gateway/>. Unlike the search inbound adapter, which polls by using the same search query each time, the outbound gateway allows on-demand customized queries. For more information, see Spring Integration Social Twitter.spring-doc.cn

@BridgeFrom and @BridgeTo Annotations

We introduced @BridgeFrom and @BridgeTo @Bean method annotations to mark MessageChannel beans in @Configuration classes. For more information, see Annotation Support.spring-doc.cn

Meta-messaging Annotations

Messaging annotations (@ServiceActivator, @Router, @MessagingGateway, and others) can now be configured as meta-annotations for user-defined messaging annotations. In addition, the user-defined annotations can have the same attributes (inputChannel, @Poller, autoStartup, and others). For more information, see Annotation Support.spring-doc.cn

General Changes

This section describes general changes from version 3.0 to version 4.0.spring-doc.cn

Requires Spring Framework 4.0

We moved the core messaging abstractions (Message, MessageChannel, and others) to the Spring Framework spring-messaging module. Developers who reference these classes directly in their code need to make changes, as described in the first section of the 3.0 to 4.0 Migration Guide.spring-doc.cn

Header Type for XPath Header Enricher

We introduced the header-type attribute for the header child element of the <int-xml:xpath-header-enricher>. This attribute provides the target type for the header value (to which the result of the XPath expression evaluation is converted). For more information see XPath Header Enricher.spring-doc.cn

Object To JSON Transformer: Node Result

We introduced the result-type attribute for the <int:object-to-json-transformer>. This attribute provides the target type for the result of mapping an object to JSON. It supports STRING (the default) and NODE. For more information see Since version 3.0, Spring Integration also provides a built-in #xpath SpEL function for use in expressions..spring-doc.cn

JMS Header Mapping

The DefaultJmsHeaderMapper now maps an incoming JMSPriority header to the Spring Integration priority header. Previously, priority was only considered for outbound messages. For more information, see Mapping Message Headers to and from JMS Message.spring-doc.cn

JMS Outbound Channel Adapter

The JMS outbound channel adapter now supports the session-transacted attribute (default: false). Previously, you had to inject a customized JmsTemplate to use transactions. See Outbound Channel Adapter.spring-doc.cn

JMS Inbound Channel Adapter

The JMS inbound channel adapter now supports the session-transacted attribute (default: false). Previously, you had to inject a customized JmsTemplate to use transactions. The adapter allowed 'transacted' in the acknowledgeMode, which was incorrect and didn’t work. This value is no longer allowed. See Inbound Channel Adapter.spring-doc.cn

Datatype Channels

You can now specify a MessageConverter to be used when converting (if necessary) payloads to one of the accepted datatype instances in a Datatype channel. For more information, see Datatype Channel Configuration.spring-doc.cn

Simpler Retry Advice Configuration

We added simplified namespace support to configure a RequestHandlerRetryAdvice. For more information, see Configuring the Retry Advice.spring-doc.cn

Correlation Endpoint: Time-based Release Strategy

We added the mutually exclusive group-timeout and group-timeout-expression attributes to <int:aggregator> and <int:resequencer>. These attributes allow forced completion of a partial MessageGroup, provided the ReleaseStrategy does not release a group and no further messages arrive within the time specified. For more information, see Configuring an Aggregator with XML.spring-doc.cn

Redis Metadata Store

The RedisMetadataStore now implements ConcurrentMetadataStore, letting it be used, for example, in an AbstractPersistentAcceptOnceFileListFilter implementation in a multiple application instance or server environment. For more information, see Redis Metadata Store, Reading Files, FTP Inbound Channel Adapter, and SFTP Inbound Channel Adapter.spring-doc.cn

JdbcChannelMessageStore and PriorityChannel

T`JdbcChannelMessageStore` now implements PriorityCapableChannelMessageStore, letting it be used as a message-store reference for priority-queue instances. For more information, see Backing Message Channels.spring-doc.cn

AMQP Endpoints Delivery Mode

Spring AMQP, by default, creates persistent messages on the broker. You can override this behavior by setting the amqp_deliveryMode header or customizing the mappers. We added a convenient default-delivery-mode attribute to the adapters to provide easier configuration of this important setting. For more information, see Outbound Channel Adapter and Outbound Gateway.spring-doc.cn

FTP Timeouts

The DefaultFtpSessionFactory now exposes the connectTimeout, defaultTimeout, and dataTimeout properties, avoiding the need to subclass the factory to set these common properties. The postProcess* methods are still available for more advanced configuration. See FTP Session Factory for more information.spring-doc.cn

Twitter: StatusUpdatingMessageHandler

The StatusUpdatingMessageHandler (<int-twitter:outbound-channel-adapter>) now supports the tweet-data-expression attribute to build a org.springframework.social.twitter.api.TweetData object for updating the timeline status. This feature allows, for example, attaching an image. See Spring Integration Social Twitter for more information.spring-doc.cn

JPA Retrieving Gateway: id-expression

We introduced the id-expression attribute for <int-jpa:retrieving-outbound-gateway> to perform EntityManager.find(Class entityClass, Object primaryKey). See Retrieving Outbound Gateway for more information.spring-doc.cn

TCP Deserialization Events

When one of the standard deserializers encounters a problem decoding the input stream to a message, it now emits a TcpDeserializationExceptionEvent, letting applications examine the data at the point at which the exception occurred. See TCP Connection Events for more information.spring-doc.cn

Messaging Annotations on @Bean Definitions

You can now configure messaging annotations (@ServiceActivator, @Router, @InboundChannelAdapter, and others) on @Bean definitions in @Configuration classes. For more information, see Annotation Support.spring-doc.cn

Changes Between 2.2 and 3.0

See the 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.spring-doc.cn

New Components

Version 3.0 added a number of new components.spring-doc.cn

HTTP Request Mapping

The HTTP module now provides powerful request mapping support for inbound endpoints. We replaced the UriPathHandlerMapping class with IntegrationRequestMappingHandlerMapping, which is registered under the bean name of integrationRequestMappingHandlerMapping in the application context. Upon parsing of the HTTP inbound endpoint, either a new IntegrationRequestMappingHandlerMapping bean is registered or an existing bean is reused. To achieve flexible request mapping configuration, Spring Integration provides the <request-mapping/> child element for <http:inbound-channel-adapter/> and the <http:inbound-gateway/>. Both HTTP inbound endpoints are now fully based on the request mapping infrastructure that was introduced with Spring MVC 3.1. For example, multiple paths are supported on a single inbound endpoint. For more information see HTTP Namespace Support.spring-doc.cn

Spring Expression Language (SpEL) Configuration

We added a new IntegrationEvaluationContextFactoryBean to allow configuration of custom PropertyAccessor implementations and functions for use in SpEL expressions throughout the framework. For more information, see Spring Expression Language (SpEL).spring-doc.cn

SpEL Functions Support

To customize the SpEL EvaluationContext with static Method functions, we introduced the <spel-function/> component. We also added two built-in functions: #jsonPath and #xpath. For more information, see SpEL Functions.spring-doc.cn

SpEL PropertyAccessors Support

To customize the SpEL EvaluationContext with PropertyAccessor implementations, we added the <spel-property-accessors/> component. For more information, see Property Accessors.spring-doc.cn

Redis: New Components

We added a new Redis-based MetadataStore implementation. You can use the RedisMetadataStore to maintain the state of a MetadataStore across application restarts. This new MetadataStore implementation can be used with adapters, such as:spring-doc.cn

We added new queue-based components. We added the <int-redis:queue-inbound-channel-adapter/> and <int-redis:queue-outbound-channel-adapter/> components to perform 'right pop' and 'left push' operations, respectively, on a Redis List.spring-doc.cn

For more information, “see Redis Support”.spring-doc.cn

Header Channel Registry

You can now instruct the framework to store reply channels and error channels in a registry for later resolution. This is useful for cases where the replyChannel or errorChannel might be lost (for example, when serializing a message). See Header Enricher for more information.spring-doc.cn

MongoDB support: New ConfigurableMongoDbMessageStore

In addition to the existing eMongoDbMessageStore, we introduced a new ConfigurableMongoDbMessageStore. This provides a more robust and flexible implementation of MessageStore for MongoDB. It does not have backward compatibility with the existing store, but we recommend using it for new applications. Existing applications can use it, but messages in the old store are not available. See MongoDb Support for more information.spring-doc.cn

Syslog Support

Building on the 2.2 SyslogToMapTransformer, Spring Integration 3.0 introduces UDP and TCP inbound channel adapters especially tailored for receiving SYSLOG messages. For more information, see Syslog Support.spring-doc.cn

tail Support

We added file inbound channel adapters that use the tail command to generate messages when lines are added to the end of text files. See 'tail’ing Files.spring-doc.cn

JMX Support

We added <int-jmx:tree-polling-channel-adapter/>. This adapter queries the JMX MBean tree and sends a message with a payload that is the graph of objects that match the query. By default, the MBeans are mapped to primitives and simple Objects (such as Map, List, and arrays). It permits simple transformation to, for example, JSON.spring-doc.cn

The IntegrationMBeanExporter now allows the configuration of a custom ObjectNamingStrategy by using the naming-strategy attribute.spring-doc.cn

For more information, see JMX Support.spring-doc.cn

TCP/IP Connection Events and Connection Management

TcpConnection instances now emit ApplicationEvent instances (specifically TcpConnectionEvent instances) when connections are opened or closed or when an exception occurs. This change lets applications be informed of changes to TCP connections by using the normal Spring ApplicationListener mechanism.spring-doc.cn

We renamed AbstractTcpConnection to TcpConnectionSupport. Custom connections that are subclasses of this class can use its methods to publish events. Similarly, we renamed AbstractTcpConnectionInterceptor to TcpConnectionInterceptorSupport.spring-doc.cn

In addition, we added <int-ip:tcp-connection-event-inbound-channel-adapter/>. By default, this adapter sends all TcpConnectionEvent instances to a Channel.spring-doc.cn

Further, the TCP connection factories now provide a new method called getOpenConnectionIds(), which returns a list of identifiers for all open connections. It lets applications broadcast to all open connections, among other uses.spring-doc.cn

Finally, the connection factories also provide a new method called closeConnection(String connectionId), which lets applications explicitly close a connection by using its ID.spring-doc.cn

For more information see TCP Connection Events.spring-doc.cn

Inbound Channel Adapter Script Support

The <int:inbound-channel-adapter/> now supports using <expression/> and <script/> child elements to create a MessageSource. See Channel Adapter Expressions and Scripts.spring-doc.cn

Content Enricher: Headers Enrichment Support

The content enricher now provides configuration for <header/> child elements, to enrich the outbound message with headers based on the reply message from the underlying message flow. For more information see Payload Enricher.spring-doc.cn

General Changes

This section describes general changes from version 2.2 to version 3.0.spring-doc.cn

Message ID Generation

Previously, message IDs were generated by using the JDK UUID.randomUUID() method. With this release, the default mechanism has been changed to use a more efficient and significantly faster algorithm. In addition, we added the ability to change the strategy used to generate message IDs. For more information see Message ID Generation.spring-doc.cn

“<gateway>” Changes

You can now set common headers across all gateway methods, and we added more options for adding information to the message about which method was invoked.spring-doc.cn

You can now entirely customize the way that gateway method calls are mapped to messages.spring-doc.cn

The GatewayMethodMetadata is now a public class. It lets you programmatically configure the GatewayProxyFactoryBean from Java.spring-doc.cn

For more information, see Messaging Gateways.spring-doc.cn

HTTP Endpoint Changes
  • Outbound Endpoint encode-uri: <http:outbound-gateway/> and <http:outbound-channel-adapter/> now provide an encode-uri attribute to allow disabling the encoding of the URI object before sending the request.spring-doc.cn

  • Inbound Endpoint merge-with-default-converters: <http:inbound-gateway/> and <http:inbound-channel-adapter/> now have a merge-with-default-converters attribute to include the list of default HttpMessageConverter instances after the custom message converters.spring-doc.cn

  • If-Modified-Since and If-Unmodified-Since HTTP Headers: Previously, the If-Modified-Since and If-Unmodified-Since HTTP headers were incorrectly processed within from and to HTTP headers mapped in the DefaultHttpHeaderMapper. Now, in addition to correcting that issue, DefaultHttpHeaderMapper provides date parsing from formatted strings for any HTTP headers that accept date-time values.spring-doc.cn

  • Inbound Endpoint Expression Variables: In addition to the existing #requestParams and #pathVariables, the <http:inbound-gateway/> and <http:inbound-channel-adapter/> now support additional useful variables: #matrixVariables, #requestAttributes, #requestHeaders, and #cookies. These variables are available in both payload and header expressions.spring-doc.cn

  • Outbound Endpoint 'uri-variables-expression': HTTP outbound endpoints now support the uri-variables-expression attribute to specify an Expression to evaluate a Map for all URI variable placeholders within URL template. This allows selection of a different map of expressions based on the outgoing message.spring-doc.cn

For more information, see HTTP Support.spring-doc.cn

Jackson Support (JSON)
  • A new abstraction for JSON conversion has been introduced. Implementations for Jackson 1.x and Jackson 2 are currently provided, with the version being determined by presence on the classpath. Previously, only Jackson 1.x was supported.spring-doc.cn

  • The ObjectToJsonTransformer and JsonToObjectTransformer now emit/consume headers containing type information.spring-doc.cn

For more information, see “JSON Transformers” in Transformer.spring-doc.cn

Chain Elements id Attribute

Previously, the id attribute for elements within a <chain> was ignored and, in some cases, disallowed. Now, the id attribute is allowed for all elements within a <chain>. The bean names of chain elements is a combination of the surrounding chain’s id and the id of the element itself. For example: 'myChain$child.myTransformer.handler'. For more information see, Message Handler Chain.spring-doc.cn

Aggregator 'empty-group-min-timeout' property

The AbstractCorrelatingMessageHandler provides a new property called empty-group-min-timeout to allow empty group expiry to run on a longer schedule than expiring partial groups. Empty groups are not removed from the MessageStore until they have not been modified for at least this number of milliseconds. For more information, see Configuring an Aggregator with XML.spring-doc.cn

Persistent File List Filters (file, (S)FTP)

New FileListFilter implementations that use a persistent MetadataStore are now available. You can use these to prevent duplicate files after a system restart. See Reading Files, FTP Inbound Channel Adapter, and SFTP Inbound Channel Adapter for more information.spring-doc.cn

Scripting Support: Variables Changes

We introduced a new variables attribute for scripting components. In addition, variable bindings are now allowed for inline scripts. See Groovy support and Scripting Support for more information.spring-doc.cn

Direct Channel Load Balancing configuration

Previously, when configuring LoadBalancingStrategy on the channel’s dispatcher child element, the only available option was to use a pre-defined enumeration of values which did not let developers set a custom implementation of the LoadBalancingStrategy. You can now use load-balancer-ref to provide a reference to a custom implementation of the LoadBalancingStrategy. For more information, see DirectChannel.spring-doc.cn

PublishSubscribeChannel Behavior

Previously, sending to a <publish-subscribe-channel/> that had no subscribers would return a false result. If used in conjunction with a MessagingTemplate, this would result in an exception being thrown. Now, the PublishSubscribeChannel has a property called minSubscribers (default: 0). If the message is sent to at least the minimum number of subscribers, the send operation is deemed to be successful (even if the number is zero). If an application expects to get an exception under these conditions, set the minimum subscribers to at least 1.spring-doc.cn

FTP, SFTP and FTPS Changes

The FTP, SFTP and FTPS endpoints no longer cache sessions by default.spring-doc.cn

We removed the deprecated cached-sessions attribute from all endpoints. Previously, the embedded caching mechanism controlled by this attribute’s value did not provide a way to limit the size of the cache, which could grow indefinitely. Release 2.1 introduced CachingConnectionFactory, and it became the preferred (and is now the only) way to cache sessions.spring-doc.cn

CachingConnectionFactory now provides a new method: resetCache(). This method immediately closes idle sessions and causes in-use sessions to be closed as and when they are returned to the cache.spring-doc.cn

The DefaultSftpSessionFactory (in conjunction with a CachingSessionFactory) now supports multiplexing channels over a single SSH connection (SFTP Only).spring-doc.cn

FTP, SFTP and FTPS Inbound Adapters

Previously, there was no way to override the default filter used to process files retrieved from a remote server. The filter attribute determines which files are retrieved, but the FileReadingMessageSource uses an AcceptOnceFileListFilter. This means that, if a new copy of a file is retrieved with the same name as a previously copied file, no message was sent from the adapter.spring-doc.cn

With this release, a new attribute local-filter lets you override the default filter (for example, with an AcceptAllFileListFilter or some other custom filter).spring-doc.cn

If you want the behavior of the AcceptOnceFileListFilter to be maintained across JVM executions, you can now configure a custom filter that retains state, perhaps on the file system.spring-doc.cn

Inbound channel adapters now support the preserve-timestamp attribute, which sets the local file modified timestamp to the timestamp from the server (default: false).spring-doc.cn

FTP, SFTP, and FTPS Gateways

The gateways now support the mv command, enabling the renaming of remote files.spring-doc.cn

The gateways now support recursive ls and mget commands, enabling the retrieval of a remote file tree.spring-doc.cn

The gateways now support put and mput commands, enabling sending files to the remote server.spring-doc.cn

The local-filename-generator-expression attribute is now supported, enabling the naming of local files during retrieval. By default, the same name as the remote file is used.spring-doc.cn

The local-directory-expression attribute is now supported, enabling the naming of local directories during retrieval (based on the remote directory).spring-doc.cn

Remote File Template

A new higher-level abstraction (RemoteFileTemplate) is provided over the Session implementations used by the FTP and SFTP modules. While it is used internally by endpoints, you can also use this abstraction programmatically. Like all Spring *Template implementations, it reliably closes the underlying session while allowing low level access to the session.spring-doc.cn

For more information, see FTP/FTPS Adapters and SFTP Adapters.spring-doc.cn

'requires-reply' Attribute for Outbound Gateways

All outbound gateways (such as <jdbc:outbound-gateway/> or <jms:outbound-gateway/>) are designed for 'request-reply' scenarios. A response is expected from the external service and is published to the reply-channel or the replyChannel message header. However, there are some cases where the external system might not always return a result (for example, a <jdbc:outbound-gateway/> when a SELECT ends with an empty ResultSet or perhaps a one-way web service). Consequently, developers needed an option to configure whether or not a reply is required. For this purpose, we introduced the requires-reply attribute for outbound gateway components. In most cases, the default value for requires-reply is true. If there is no result, a ReplyRequiredException is thrown. Changing the value to false means that, if an external service does not return anything, the message flow ends at that point, similar to an outbound channel adapter.spring-doc.cn

The WebService outbound gateway has an additional attribute called ignore-empty-responses. It is used to treat an empty String response as if no response were received. By default, it is true, but you can set it to false to allow the application to receive an empty String in the reply message payload. When the attribute is true, an empty string is treated as no response for the purposes of the requires-reply attribute. By default, requires-reply is false for the WebService outbound gateway.

Note that the requiresReply property was previously present but set to false in the AbstractReplyProducingMessageHandler, and there was no way to configure it on outbound gateways by using the XML namespace.spring-doc.cn

Previously, a gateway receiving no reply would silently end the flow (with a DEBUG log message). By default, with this change, an exception is now thrown by most gateways. To revert to the previous behavior, set requires-reply to false.
AMQP Outbound Gateway Header Mapping

Previously, the <int-amqp:outbound-gateway/> mapped headers before invoking the message converter, and the converter could overwrite headers such as content-type. The outbound adapter maps the headers after the conversion, which means headers like content-type from the outbound Message (if present) are used.spring-doc.cn

Starting with this release, the gateway now maps the headers after the message conversion, consistent with the adapter. If your application relies on the previous behavior (where the converter’s headers overrode the mapped headers), you either need to filter those headers (before the message reaches the gateway) or set them appropriately. The headers affected by the SimpleMessageConverter are content-type and content-encoding. Custom message converters may set other headers.spring-doc.cn

Stored Procedure Components Improvements

For more complex database-specific types not supported by the standard CallableStatement.getObject method, we introduced two new additional attributes to the <sql-parameter-definition/> element with OUT-direction:spring-doc.cn

The row-mapper attribute of the stored procedure inbound channel adapter <returning-resultset/> child element now supports a reference to a RowMapper bean definition. Previously, it contained only a class name (which is still supported).spring-doc.cn

For more information, see Stored Procedures.spring-doc.cn

Web Service Outbound URI Configuration

The web service outbound gateway 'uri' attribute now supports <uri-variable/> substitution for all URI schemes supported by Spring Web Services. For more information, see Outbound URI Configuration.spring-doc.cn

Redis Adapter Changes

The Redis inbound channel adapter can now use a null value for the serializer property, with the raw data being the message payload.spring-doc.cn

The Redis outbound channel adapter now has the topic-expression property to determine the Redis topic for the Message at runtime.spring-doc.cn

The Redis inbound channel adapter, in addition to the existing topics attribute, now has the topic-patterns attribute.spring-doc.cn

For more information, see Redis Support.spring-doc.cn

Advising Filters

Previously, when a <filter/> had a <request-handler-advice-chain/>, the discard action was all performed within the scope of the advice chain (including any downstream flow on the discard-channel). The filter element now has an attribute called discard-within-advice (default: true) to allow the discard action to be performed after the advice chain completes. See Advising Filters.spring-doc.cn

Advising Endpoints using Annotations

Request handler advice chains can now be configured using annotations. See Advising Endpoints Using Annotations.spring-doc.cn

ObjectToStringTransformer Improvements

This transformer now correctly transforms byte[] and char[] payloads to String. For more information, see Transformer.spring-doc.cn

JPA Support Changes

Payloads to persist or merge can now be of type java.lang.Iterable.spring-doc.cn

In that case, each object returned by the Iterable is treated as an entity and persisted or merged by using the underlying EntityManager. Null values returned by the iterator are ignored.spring-doc.cn

The JPA adapters now have additional attributes to optionally flush and clear entities from the associated persistence context after performing persistence operations.spring-doc.cn

Retrieving gateways had no mechanism to specify the first record to be retrieved, which is a common use case. The retrieving gateways now support specifying this parameter by adding the first-result and first-result-expression attributes to the gateway definition. For more information, see Retrieving Outbound Gateway.spring-doc.cn

The JPA retrieving gateway and inbound adapter now have an attribute to specify the maximum number of results in a result set as an expression. In addition, we introduced the max-results attribute to replace max-number-of-results, which has been deprecated. max-results and max-results-expression are used to provide the maximum number of results or an expression to compute the maximum number of results, respectively, in the result set.spring-doc.cn

For more information, see JPA Support.spring-doc.cn

Delayer: delay expression

Previously, the <delayer> provided a delay-header-name attribute to determine the delay value at runtime. In complex cases, the <delayer> had to be preceded with a <header-enricher>. Spring Integration 3.0 introduced the expression attribute and expression child element for dynamic delay determination. The delay-header-name attribute is now deprecated, because you can specify the header evaluation in the expression. In addition, we introduced the ignore-expression-failures to control the behavior when an expression evaluation fails. For more information, see Delayer.spring-doc.cn

JDBC Message Store Improvements

Spring Integration 3.0 adds a new set of DDL scripts for MySQL version 5.6.4 and higher. Now MySQL supports fractional seconds and is thus improving the FIFO ordering when polling from a MySQL-based message store. For more information, see The Generic JDBC Message Store.spring-doc.cn

IMAP Idle Connection Exceptions

Previously, if an IMAP idle connection failed, it was logged, but there was no mechanism to inform an application. Such exceptions now generate ApplicationEvent instances. Applications can obtain these events by using an <int-event:inbound-channel-adapter> or any ApplicationListener configured to receive an ImapIdleExceptionEvent (or one of its super classes).spring-doc.cn

Message Headers and TCP

The TCP connection factories now enable the configuration of a flexible mechanism to transfer selected headers (as well as the payload) over TCP. A new TcpMessageMapper enables the selection of the headers, and you need to configure an appropriate serializer or deserializer to write the resulting Map to the TCP stream. We added a MapJsonSerializer as a convenient mechanism to transfer headers and payload over TCP. For more information, see Transferring Headers.spring-doc.cn

JMS Message Driven Channel Adapter

Previously, when configuring a <message-driven-channel-adapter/>, if you wished to use a specific TaskExecutor, you had to declare a container bean and provide it to the adapter by setting the container attribute. We added the task-executor, letting it be set directly on the adapter. This is in addition to several other container attributes that were already available.spring-doc.cn

XsltPayloadTransformer

You can now specify the transformer factory class name by setting the transformer-factory-class attribute. See XsltPayloadTransformer.spring-doc.cn

Changes between 2.1 and 2.2

See the 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.spring-doc.cn

New Components

Version 2.2 added a number of new components.spring-doc.cn

RedisStore Inbound and Outbound Channel Adapters

Spring Integration now has RedisStore Inbound and Outbound Channel Adapters, letting you write and read Message payloads to and from Redis collections. For more information, see RedisStore Outbound Channel Adapter and Redis Store Inbound Channel Adapter.spring-doc.cn

MongoDB Inbound and Outbound Channel Adapters

Spring Integration now has MongoDB inbound and outbound channel adapters, letting you write and read Message payloads to and from a MongoDB document store. For more information, see MongoDB Outbound Channel Adapter and MongoDB Inbound Channel Adapter.spring-doc.cn

JPA Endpoints

Spring Integration now includes components for the Java Persistence API (JPA) for retrieving and persisting JPA entity objects. The JPA Adapter includes the following components:spring-doc.cn

For more information, see JPA Support.spring-doc.cn

General Changes

This section describes general changes from version 2.1 to version 2.2.spring-doc.cn

Spring 3.1 Used by Default

Spring Integration now uses Spring 3.1.spring-doc.cn

Adding Behavior to Endpoints

The ability to add an <advice-chain/> to a poller has been available for some time. However, the behavior added by this affects the entire integration flow. It did not address the ability to add (for example) retry to an individual endpoint. The 2.2 release introduced the <request-handler-advice-chain/> to many endpoints.spring-doc.cn

In addition, we added three standard advice classes for this purpose:spring-doc.cn

For more information, see Adding Behavior to Endpoints.spring-doc.cn

Transaction Synchronization and Pseudo Transactions

Pollers can now participate in Spring’s Transaction Synchronization feature. This allows for synchronizing such operations as renaming files by an inbound channel adapter, depending on whether the transaction commits or rolls back.spring-doc.cn

In addition, you can enable these features when no “real” transaction is present, by means of a PseudoTransactionManager.spring-doc.cn

For more information, see Transaction Synchronization.spring-doc.cn

File Adapter: Improved File Overwrite and Append Handling

When using the file outbound channel adapter or the file outbound gateway, you can use a new mode property. Prior to Spring Integration 2.2, target files were replaced when they existed. Now you can specify the following options:spring-doc.cn

Reply-Timeout Added to More Outbound Gateways

The XML Namespace support adds the reply-timeout attribute to the following outbound gateways:spring-doc.cn

Spring-AMQP 1.1

Spring Integration now uses Spring AMQP 1.1. This enables several features to be used within a Spring Integration application, including the following:spring-doc.cn

JDBC Support - Stored Procedures Components
SpEL Support

When using the stored procedure components of the Spring Integration JDBC Adapter, you can now provide stored procedure names or stored function names by using the Spring Expression Language (SpEL).spring-doc.cn

Doing so lets you specify the stored procedures to be invoked at runtime. For example, you can provide stored procedure names that you would like to execute through message headers. For more information, see Stored Procedures.spring-doc.cn

JMX Support

The stored procedure components now provide basic JMX support, exposing some of their properties as MBeans:spring-doc.cn

JDBC Support: Outbound Gateway

When you use the JDBC outbound gateway, the update query is no longer mandatory. You can now provide only a select query by using the request message as a source of parameters.spring-doc.cn

JDBC Support: Channel-specific Message Store Implementation

We added a new message channel-specific message store implementation, providing a more scalable solution using database-specific SQL queries. For more information, see Backing Message Channels.spring-doc.cn

Orderly Shutdown

We added a method called stopActiveComponents() to the IntegrationMBeanExporter. It allows a Spring Integration application to be shut down in an orderly manner, disallowing new inbound messages to certain adapters and waiting for some time to allow in-flight messages to complete.spring-doc.cn

JMS Outbound Gateway Improvements

You can now configure the JMS outbound gateway to use a MessageListener container to receive replies. Doing so can improve performance of the gateway.spring-doc.cn

ObjectToJsonTransformer

By default, the ObjectToJsonTransformer now sets the content-type header to application/json. For more information, see Transformer.spring-doc.cn

HTTP Support

Java serialization over HTTP is no longer enabled by default. Previously, when setting an expected-response-type on a Serializable object, the Accept header was not properly set up. We updated the SerializingHttpMessageConverter to set the Accept header to application/x-java-serialized-object. However, because this could cause incompatibility with existing applications, we decided to no longer automatically add this converter to the HTTP endpoints.spring-doc.cn

If you wish to use Java serialization, you need to add the SerializingHttpMessageConverter to the appropriate endpoints by using the message-converters attribute (when you use XML configuration) or by using the setMessageConverters() method (in Java).spring-doc.cn

Alternatively, you may wish to consider using JSON instead. It is enabled by having Jackson on the classpath.spring-doc.cn

Changes between 2.0 and 2.1

See the Migration Guide for important changes that might affect your applications.spring-doc.cn

New Components

Version 2.1 added a number of new components.spring-doc.cn

JSR-223 Scripting Support

In Spring Integration 2.0, we added support for Groovy. With Spring Integration 2.1, we expanded support for additional languages substantially by implementing support for JSR-223 (“Scripting for the Java™ Platform”). Now you have the ability to use any scripting language that supports JSR-223 including:spring-doc.cn

For further details, see Scripting Support.spring-doc.cn

AMQP Support

Spring Integration 2.1 added several channel adapters for receiving and sending messages by using the Advanced Message Queuing Protocol (AMQP). Furthermore, Spring Integration also provides a point-to-point message channel and a publish-subscribe message channel, both of which are backed by AMQP Exchanges and Queues.spring-doc.cn

For further details, see AMQP Support.spring-doc.cn

MongoDB Support

As of version 2.1, Spring Integration provides support for MongoDB by providing a MongoDB-based MessageStore.spring-doc.cn

For further details, see MongoDb Support.spring-doc.cn

Redis Support

As of version 2.1, Spring Integration supports Redis, an advanced key-value store, by providing a Redis-based MessageStore as well as publish-subscribe messaging adapters.spring-doc.cn

For further details, see Redis Support.spring-doc.cn

Support for Spring’s Resource abstraction

In version 2.1, we introduced a new resource inbound channel adapter that builds upon Spring’s resource abstraction to support greater flexibility across a variety of actual types of underlying resources, such as a file, a URL, or a classpath resource. Therefore, it is similar to but more generic than the file inbound channel adapter.spring-doc.cn

Stored Procedure Components

With Spring Integration 2.1, the JDBC Module also provides stored procedure support by adding several new components, including inbound and outbound channel adapters and an outbound gateway. The stored procedure support leverages Spring’s SimpleJdbcCall class and consequently supports stored procedures for:spring-doc.cn

The stored procedure components also support SQL functions for the following databases:spring-doc.cn

For further details, see Stored Procedures.spring-doc.cn

XPath and XML Validating Filter

Spring Integration 2.1 provides a new XPath-based message filter. It is part of the XML module. The XPath filter lets you filter messages by using XPath Expressions. We also added documentation for the XML validating filter.spring-doc.cn

Payload Enricher

Since Spring Integration 2.1, we added the payload enricher. A payload enricher defines an endpoint that typically passes a Message to the exposed request channel and then expects a reply message. The reply message then becomes the root object for evaluation of expressions to enrich the target payload.spring-doc.cn

For further details, see Payload Enricher.spring-doc.cn

FTP and SFTP Outbound Gateways

Spring Integration 2.1 provides two new outbound gateways to interact with remote File Transfer Protocol (FTP) or Secure File Transfer Protocol (SFT) servers. These two gateways let you directly execute a limited set of remote commands.spring-doc.cn

For instance, you can use these outbound gateways to list, retrieve, and delete remote files and have the Spring Integration message flow continue with the remote server’s response.spring-doc.cn

FTP Session Caching

As of version 2.1, we have exposed more flexibility with regards to session management for remote file adapters (for example, FTP, SFTP, and others).spring-doc.cn

Specifically, we deprecated the cache-sessions attribute (which is available via the XML namespace support). As an alternative, we added the sessionCacheSize and sessionWaitTimeout attributes on the CachingSessionFactory.spring-doc.cn

Framework Refactoring

We refactored the Spring Integration framework in a number of ways, all described in this section.spring-doc.cn

Standardizing Router Configuration

We standardized router parameters across all router implementations with Spring Integration 2.1 to provide a more consistent user experience.spring-doc.cn

In Spring Integration 2.1, we removed the ignore-channel-name-resolution-failures attribute in favor of consolidating its behavior with the resolution-required attribute. Also, the resolution-required attribute now defaults to true.spring-doc.cn

Starting with Spring Integration 2.1, routers no longer silently drop any messages if no default output channel was defined. This means that, by default, routers now require at least one resolved channel (if no default-output-channel was set) and, by default, throw a MessageDeliveryException if no channel was determined (or an attempt to send was not successful).spring-doc.cn

If, however, you do want to drop messages silently, you can set default-output-channel="nullChannel".spring-doc.cn

With the standardization of router parameters and the consolidation of the parameters described earlier, older Spring Integration based applications may break.

For further details, see Routers.spring-doc.cn

XML Schemas updated to 2.1

Spring Integration 2.1 ships with an updated XML Schema (version 2.1). It provides many improvements, such as the Router standardizations discussed earlier.spring-doc.cn

From now on, developers must always declare the latest XML schema (currently version 2.1). Alternatively, they can use the version-less schema. Generally, the best option is to use version-less namespaces, as these automatically use the latest available version of Spring Integration.spring-doc.cn

The following example declares a version-less Spring Integration namespace:spring-doc.cn

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:int="http://www.springframework.org/schema/integration"
   xsi:schemaLocation="http://www.springframework.org/schema/integration
           https://www.springframework.org/schema/integration/spring-integration.xsd
           http://www.springframework.org/schema/beans
           https://www.springframework.org/schema/beans/spring-beans.xsd">
...
</beans>

The following example declares a Spring Integration namespace with an explicit version:spring-doc.cn

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:int="http://www.springframework.org/schema/integration"
   xsi:schemaLocation="http://www.springframework.org/schema/integration
           https://www.springframework.org/schema/integration/spring-integration-2.2.xsd
           http://www.springframework.org/schema/beans
           https://www.springframework.org/schema/beans/spring-beans.xsd">
...
</beans>

The old 1.0 and 2.0 schemas are still there. However, if an application context still references one of those deprecated schemas, the validator fails on initialization.spring-doc.cn

Source Control Management and Build Infrastructure

Version 2.1 introduced a number of changes to source control management and build infrastructure. This section covers those changes.spring-doc.cn

Source Code Now Hosted on Github

Since version 2.0, the Spring Integration project uses Git for version control. To increase community visibility even further, the project was moved from SpringSource hosted Git repositories to Github. The Spring Integration Git repository is located at: spring-integration.spring-doc.cn

For the project, we also improved the process of providing code contributions. Further, we ensure that every commit is peer-reviewed. In fact, core committers now follow the same process as contributors. For more details, see Contributing.spring-doc.cn

Improved Source Code Visibility with Sonar

In an effort to provide better source code visibility and consequently to monitor the quality of Spring Integration’s source code, we set up an instance of Sonar. We gather metrics nightly and make them available at sonar.spring.io.spring-doc.cn

New Samples

For the 2.1 release of Spring Integration, we also expanded the Spring Integration Samples project and added many new samples, such as samples that cover AMQP support, a sample that showcases the new payload enricher, a sample illustrating techniques for testing Spring Integration flow fragments, and a sample for executing stored procedures against Oracle databases. For details, visit spring-integration-samples.spring-doc.cn

Changes between Versions 1.0 and 2.0

See the Migration Guide for important changes that might affect your applications.spring-doc.cn

Spring 3 support

Spring Integration 2.0 is built on top of Spring 3.0.5 and makes many of its features available to our users.spring-doc.cn

[[2.0-spel-support]] ===== Support for the Spring Expression Language (SpEL)spring-doc.cn

You can now use SpEL expressions within the transformer, router, filter, splitter, aggregator, service-activator, header-enricher, and many more elements of the Spring Integration core namespace as well as within various adapters. This guide includes many samples.spring-doc.cn

Conversion Service and Converter

You can now benefit from the conversion service support provided with Spring while configuring many Spring Integration components, such as a Datatype channel. See Message Channel Implementations and Service Activator. Also, the SpEL support mentioned in the previous point also relies upon the conversion service. Therefore, you can register converters once and take advantage of them anywhere you use SpEL expressions.spring-doc.cn

TaskScheduler and Trigger

Spring 3.0 defines two new strategies related to scheduling: TaskScheduler and Trigger. Spring Integration (which uses a lot of scheduling) now builds upon these. In fact, Spring Integration 1.0 had originally defined some of the components (such as CronTrigger) that have now been migrated into Spring 3.0’s core API. Now you can benefit from reusing the same components within the entire application context (not just Spring Integration configuration). We also greatly simplified configuration of Spring Integration pollers by providing attributes for directly configuring rates, delays, cron expressions, and trigger references. See Channel Adapter for sample configurations.spring-doc.cn

RestTemplate and HttpMessageConverter

Our outbound HTTP adapters now delegate to Spring’s RestTemplate for executing the HTTP request and handling its response. This also means that you can reuse any custom HttpMessageConverter implementations. See HTTP Outbound Components for more details.spring-doc.cn

Enterprise Integration Pattern Additions

Also in 2.0, we have added support for even more of the patterns described in Hohpe and Woolf’s Enterprise Integration Patterns book.spring-doc.cn

Message History

We now provide support for the message history pattern, letting you keep track of all traversed components, including the name of each channel and endpoint as well as the timestamp of that traversal. See Message History for more details.spring-doc.cn

Message Store

We now provide support for the message store pattern. The message store provides a strategy for persisting messages on behalf of any process whose scope extends beyond a single transaction, such as the aggregator and the resequencer. Many sections of this guide include samples of how to use a message store, as it affects several areas of Spring Integration. See Message Store, Claim Check, Message Channels, Aggregator, JDBC Support`", and Resequencer for more details.spring-doc.cn

Claim Check

We have added an implementation of the claim check pattern. The idea behind the claim check pattern is that you can exchange a message payload for a “claim ticket”. This lets you reduce bandwidth and avoid potential security issues when sending messages across channels. See Claim Check for more details.spring-doc.cn

Control Bus

We have provided implementations of the control bus pattern, which lets you use messaging to manage and monitor endpoints and channels. The implementations include both a SpEL-based approach and one that runs Groovy scripts. See Control Bus and Control Bus for more details.spring-doc.cn

New Channel Adapters and Gateways

We have added several new channel adapters and messaging gateways in Spring Integration 2.0.spring-doc.cn

TCP and UDP Adapters

We have added channel adapters for receiving and sending messages over the TCP and UDP internet protocols. See TCP and UDP Support for more details. See also the following blog: “Using UDP and TCP Adapters in Spring Integration 2.0 M3”.spring-doc.cn

Twitter Adapters

Twitter adapters provides support for sending and receiving Twitter status updates as well as direct messages. You can also perform Twitter Searches with an inbound channel adapter. See Spring Integration Social Twitter for more details.spring-doc.cn

XMPP Adapters

The new XMPP adapters support both chat messages and presence events. See XMPP Support for more details.spring-doc.cn

FTP and FTPS Adapters

Inbound and outbound file transfer support over FTP and FTPS is now available. See FTP/FTPS Adapters for more details.spring-doc.cn

SFTP Adapters

Inbound and outbound file transfer support over SFTP is now available. See SFTP Adapters for more details.spring-doc.cn

Feed Adapters

We have also added channel adapters for receiving news feeds (ATOM and RSS). See Feed Adapter for more details.spring-doc.cn

Other Additions

Spring Integration adds a number of other features. This section describes them.spring-doc.cn

Groovy Support

Spring Integration 2.0 added Groovy support, letting you use the Groovy scripting language to provide integration and business logic. See Groovy support for more details.spring-doc.cn

Map Transformers

These symmetrical transformers convert payload objects to and from Map objects. See Transformer for more details.spring-doc.cn

JSON Transformers

These symmetrical transformers convert payload objects to and from JSON. See Transformer for more details.spring-doc.cn

Serialization Transformers

These symmetrical transformers convert payload objects to and from byte arrays. They also support the serializer and deserializer strategy interfaces that Spring 3.0.5 added. See Transformer for more details.spring-doc.cn

Framework Refactoring

The core API went through some significant refactoring to make it simpler and more usable. Although we anticipate that the impact to developers should be minimal, you should read through this document to find what was changed. Specifically, you should read Dynamic Routers, Messaging Gateways, HTTP Outbound Components, Message, and Aggregator. If you directly depend on some of the core components (Message, MessageHeaders, MessageChannel, MessageBuilder, and others), you need to update any import statements. We restructured some packaging to provide the flexibility we needed for extending the domain model while avoiding any cyclical dependencies (it is a policy of the framework to avoid such “tangles”).spring-doc.cn

New Source Control Management and Build Infrastructure

With Spring Integration 2.0, we switched our build environment to use Git for source control. To access our repository, visit https://git.springsource.org/spring-integration. We have also switched our build system to Gradle.spring-doc.cn

New Spring Integration Samples

With Spring Integration 2.0, we have decoupled the samples from our main release distribution. Please read the following blog to get more information: New Spring Integration Samples. We have also created many new samples, including samples for every new adapter.spring-doc.cn

Spring Tool Suite Visual Editor for Spring Integration

There is an amazing new visual editor for Spring Integration included within the latest version of SpringSource Tool Suite. If you are not already using STS, you can download it at Spring Tool Suite.spring-doc.cn