Configuration Properties

The following application properties are supported by the Spring Boot auto-configuration.

Name Description Default

spring.pulsar.admin.authentication.param

Authentication parameter(s) as a map of parameter names to parameter values.

spring.pulsar.admin.authentication.plugin-class-name

Fully qualified class name of the authentication plugin.

spring.pulsar.admin.connection-timeout

Duration to wait for a connection to server to be established.

1m

spring.pulsar.admin.read-timeout

Server response read time out for any request.

1m

spring.pulsar.admin.request-timeout

Server request time out for any request.

5m

spring.pulsar.admin.service-url

Pulsar web URL for the admin endpoint in the format '(http|https)://host:port'.

http://localhost:8080

spring.pulsar.client.authentication.param

Authentication parameter(s) as a map of parameter names to parameter values.

spring.pulsar.client.authentication.plugin-class-name

Fully qualified class name of the authentication plugin.

spring.pulsar.client.connection-timeout

Duration to wait for a connection to a broker to be established.

10s

spring.pulsar.client.failover.backup-clusters

List of backup clusters. The backup cluster is chosen in the sequence of the given list. If all backup clusters are available, the Pulsar client chooses the first backup cluster.

spring.pulsar.client.failover.check-interval

Frequency of performing a probe task.

spring.pulsar.client.failover.delay

Delay before the Pulsar client switches from the primary cluster to the backup cluster.

spring.pulsar.client.failover.policy

Cluster failover policy.

order

spring.pulsar.client.failover.switch-back-delay

Delay before the Pulsar client switches from the backup cluster to the primary cluster.

spring.pulsar.client.lookup-timeout

Client lookup timeout.

spring.pulsar.client.operation-timeout

Client operation timeout.

30s

spring.pulsar.client.service-url

Pulsar service URL in the format '(pulsar|pulsar+ssl)://host:port'.

pulsar://localhost:6650

spring.pulsar.client.threads.io

Number of threads to be used for handling connections to brokers.

spring.pulsar.client.threads.listener

Number of threads to be used for message listeners.

spring.pulsar.consumer.dead-letter-policy.dead-letter-topic

Name of the dead topic where the failing messages will be sent.

spring.pulsar.consumer.dead-letter-policy.initial-subscription-name

Name of the initial subscription of the dead letter topic. When not set, the initial subscription will not be created. However, when the property is set then the broker’s 'allowAutoSubscriptionCreation' must be enabled or the DLQ producer will fail.

spring.pulsar.consumer.dead-letter-policy.max-redeliver-count

Maximum number of times that a message will be redelivered before being sent to the dead letter queue.

0

spring.pulsar.consumer.dead-letter-policy.retry-letter-topic

Name of the retry topic where the failing messages will be sent.

spring.pulsar.consumer.name

Consumer name to identify a particular consumer from the topic stats.

spring.pulsar.consumer.priority-level

Priority level for shared subscription consumers.

0

spring.pulsar.consumer.read-compacted

Whether to read messages from the compacted topic rather than the full message backlog.

false

spring.pulsar.consumer.retry-enable

Whether to auto retry messages.

false

spring.pulsar.consumer.subscription.initial-position

Position where to initialize a newly created subscription.

latest

spring.pulsar.consumer.subscription.mode

Subscription mode to be used when subscribing to the topic.

durable

spring.pulsar.consumer.subscription.name

Subscription name for the consumer.

spring.pulsar.consumer.subscription.topics-mode

Determines which type of topics (persistent, non-persistent, or all) the consumer should be subscribed to when using pattern subscriptions.

persistentonly

spring.pulsar.consumer.subscription.type

Subscription type to be used when subscribing to a topic.

exclusive

spring.pulsar.consumer.topics

Topics the consumer subscribes to.

spring.pulsar.consumer.topics-pattern

Pattern for topics the consumer subscribes to.

spring.pulsar.defaults.topic.enabled

Whether to enable default tenant and namespace support for topics.

true

spring.pulsar.defaults.topic.namespace

Default namespace to use when producing or consuming messages against a non-fully-qualified topic URL.

default

spring.pulsar.defaults.topic.tenant

Default tenant to use when producing or consuming messages against a non-fully-qualified topic URL.

public

spring.pulsar.defaults.type-mappings

List of mappings from message type to topic name and schema info to use as a defaults when a topic name and/or schema is not explicitly specified when producing or consuming messages of the mapped type.

spring.pulsar.function.enabled

Whether to enable function support.

true

spring.pulsar.function.fail-fast

Whether to stop processing further function creates/updates when a failure occurs.

true

spring.pulsar.function.propagate-failures

Whether to throw an exception if any failure is encountered during server startup while creating/updating functions.

true

spring.pulsar.function.propagate-stop-failures

Whether to throw an exception if any failure is encountered during server shutdown while enforcing stop policy on functions.

false

spring.pulsar.listener.concurrency

Number of threads used by listener container.

spring.pulsar.listener.observation-enabled

Whether to record observations for when the Observations API is available and the client supports it.

false

spring.pulsar.listener.schema-type

SchemaType of the consumed messages.

spring.pulsar.producer.access-mode

Type of access to the topic the producer requires.

shared

spring.pulsar.producer.batching-enabled

Whether to automatically batch messages.

true

spring.pulsar.producer.cache.enabled

Whether to enable caching in the PulsarProducerFactory.

true

spring.pulsar.producer.cache.expire-after-access

Time period to expire unused entries in the cache.

1m

spring.pulsar.producer.cache.initial-capacity

Initial size of cache.

50

spring.pulsar.producer.cache.maximum-size

Maximum size of cache (entries).

1000

spring.pulsar.producer.chunking-enabled

Whether to split large-size messages into multiple chunks.

false

spring.pulsar.producer.compression-type

Message compression type.

spring.pulsar.producer.hashing-scheme

Message hashing scheme to choose the partition to which the message is published.

javastringhash

spring.pulsar.producer.message-routing-mode

Message routing mode for a partitioned producer.

roundrobinpartition

spring.pulsar.producer.name

Name for the producer. If not assigned, a unique name is generated.

spring.pulsar.producer.send-timeout

Time before a message has to be acknowledged by the broker.

30s

spring.pulsar.producer.topic-name

Topic the producer will publish to.

spring.pulsar.reader.name

Reader name.

spring.pulsar.reader.read-compacted

Whether to read messages from a compacted topic rather than a full message backlog of a topic.

false

spring.pulsar.reader.subscription-name

Subscription name.

spring.pulsar.reader.subscription-role-prefix

Prefix of subscription role.

spring.pulsar.reader.topics

Topics the reader subscribes to.

spring.pulsar.template.observations-enabled

Whether to record observations for when the Observations API is available.

false

spring.pulsar.transaction.enabled

Whether transaction support is enabled.

false