跳到主要内容
版本:7.0.2

Polled Inbound Channel Adapter

DeepSeek V3 中英对照 Polled Inbound Channel Adapter

概述

版本 5.0.1 引入了轮询通道适配器,允许您按需获取单个消息——例如,使用 MessageSourcePollingTemplate 或轮询器。更多信息请参阅延迟确认可轮询消息源

目前不支持 XML 配置。

以下示例展示了如何配置 AmqpMessageSource

@Bean
public IntegrationFlow flow() {
return IntegrationFlow.from(Amqp.inboundPolledAdapter(connectionFactory(), DSL_QUEUE),
e -> e.poller(Pollers.fixedDelay(1_000)).autoStartup(false))
.handle(p -> {
...
})
.get();
}

请参阅 Javadoc 了解配置属性。

批量消息处理

请参阅批量消息

对于轮询适配器,没有监听器容器;批处理消息总是会被解批处理(如果BatchingStrategy支持这样做的话)。