Pull topic-resolution.adoc up a level in docs

Resolves #644
This commit is contained in:
ka_sh
2024-04-24 04:34:55 +05:30
committed by GitHub
parent fbff39b62b
commit 5ba2a00cfd
8 changed files with 12 additions and 16 deletions

View File

@@ -10,7 +10,6 @@
*** xref:reference/pulsar/pulsar-client.adoc[]
*** xref:reference/pulsar/message-production.adoc[]
*** xref:reference/pulsar/message-consumption.adoc[]
*** xref:reference/pulsar/topic-resolution.adoc[]
*** xref:reference/pulsar/publishing-consuming-partitioned-topics.adoc[]
*** xref:reference/tombstones.adoc[]
** xref:reference/reactive-pulsar.adoc[]
@@ -19,8 +18,8 @@
*** xref:reference/reactive-pulsar/reactive-pulsar-client.adoc[]
*** xref:reference/reactive-pulsar/reactive-message-production.adoc[]
*** xref:reference/reactive-pulsar/reactive-message-consumption.adoc[]
*** xref:reference/reactive-pulsar/reactive-topic-resolution.adoc[]
*** xref:reference/tombstones-reactive.adoc[]
** xref:reference/topic-resolution.adoc[]
** xref:reference/pulsar-admin.adoc[]
** xref:reference/pulsar-function.adoc[]
** xref:reference/observability.adoc[]

View File

@@ -39,7 +39,7 @@ public void listen(String message) {
----
In this most basic form, when the `subscriptionName` is not provided on the `@PulsarListener` annotation an auto-generated subscription name will be used.
Likewise, when the `topics` are not directly provided, a xref:reference/pulsar/topic-resolution.adoc#topic-resolution-process-imperative[topic resolution process] is used to determine the destination topic.
Likewise, when the `topics` are not directly provided, a xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] is used to determine the destination topic.
In the `PulsarListener` method shown earlier, we receive the data as `String`, but we do not specify any schema types.
Internally, the framework relies on Pulsar's schema mechanism to convert the data to the required type.
@@ -290,7 +290,7 @@ return pulsarListenerContainer;
----
NOTE: If topic information is not specified when using the listener containers directly, the same
xref:reference/pulsar/topic-resolution.adoc#topic-resolution-process-imperative[topic resolution process] used by the `PulsarListener` is used with the one exception that the "Message type default" step is **omitted**.
xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] used by the `PulsarListener` is used with the one exception that the "Message type default" step is **omitted**.
`DefaultPulsarMessageListenerContainer` creates only a single consumer.
If you want to have multiple consumers managed through multiple threads, you need to use `ConcurrentPulsarMessageListenerContainer`.

View File

@@ -13,7 +13,7 @@ They return the `MessageId` of the message that was published once the message i
The `sendAsync` method calls are asynchronous calls that are non-blocking.
They return a `CompletableFuture`, which you can use to asynchronously receive the message ID once the messages are published.
NOTE: For the API variants that do not include a topic parameter, a xref:reference/pulsar/topic-resolution.adoc#topic-resolution-process-imperative[topic resolution process] is used to determine the destination topic.
NOTE: For the API variants that do not include a topic parameter, a xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] is used to determine the destination topic.
=== Simple API
The template provides a handful of methods ({javadocs}/org/springframework/pulsar/core/PulsarOperations.html[prefixed with _'send'_]) for simple send requests. For more complicated send requests, a fluent API lets you configure more options.
@@ -78,7 +78,7 @@ include::../schema-info/schema-info-template.adoc[]
The `PulsarTemplate` relies on a `PulsarProducerFactory` to actually create the underlying producer.
Spring Boot auto-configuration also provides this producer factory which you can further configure by specifying any of the {spring-boot-pulsar-config-props}[`spring.pulsar.producer.*`] application properties.
NOTE: If topic information is not specified when using the producer factory APIs directly, the same xref:reference/pulsar/topic-resolution.adoc#topic-resolution-process-imperative[topic resolution process] used by the `PulsarTemplate` is used with the one exception that the "Message type default" step is **omitted**.
NOTE: If topic information is not specified when using the producer factory APIs directly, the same xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] used by the `PulsarTemplate` is used with the one exception that the "Message type default" step is **omitted**.
[[global-producer-customize]]
=== Global producer customization

View File

@@ -32,7 +32,7 @@ Mono<Void> listen(String message) {
}
----
In this most basic form, when the `topics` are not directly provided, a xref:reference/reactive-pulsar/reactive-topic-resolution.adoc#topic-resolution-process-reactive[topic resolution process] is used to determine the destination topic.
In this most basic form, when the `topics` are not directly provided, a xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] is used to determine the destination topic.
Likewise, when the `subscriptionName` is not provided on the `@ReactivePulsarListener` annotation an auto-generated subscription name will be used.
In the `ReactivePulsarListener` method shown earlier, we receive the data as `String`, but we do not specify any schema types.
@@ -206,7 +206,7 @@ The "listener" aspect is provided by the `ReactivePulsarMessageHandler` of which
* `ReactivePulsarOneByOneMessageHandler` - handles a single message one-by-one
* `ReactivePulsarStreamingHandler` - handles multiple messages via a `Flux`
NOTE: If topic information is not specified when using the listener containers directly, the same xref:reference/reactive-pulsar/reactive-topic-resolution.adoc#topic-resolution-process-reactive[topic resolution process] used by the `ReactivePulsarListener` is used with the one exception that the "Message type default" step is **omitted**.
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**.
[[reactive-concurrency]]
== Concurrency

View File

@@ -9,7 +9,7 @@ On the Pulsar producer side, Spring Boot auto-configuration provides a `Reactive
The template provides send methods that accept a single message and return a `Mono<MessageId>`.
It also provides send methods that accept multiple messages (in the form of the ReactiveStreams `Publisher` type) and return a `Flux<MessageId>`.
NOTE: For the API variants that do not include a topic parameter, a xref:reference/reactive-pulsar/reactive-topic-resolution.adoc#topic-resolution-process-reactive[topic resolution process] is used to determine the destination topic.
NOTE: For the API variants that do not include a topic parameter, a xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] is used to determine the destination topic.
=== Fluent API
The template provides a {javadocs}/org/springframework/pulsar/reactive/core/ReactivePulsarOperations.html#newMessage(T)[fluent builder] to handle more complicated send requests.
@@ -57,7 +57,7 @@ The `ReactivePulsarTemplate` relies on a `ReactivePulsarSenderFactory` to actual
Spring Boot provides this sender factory which can be configured with any of the {spring-boot-pulsar-config-props}[`spring.pulsar.producer.*`] application properties.
NOTE: If topic information is not specified when using the sender factory APIs directly, the same xref:reference/reactive-pulsar/reactive-topic-resolution.adoc#topic-resolution-process-reactive[topic resolution process] used by the `ReactivePulsarTemplate` is used with the one exception that the "Message type default" step is **omitted**.
NOTE: If topic information is not specified when using the sender factory APIs directly, the same xref:reference/topic-resolution.adoc#topic-resolution-process[topic resolution process] used by the `ReactivePulsarTemplate` is used with the one exception that the "Message type default" step is **omitted**.
=== Producer Caching
Each underlying Pulsar producer consumes resources.

View File

@@ -1,3 +0,0 @@
[[topic-resolution-process-reactive]]
= Topic Resolution
include::../pulsar/topic-resolution.adoc[]

View File

@@ -1,6 +1,6 @@
[[topic-resolution-process-imperative]]
[[topic-resolution-process]]
= Topic Resolution
include::../../attributes/attributes.adoc[]
include::../attributes/attributes.adoc[]
A destination topic is needed when producing or consuming messages.
The framework looks in the following ordered locations to determine a topic (stopping at the first find):

View File

@@ -14,7 +14,7 @@ NOTE: While the above links focus on `PulsarTemplate` and `@PulsarListener`, thi
Details for each can be found in their respective section of this reference guide.
=== Default topic/schema via message annotation
You can now mark a message class with `@PulsarMessage` to specify the xref:./reference/pulsar/topic-resolution.adoc#default-topic-via-annotation[default topic] and/or xref:./reference/pulsar/message-consumption.adoc#listener-default-schema-annotation[default schema] to use when producing/consuming messages of that type.
You can now mark a message class with `@PulsarMessage` to specify the xref:./reference/topic-resolution.adoc#default-topic-via-annotation[default topic] and/or xref:./reference/pulsar/message-consumption.adoc#listener-default-schema-annotation[default schema] to use when producing/consuming messages of that type.
=== Remove checked exceptions
The APIs provided by the framework no longer throw the checked `PulsarClientException`, but rather the unchecked `PulsarException`.