From 33648dcda2f48656cbc8db01d48cab964408d8b1 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Fri, 12 Aug 2022 18:22:17 -0400 Subject: [PATCH] Adding docs for consumer properties on PulsarListener --- spring-pulsar-docs/src/main/asciidoc/pulsar.adoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spring-pulsar-docs/src/main/asciidoc/pulsar.adoc b/spring-pulsar-docs/src/main/asciidoc/pulsar.adoc index e294001d..2af05488 100644 --- a/spring-pulsar-docs/src/main/asciidoc/pulsar.adoc +++ b/spring-pulsar-docs/src/main/asciidoc/pulsar.adoc @@ -180,6 +180,22 @@ public void listen4(Messages messages) { ---- ==== +When using `PulsarListener`, you can provide Pulsar consumer properties directly on the annotation itself. +This is convenient, if you do not want to use the Boot configuration properties mentioned above or have multiple `PulsarListener` methods. + +Here is an example of using Pulsar consumer properties directly on `PulsarListener`. + +==== +[source, java] +---- +@PulsarListener(properties = { "subscriptionName=subscription-1", "topicNames=foo-1", "receiverQueueSize=5000" }) +void listen(String message) { +} +---- +==== + +Note that the properties used are direct Pulsar consumer properties. + [[pulsar-message-listener-container]] === Pulsar Message Listener Container