diff --git a/spring-pulsar-docs/src/main/antora/antora.yml b/spring-pulsar-docs/src/main/antora/antora.yml index bf4df088..8a84a622 100644 --- a/spring-pulsar-docs/src/main/antora/antora.yml +++ b/spring-pulsar-docs/src/main/antora/antora.yml @@ -14,3 +14,4 @@ asciidoc: attributes: listener-class: PulsarListener@ template-class: PulsarTemplate@ + container-class: ConcurrentPulsarListenerContainerFactory@ diff --git a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/message-listener-startup-failure.adoc b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/message-listener-startup-failure.adoc index dbf08f90..af8660be 100644 --- a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/message-listener-startup-failure.adoc +++ b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/message-listener-startup-failure.adoc @@ -16,13 +16,12 @@ each attempt. However, a custom retry template can be specified on the corresponding container properties. If the container fails to restart after the retries are exhausted, it is left in a non-running state. -[discrete] == Configuration [discrete] === With Spring Boot -**TODO** +When using Spring Boot you can register a `PulsarContainerFactoryCustomizer<{container-class}>` bean that sets the container startup properties. [discrete] === Without Spring Boot -**TODO** +However, if you are instead manually configuring the components, you will have to update the container startup properties accordingly when constructing the message listener container factory. diff --git a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/pulsar/message-consumption.adoc b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/pulsar/message-consumption.adoc index 33e779f6..dc226a7c 100644 --- a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/pulsar/message-consumption.adoc +++ b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/pulsar/message-consumption.adoc @@ -977,6 +977,7 @@ void someMethod() { TIP: The id parameter passed to `getListenerContainer` is the container id - which will be the value of the `@PulsarListener` id attribute when pausing/resuming a `@PulsarListener`. [[message-listener-startup-failure]] +:container-class: ConcurrentPulsarListenerContainerFactory include::../message-listener-startup-failure.adoc[leveloffset=+2] @@ -1031,5 +1032,6 @@ public PulsarReaderReaderBuilderCustomizer myCustomizer() { TIP: If your application only has a single `@PulsarReader` and a single `PulsarReaderReaderBuilderCustomizer` bean registered then the customizer will be automatically applied. -=== Handling Startup Failures -The same xref:#message-listener-startup-failure[startup failure facilities] available to message listener containers are available for reader containers. +[[message-reader-startup-failure]] +:container-class: DefaultPulsarReaderContainerFactory +include::../message-listener-startup-failure.adoc[leveloffset=+2] diff --git a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/reactive-pulsar/reactive-message-consumption.adoc b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/reactive-pulsar/reactive-message-consumption.adoc index 40544472..1209c3a3 100644 --- a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/reactive-pulsar/reactive-message-consumption.adoc +++ b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/reference/reactive-pulsar/reactive-message-consumption.adoc @@ -207,6 +207,7 @@ The "listener" aspect is provided by the `ReactivePulsarMessageHandler` of which NOTE: If topic information is not specified when using the listener containers directly, the same xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] used by the `ReactivePulsarListener` is used with the one exception that the "Message type default" step is **omitted**. [[message-listener-startup-failure]] +:container-class: DefaultReactivePulsarListenerContainerFactory include::../message-listener-startup-failure.adoc[leveloffset=+2] [[reactive-concurrency]] diff --git a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc index 0f70947c..d195644c 100644 --- a/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc +++ b/spring-pulsar-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc @@ -14,6 +14,12 @@ See xref:./reference/custom-object-mapper.adoc[Custom Object Mapper] for more de You can specify a default tenant and/or namespace to use when producing or consuming messages against a non-fully-qualified topic URL. See xref:./reference/default-tenant-namespace.adoc[Default Tenant / Namespace] for more details. +=== Message Container Startup Policy +You can now configure the message listener container startup failure policy to `stop`, `continue`, or `retry`. +For more details see the corresponding section for one of the supported containers xref:./reference/pulsar/message-consumption.adoc#message-listener-startup-failure[@PulsarListener], xref:./reference/pulsar/message-consumption.adoc#message-reader-startup-failure[@PulsarReader], or xref:./reference/reactive-pulsar/reactive-message-consumption.adoc#message-listener-startup-failure[@ReactivePulsarListener] + + + === Deprecations ==== PulsarClient#getPartitionsForTopic(java.lang.String)