INT-4371: Polishing - raw message header; docs

JIRA: https://jira.spring.io/browse/INT-4371

* Polishing - DSL
This commit is contained in:
Gary Russell
2018-01-11 11:08:49 -05:00
committed by Artem Bilan
parent 30450c48be
commit c98d50540c
4 changed files with 67 additions and 3 deletions

View File

@@ -301,6 +301,38 @@ public class AmqpJavaApplication {
}
----
=== Polled Inbound Channel Adapter
Starting with _version 5.0.1_, a polled channel adapter is provided, allowing fetching individual messages on-demand, for example with a `MessageSourcePollingTemplate` or a poller.
See <<deferred-acks-message-source>> for more information.
It does not currently have XML configuration.
[source, java]
----
@Bean
public AmqpMessageSource source(ConnectionFactory connectionFactory) {
return new AmpqpMessageSource(connectionFactory, "someQueue");
}
----
Refer to the javadocs for configuration properties.
With the Java DSL:
[source, java]
----
@Bean
public IntegrationFlow flow() {
return IntegrationFlows.from(Amqp.inboundPolledAdapter(connectionFactory(), DSL_QUEUE),
e -> e.poller(Pollers.fixedDelay(1_000)).autoStartup(false))
.handle(p -> {
...
})
.get();
}
----
[[amqp-inbound-gateway]]
=== Inbound Gateway