CAMEL-11666 - Improved docs
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6e936bb7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6e936bb7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6e936bb7 Branch: refs/heads/master Commit: 6e936bb7be75708647ddb6731965ae232c2534c1 Parents: b623f93 Author: Andrea Cosentino <anco...@gmail.com> Authored: Wed Aug 23 13:38:52 2017 +0200 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Wed Aug 23 13:38:52 2017 +0200 ---------------------------------------------------------------------- .../main/docs/hazelcast-queue-component.adoc | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/6e936bb7/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc index c9b0de9..f2bc0ec 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc @@ -180,10 +180,29 @@ String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX)); ### Queue consumer â from(âhazelcast-queue:fooâ) -The queue consumer provides 2 operations: +The queue consumer provides two different modes: + +* Poll +* Listen + +Sample for *Poll* mode + +[source,java] +------------------------------------------------------------------------------------------- +fromF("hazelcast-%sfoo?queueConsumerMode=Poll", HazelcastConstants.QUEUE_PREFIX)).to("mock:result"); +------------------------------------------------------------------------------------------- + +In this way the consumer will poll the queue and return the head of the queue or null after a timeout. + + +In Listen mode instead the consumer will listen for events on queue. + +The queue consumer in Listen mode provides 2 operations: * add * remove +Sample for *Listen* mode + [source,java] ------------------------------------------------------------------------------------------- fromF("hazelcast-%smm", HazelcastConstants.QUEUE_PREFIX)