This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Integration 6.4.1!

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.

It does not currently support XML configuration.

The following example shows how to configure an AmqpMessageSource:

  • Java DSL

  • Java

@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.

XML
This adapter currently does not have XML configuration support.

Batched Messages

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