Add docs for container startup failure policy (#841)

This commit is contained in:
Chris Bono
2024-09-11 15:14:20 -05:00
committed by GitHub
parent 82e3e7a443
commit 8ed6689e29
5 changed files with 14 additions and 5 deletions

View File

@@ -14,3 +14,4 @@ asciidoc:
attributes:
listener-class: PulsarListener@
template-class: PulsarTemplate@
container-class: ConcurrentPulsarListenerContainerFactory@

View File

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

View File

@@ -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<String> 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]

View File

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

View File

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