Fix broken links in docs

- Also fix previous merge where missed rename of Reactive pulsar template
This commit is contained in:
Chris Bono
2022-11-10 14:06:33 -06:00
parent a5ddf77ced
commit cb39dc4b84
5 changed files with 17 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
[appendix]
[[appendix.application-properties]]
[[application-properties]]
= Application Properties
You can specify various properties inside your `application.properties` file, inside your `application.yml` file, or as command line switches.

View File

@@ -10,11 +10,11 @@ Soby Chacko; Chris Bono; Alexander Preuß; Jay Bryant
//ifdef::backend-html5[]
//*{project-version}*
//
//NOTE: This documentation is also available as https://docs.spring.io/spring-kafka/docs/{project-version}/reference/pdf/spring-kafka-reference.pdf[PDF].
//NOTE: This documentation is also available as https://docs.spring.io/spring-pulsar/docs/{project-version}/reference/pdf/spring-pulsar-reference.pdf[PDF].
//endif::[]
//
//ifdef::backend-pdf[]
//NOTE: This documentation is also available as https://docs.spring.io/spring-kafka/docs/{project-version}/reference/html/index.html[HTML].
//NOTE: This documentation is also available as https://docs.spring.io/spring-pulsar/docs/{project-version}/reference/html/index.html[HTML].
//endif::[]
(C) 2022 VMware, Inc.

View File

@@ -11,7 +11,7 @@ For a quick but less detailed introduction, see <<index.adoc#quick-intro>>.
==== Pulsar Client
When you use the Pulsar Spring Boot Starter, you get the `PulsarClient` auto-configured.
This is done through a factory bean called `PulsarClientFactoryBean`, which takes a configuration object called `PulsarClientConfiguration`. By default, the application tries to connect to a local Pulsar instance at `pulsar://localhost:6650`. However, there are many application properties available to configure the client. See the <<appendix,Appendix>> for more detail.
This is done through a factory bean called `PulsarClientFactoryBean`, which takes a configuration object called `PulsarClientConfiguration`. By default, the application tries to connect to a local Pulsar instance at `pulsar://localhost:6650`. However, there are many application properties available to configure the client. See the <<application-properties.adoc#appendix.application-properties.pulsar-client,Appendix>> for more detail.
[[client-authentication]]
===== Authentication
@@ -87,18 +87,17 @@ pulsarTemplate.setSchema(Schema.JSON(Foo.class));
----
====
[[producer-application-properties]]
See the <<appendix,Appendix>> for Pulsar produce properties.
See the <<application-properties.adoc#appendix.application-properties.pulsar-producer,Appendix>> for Pulsar producer properties.
[[pulsar-producer-factory]]
==== Pulsar Producer Factory
The `PulsarTemplate` relies on a `PulsarProducerFactory` to actually create the underlying producer. Spring Boot auto-configuration also provides this producer factory. Additionally, you can configure the factory by specifying any of the available producer-centric application properties. See the <<apppendix,Appendix>>.
The `PulsarTemplate` relies on a `PulsarProducerFactory` to actually create the underlying producer. Spring Boot auto-configuration also provides this producer factory. Additionally, you can configure the factory by specifying any of the available producer-centric application properties. See the <<application-properties.adoc#appendix.application-properties.pulsar-producer,Appendix>>.
[[producer-caching]]
==== Pulsar Producer Caching
Each underlying Pulsar producer consumes resources. To improve performance and avoid continual creation of producers, the producer factory caches the producers that it creates. They are cached in an LRU fashion and evicted when they have not been used within a configured time period. The link:{github}/blob/8e33ac0b122bc0e75df299919c956cacabcc9809/spring-pulsar/src/main/java/org/springframework/pulsar/core/CachingPulsarProducerFactory.java#L159[cache key] is composed of just enough information to ensure that callers are returned the same producer on subsequent creation requests.
Additionally, you can configure the cache settings by specifying any of the `spring.producer.cache` prefixed application properties. See the <<appendix,Appendix>>.
Additionally, you can configure the cache settings by specifying any of the `spring.producer.cache` prefixed application properties. See the <<application-properties.adoc#appendix.application-properties.pulsar-producer,Appendix>>.
[[pulsar-listener]]
@@ -108,7 +107,8 @@ When it comes to Pulsar consumers, we recommend that end-user applications use t
To use `PulsarListener`, you need to use the `@EnablePulsar` annotation.
When you use Spring Boot support, it automatically enables this annotation and configures all the components necessary for `PulsarListener`, such as the message listener infrastructure (which is responsible for creating the Pulsar consumer).
`PulsarMessageListenerContainer` uses a `PulsarConsumerFactory` to create and manage the Pulsar consumer.
This consumer factory is also auto-configured through Spring Boot. See the <<appendix,Appendix>> for Pulsar consumer properties.
This consumer factory is also auto-configured through Spring Boot. See the <<application-properties.adoc#appendix.application-properties.pulsar-consumer,Appendix>> for Pulsar consumer properties.
Let us revisit the `PulsarListener` code snippet we saw in the quick-tour section:
@@ -1219,7 +1219,7 @@ On the Pulsar administration side, Spring Boot auto-configuration provides a `Pu
The administration implements an interface called `PulsarAdminOperations` and provides {javadocs}/org/springframework/pulsar/core/PulsarAdminOperations.html[a `createOrModify` method] to handle topic administration through its contract.
When you use the Pulsar Spring Boot starter, you get the `PulsarAdministration` auto-configured.
By default, the application tries to connect to a local Pulsar instance at `http://localhost:8080`. However, there are many application properties available to help you configure the client. See the <<appendix,Appendix>> for more detail.
By default, the application tries to connect to a local Pulsar instance at `http://localhost:8080`. However, there are many application properties available to help you configure the client. See the <<application-properties.adoc#appendix.application-properties.pulsar-administration,Appendix>> for more detail.
===== Authentication
When accessing a Pulsar cluster that requires authentication, the admin client requires the same security configuration as the regular Pulsar client. You can use the aforementioned <<client-authentication,security configuration>> by replacing `spring.pulsar.client` with `spring.pulsar.administration`.

View File

@@ -121,7 +121,7 @@ public class PulsarBootHelloWorld {
----
Let us quickly go through the higher-level details of this application.
<<reference,Later in this documentation>>, we see these components in much more detail.
<<index.adoc#reference,Later in this documentation>>, we see these components in much more detail.
In the preceding sample, we heavily rely on Spring Boot auto-configuration.
Spring Boot auto-configures several components for our application.

View File

@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.pulsar.core.PulsarTestContainerSupport;
import org.springframework.pulsar.core.reactive.DefaultReactivePulsarConsumerFactory;
import org.springframework.pulsar.core.reactive.DefaultReactivePulsarSenderFactory;
import org.springframework.pulsar.core.reactive.ReactivePulsarSenderTemplate;
import org.springframework.pulsar.core.reactive.ReactivePulsarTemplate;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -79,7 +79,7 @@ class DefaultReactivePulsarMessageListenerContainerTests implements PulsarTestCo
prodConfig.setTopicName(topic);
DefaultReactivePulsarSenderFactory<String> pulsarProducerFactory = new DefaultReactivePulsarSenderFactory<>(
reactivePulsarClient, prodConfig, null);
ReactivePulsarSenderTemplate<String> pulsarTemplate = new ReactivePulsarSenderTemplate<>(pulsarProducerFactory);
ReactivePulsarTemplate<String> pulsarTemplate = new ReactivePulsarTemplate<>(pulsarProducerFactory);
pulsarTemplate.send("hello john doe").subscribe();
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
container.stop();
@@ -113,7 +113,7 @@ class DefaultReactivePulsarMessageListenerContainerTests implements PulsarTestCo
prodConfig.setTopicName(topic);
DefaultReactivePulsarSenderFactory<String> pulsarProducerFactory = new DefaultReactivePulsarSenderFactory<>(
reactivePulsarClient, prodConfig, null);
ReactivePulsarSenderTemplate<String> pulsarTemplate = new ReactivePulsarSenderTemplate<>(pulsarProducerFactory);
ReactivePulsarTemplate<String> pulsarTemplate = new ReactivePulsarTemplate<>(pulsarProducerFactory);
Flux.range(0, 5).map(i -> "hello john doe" + i).as(pulsarTemplate::send).subscribe();
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
container.stop();
@@ -152,7 +152,7 @@ class DefaultReactivePulsarMessageListenerContainerTests implements PulsarTestCo
prodConfig.setTopicName(topic);
DefaultReactivePulsarSenderFactory<String> pulsarProducerFactory = new DefaultReactivePulsarSenderFactory<>(
reactivePulsarClient, prodConfig, null);
ReactivePulsarSenderTemplate<String> pulsarTemplate = new ReactivePulsarSenderTemplate<>(pulsarProducerFactory);
ReactivePulsarTemplate<String> pulsarTemplate = new ReactivePulsarTemplate<>(pulsarProducerFactory);
pulsarTemplate.send("hello john doe").subscribe();
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
@@ -260,7 +260,7 @@ class DefaultReactivePulsarMessageListenerContainerTests implements PulsarTestCo
prodConfig.setTopicName(topic);
DefaultReactivePulsarSenderFactory<String> pulsarProducerFactory = new DefaultReactivePulsarSenderFactory<>(
reactivePulsarClient, prodConfig, null);
ReactivePulsarSenderTemplate<String> pulsarTemplate = new ReactivePulsarSenderTemplate<>(pulsarProducerFactory);
ReactivePulsarTemplate<String> pulsarTemplate = new ReactivePulsarTemplate<>(pulsarProducerFactory);
pulsarTemplate.send("hello john doe").subscribe();
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
@@ -309,7 +309,7 @@ class DefaultReactivePulsarMessageListenerContainerTests implements PulsarTestCo
prodConfig.setTopicName(topic);
DefaultReactivePulsarSenderFactory<String> pulsarProducerFactory = new DefaultReactivePulsarSenderFactory<>(
reactivePulsarClient, prodConfig, null);
ReactivePulsarSenderTemplate<String> pulsarTemplate = new ReactivePulsarSenderTemplate<>(pulsarProducerFactory);
ReactivePulsarTemplate<String> pulsarTemplate = new ReactivePulsarTemplate<>(pulsarProducerFactory);
Flux.range(0, 5).map(i -> "hello john doe" + i).as(pulsarTemplate::send).subscribe();
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();