Changes between 5.3 and 5.4

New Components

Channel Adapters for Apache Kafka

独立的 Spring Integration for Apache Kafka 项目已合并为该项目的一个 spring-integration-kafka 模块。

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

KafkaProducerMessageHandler sendTimeoutExpression 默认值已更改。

The KafkaProducerMessageHandler sendTimeoutExpression default has changed.

您现在可以访问基础 send() 操作的 Future<?>

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

有关更多信息,请参见 Spring for Apache Kafka Support

See Spring for Apache Kafka Support for more information.

R2DBC Channel Adapters

已经引入了用于 R2DBC 数据库交互的通道适配器。有关更多信息,请参见 R2DBC Support

The Channel Adapters for R2DBC database interaction have been introduced. See R2DBC Support for more information.

Redis Stream Support

已引入支持 Redis 流的通道适配器。有关详细信息,请参见 Redis Stream Outbound Channel Adapter

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

Renewable Lock Registry

已引入可维护锁注册表,用于允许维护分布式锁的租约。有关详细信息,请参见 JDBC implementation

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

ZeroMQ Support

已经引入了 ZeroMqChannelZeroMqMessageHandlerZeroMqMessageProducer。有关更多信息,请参见 ZeroMQ Support

ZeroMqChannel, ZeroMqMessageHandler and ZeroMqMessageProducer have been introduced. See ZeroMQ Support for more information.

General Changes

单向消息网关(void 方法返回类型)现将 nullChannel 显式地设到 replyChannel 标头中,以忽略所有可能的下游答复。有关详细信息,请参见 Setting the Default Reply Channel

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.

此外,网关方法调用者(GatewayProxyFactoryBean.MethodInvocationGateway)现在提供托管 Bean 名称,它是网关代理 Bean 名称与方法签名组合。例如:sampleGateway#echo(String)。这会影响公开的网关方法调用消息历史记录和指标,并且还在应用程序上下文的启动和关闭期间提供细粒度的日志。

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.

聚合器(和重新排序器)现在可以使孤立组(持久存储库中的组,在应用程序重新启动后不再收到任何新消息)过期。有关详细信息,请参见 Aggregator Expiring Groups

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.

已经删除了被 Micrometer 仪表所替代的旧版指标。

The legacy metrics that were replaced by Micrometer meters have been removed.

Thread Barrier 现在有两个单独的超时选项:requestTimeouttriggerTimeout

The Thread Barrier has now two separate timeout options: requestTimeout and triggerTimeout.

TCP/UDP Changes

连接工厂现支持多个发送组件 (TcpSender);它们仍然仅限于一个接收组件 (TcpListener)。例如,这允许入站网关和出站通道适配器共享同一工厂,既支持请求/答复,也支持从服务器到客户端的任意消息传递。除非使用单用连接或 ThreadAffinityClientConnectionFactory,否则不应将共享工厂与出站网关一起使用。有关详细信息,请参见 Collaborating Channel AdaptersTCP Gateways

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.

UDP 通道适配器现在可以通过 SocketCustomizer 进行配置,允许多种设置适配器不支持的套接字属性。有关更多信息,请参见 UDP Adapters

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.

AMQP Changes

出站端点现在有一种新的机制来处理发布程序的确认和返回。有关更多信息,请参见 Alternative Mechanism for Publisher Confirms and Returns

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.

AmqpInboundChannelAdapter 支持新的 BatchMode.EXTRACT_PAYLOAD_WITH_HEADERS。有关更多信息,请参见 Inbound Channel Adapter

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

Mail Changes

AbstractMailReceiver 现可按原样产生 MimeMessage,而无需急切地获取其内容。有关详细信息,请参见 Mail-receiving Channel Adapter

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