Initial infra for Pulsar binder/binding properties docs
This commit is contained in:
@@ -86,6 +86,8 @@ public class DocumentConfigurationProperties extends DefaultTask {
|
||||
c.accept("spring.pulsar.reactive.listener");
|
||||
});
|
||||
snippets.add("application-properties.pulsar-reactive-reader", "Pulsar Reactive Reader Properties", (c) -> c.accept("spring.pulsar.reactive.reader"));
|
||||
snippets.add("application-properties.pulsar-binder", "Pulsar Binder Properties", (c) -> c.accept("spring.cloud.stream.pulsar.binder"));
|
||||
snippets.add("application-properties.pulsar-bindings", "Pulsar Binding Properties", (c) -> c.accept("spring.cloud.stream.pulsar.bindings"));
|
||||
snippets.writeTo(this.outputDir.toPath());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ dependencies {
|
||||
api project (':spring-pulsar')
|
||||
api 'org.springframework.boot:spring-boot-starter'
|
||||
configurationProperties(project(path: ":spring-pulsar-spring-boot-autoconfigure", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-pulsar-spring-cloud-stream-binder", configuration: "configurationPropertiesMetadata"))
|
||||
observationDocs "io.micrometer:micrometer-docs-generator:$micrometerDocsVersion"
|
||||
}
|
||||
|
||||
|
||||
@@ -31,3 +31,7 @@ include::application-properties/pulsar-reactive-sender.adoc[]
|
||||
include::application-properties/pulsar-reactive-consumer.adoc[]
|
||||
|
||||
include::application-properties/pulsar-reactive-reader.adoc[]
|
||||
|
||||
include::application-properties/pulsar-binder.adoc[]
|
||||
|
||||
include::application-properties/pulsar-bindings.adoc[]
|
||||
|
||||
@@ -220,7 +220,7 @@ However, this is a basic non-partitioned topic, and if you want advanced feature
|
||||
Pulsar topic provisioner uses `PulsarAdministration` from the framework, which uses the `PulsarAdminBuilder.`
|
||||
For this reason, you need to set the `spring.pulsar.administration.service-url` property unless you are running Pulsar on the default server and port.
|
||||
|
||||
=== Specify partition count when creating the topic
|
||||
=== Specifying partition count when creating the topic
|
||||
|
||||
When creating the topic, you can set the partition count in two ways.
|
||||
First, you can set it at the binder level using the property `spring.cloud.stream.pulsar.binder.partition-count`.
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
plugins {
|
||||
id 'org.springframework.pulsar.spring-module'
|
||||
id 'org.springframework.pulsar.configuration-properties'
|
||||
}
|
||||
|
||||
description = 'Spring Cloud Stream Binder for Apache Pulsar'
|
||||
|
||||
dependencies {
|
||||
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
|
||||
|
||||
implementation project(':spring-pulsar-spring-boot-starter')
|
||||
api('org.springframework.cloud:spring-cloud-stream') {
|
||||
exclude group: 'javax.activation', module: 'javax.activation-api'
|
||||
|
||||
@@ -37,6 +37,9 @@ public class PulsarBinderConfigurationProperties {
|
||||
@NestedConfigurationProperty
|
||||
private final ProducerConfigProperties producer = new ProducerConfigProperties();
|
||||
|
||||
/**
|
||||
* Number of topic partitions.
|
||||
*/
|
||||
@Nullable
|
||||
private Integer partitionCount;
|
||||
|
||||
|
||||
@@ -29,18 +29,33 @@ import org.springframework.pulsar.autoconfigure.ConsumerConfigProperties;
|
||||
*/
|
||||
public class PulsarConsumerProperties extends ConsumerConfigProperties {
|
||||
|
||||
/**
|
||||
* Pulsar {@link SchemaType} for this binding.
|
||||
*/
|
||||
@Nullable
|
||||
private SchemaType schemaType;
|
||||
|
||||
/**
|
||||
* Pulsar message type for this binding.
|
||||
*/
|
||||
@Nullable
|
||||
private Class<?> messageType;
|
||||
|
||||
/**
|
||||
* Type for the Pulsar message key.
|
||||
*/
|
||||
@Nullable
|
||||
private Class<?> messageKeyType;
|
||||
|
||||
/**
|
||||
* Type for the Pulsar message value.
|
||||
*/
|
||||
@Nullable
|
||||
private Class<?> messageValueType;
|
||||
|
||||
/**
|
||||
* Number of topic partitions.
|
||||
*/
|
||||
@Nullable
|
||||
private Integer partitionCount;
|
||||
|
||||
|
||||
@@ -29,18 +29,33 @@ import org.springframework.pulsar.autoconfigure.ProducerConfigProperties;
|
||||
*/
|
||||
public class PulsarProducerProperties extends ProducerConfigProperties {
|
||||
|
||||
/**
|
||||
* Pulsar {@link SchemaType} for this binding.
|
||||
*/
|
||||
@Nullable
|
||||
private SchemaType schemaType;
|
||||
|
||||
/**
|
||||
* Pulsar message type for this binding.
|
||||
*/
|
||||
@Nullable
|
||||
private Class<?> messageType;
|
||||
|
||||
/**
|
||||
* Type for the Pulsar message key.
|
||||
*/
|
||||
@Nullable
|
||||
private Class<?> messageKeyType;
|
||||
|
||||
/**
|
||||
* Type for the Pulsar message value.
|
||||
*/
|
||||
@Nullable
|
||||
private Class<?> messageValueType;
|
||||
|
||||
/**
|
||||
* Number of topic partitions.
|
||||
*/
|
||||
@Nullable
|
||||
private Integer partitionCount;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user