This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Integration 6.5.1!spring-doc.cn

Polled Inbound Channel Adapter

Overview

Version 5.0.1 introduced a polled channel adapter, letting you fetch individual messages on demand — for example, with a MessageSourcePollingTemplate or a poller. See Deferred Acknowledgment Pollable Message Source for more information.spring-doc.cn

It does not currently support XML configuration.spring-doc.cn

The following example shows how to configure an AmqpMessageSource:spring-doc.cn

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

See the Javadoc for configuration properties.spring-doc.cn

Batched Messages

For the polled adapter, there is no listener container; batched messages are always debatched (if the BatchingStrategy supports doing so).spring-doc.cn