Various properties can be specified inside your application.properties file, inside your application.yml file, or as command line switches. This appendix provides a list of Spring Pulsar properties and references to the underlying classes that consume them.

Spring Boot provides various conversion mechanism with advanced value formatting, make sure to review the properties conversion section.
Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list. Also, you can define your own properties.

Pulsar Client Properties

Name Description Default Value

spring.pulsar.client.auth-params

Authentication parameter(s) as a JSON encoded string.

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

Fully qualified class name of the authentication plugin.

spring.pulsar.client.authentication.*

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

spring.pulsar.client.connection-timeout-ms

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

10000

spring.pulsar.client.dns-lookup-bind-address

DNS lookup bind address.

spring.pulsar.client.dns-lookup-bind-port

DNS lookup bind port.

0

spring.pulsar.client.enable-busy-wait

Enables spin-waiting on executors and IO threads in order to reduce latency during context switches.

false

spring.pulsar.client.enable-transaction

Enables transactions. To use this, start the transactionCoordinatorClient with the pulsar client.

false

spring.pulsar.client.initial-backoff-interval-nanos

Initial backoff interval in nanoseconds.

100

spring.pulsar.client.keep-alive-interval-seconds

Keep alive interval for broker-client connection in seconds.

30

spring.pulsar.client.listener-name

Listener name for lookup. Clients can use listenerName to choose one of the listeners as the service URL to create a connection to the broker. To use this, "advertisedListeners" must be enabled on the broker.

spring.pulsar.client.lookup-timeout-ms

Client lookup timeout in milliseconds.

-1

spring.pulsar.client.max-backoff-interval-nanos

Maximum backoff interval in nanoseconds.

30

spring.pulsar.client.max-concurrent-lookup-request

Number of concurrent lookup-requests allowed to send on each broker-connection to prevent overload on broker.

5000

spring.pulsar.client.max-lookup-redirects

Maximum number of times a lookup-request to a broker will be redirected.

20

spring.pulsar.client.max-lookup-request

Number of max lookup-requests allowed on each broker-connection to prevent overload on broker.

50000

spring.pulsar.client.max-number-of-rejected-request-per-connection

Maximum number of broker-rejected requests in a certain timeframe, after which the current connection is closed and a new connection is created by the client.

50

spring.pulsar.client.memory-limit-bytes

Limit of direct memory that will be allocated by the client.

0

spring.pulsar.client.num-connections-per-broker

Maximum number of connections that the client will open to a single broker.

1

spring.pulsar.client.num-io-threads

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

1

spring.pulsar.client.num-listener-threads

Number of threads to be used for message listeners. The listener thread pool is shared across all the consumers and readers that are using a "listener" model to get messages. For a given consumer, the listener will always be invoked from the same thread, to ensure ordering.

1

spring.pulsar.client.operation-timeout-ms

Client operation timeout in milliseconds.

30000

spring.pulsar.client.service-url

Pulsar cluster URL to connect to a broker.

spring.pulsar.client.socks5-proxy-address

SOCKS5 proxy address.

spring.pulsar.client.socks5-proxy-password

SOCKS5 proxy password.

spring.pulsar.client.socks5-proxy-username

SOCKS5 proxy username.

spring.pulsar.client.ssl-provider

Name of the security provider used for SSL connections.

spring.pulsar.client.stats-interval-seconds

Interval between each stat info in seconds.

60

spring.pulsar.client.tls-allow-insecure-connection

Whether the client accepts untrusted TLS certificates from the broker.

false

spring.pulsar.client.tls-ciphers

Comma-separated list of cipher suites. This is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol. By default, all the available cipher suites are supported.

spring.pulsar.client.tls-hostname-verification-enable

Whether the hostname is validated when the proxy creates a TLS connection with brokers.

false

spring.pulsar.client.tls-protocols

Comma-separated list of SSL protocols used to generate the SSLContext. Allowed values in recent JVMs are TLS, TLSv1.3, TLSv1.2 and TLSv1.1.

spring.pulsar.client.tls-trust-certs-file-path

Path to the trusted TLS certificate file.

spring.pulsar.client.tls-trust-store-password

Store password for the key store file.

spring.pulsar.client.tls-trust-store-path

Location of the trust store file.

spring.pulsar.client.tls-trust-store-type

File format of the trust store file.

spring.pulsar.client.use-key-store-tls

Enable KeyStore instead of PEM type configuration if TLS is enabled.

false

spring.pulsar.client.use-tcp-no-delay

Whether to use TCP no-delay flag on the connection, to disable Nagle algorithm.

true

spring.pulsar.client.use-tls

Whether to use TLS encryption on the connection.

false

Pulsar Producer Properties

Name Description Default Value

spring.pulsar.producer.batching-enabled

Whether to automatically batch messages.

true

spring.pulsar.producer.batching-max-messages

Maximum number of messages to be batched.

1000

spring.pulsar.producer.batching-max-publish-delay-micros

Time period within which the messages sent will be batched in milliseconds.

1

spring.pulsar.producer.block-if-queue-full

Whether the "send" and "sendAsync" methods should block if the outgoing message queue is full.

false

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.crypto-failure-action

Action the producer will take in case of encryption failure.

spring.pulsar.producer.hashing-scheme

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

spring.pulsar.producer.initial-subscription-name

Name of the initial subscription of the topic.

spring.pulsar.producer.max-pending-messages

Maximum number of pending messages for the producer.

1000

spring.pulsar.producer.max-pending-messages-across-partitions

Maximum number of pending messages across all the partitions.

50000

spring.pulsar.producer.message-routing-mode

Message routing mode for a partitioned producer.

spring.pulsar.producer.producer-access-mode

Type of access to the topic the producer requires.

spring.pulsar.producer.producer-name

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

spring.pulsar.producer.send-timeout-ms

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

30000

spring.pulsar.producer.topic-name

Topic the producer will publish to.

Pulsar Consumer Properties

Name Description Default Value

spring.pulsar.consumer.ack-timeout-millis

Timeout for unacked messages to be redelivered.

0

spring.pulsar.consumer.acknowledgements-group-time-micros

Time to group acknowledgements before sending them to the broker in microseconds.

100

spring.pulsar.consumer.auto-ack-oldest-chunked-message-on-queue-full

Whether to automatically drop outstanding un-acked messages if the queue is full.

true

spring.pulsar.consumer.auto-update-partitions

Whether the consumer auto-subscribes for partition increase. This is only for partitioned consumers.

true

spring.pulsar.consumer.consumer-name

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

spring.pulsar.consumer.crypto-failure-action

Action the consumer will take in case of decryption failure.

spring.pulsar.consumer.expire-time-of-incomplete-chunked-message-millis

Time to expire incomplete chunks if the consumer won't be able to receive all chunks before in milliseconds.

60000

spring.pulsar.consumer.max-pending-chunked-message

Maximum number of chunked messages to be kept in memory.

10

spring.pulsar.consumer.max-total-receiver-queue-size-across-partitions

Maximum number of messages that a consumer can be pushed at once from a broker across all partitions.

50000

spring.pulsar.consumer.negative-ack-redelivery-delay-micros

Delay before re-delivering messages that have failed to be processed in microseconds.

1

spring.pulsar.consumer.pattern-auto-discovery-period

Auto-discovery period for topics when topic pattern is used in minutes.

1

spring.pulsar.consumer.priority-level

Priority level for shared subscription consumers.

0

spring.pulsar.consumer.properties

Map of properties to add to the consumer.

spring.pulsar.consumer.read-compacted

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

false

spring.pulsar.consumer.receiver-queue-size

Number of messages that can be accumulated before the consumer calls "receive".

1000

spring.pulsar.consumer.regex-subscription-mode

Determines which topics the consumer should be subscribed to when using pattern subscriptions.

spring.pulsar.consumer.replicate-subscription-state

Whether to replicate subscription state.

false

spring.pulsar.consumer.subscription-initial-position

Position where to initialize a newly created subscription.

spring.pulsar.consumer.subscription-name

Subscription name for the consumer.

spring.pulsar.consumer.subscription-type

Subscription type to be used when subscribing to a topic.

spring.pulsar.consumer.tick-duration-millis

Precision for the ack timeout messages tracker in milliseconds.

1000

spring.pulsar.consumer.topics

Comma-separated list of topics the consumer subscribes to.

spring.pulsar.consumer.topics-pattern

Pattern for topics the consumer subscribes to.

spring.pulsar.listener.ack-mode

AckMode for acknowledgements. Allowed values are RECORD, BATCH, MANUAL.

spring.pulsar.listener.batch-timeout-millis

Number of milliseconds to wait for enough message to fill a batch request before timing out.

100

spring.pulsar.listener.max-num-bytes

Max number of bytes in a single batch request.

0

spring.pulsar.listener.max-num-messages

Max number of messages in a single batch request.

-1

spring.pulsar.listener.schema-type

SchemaType of the consumed messages.

Pulsar Administration Properties

Name Description Default Value

spring.pulsar.administration.auth-params

Authentication parameter(s) as a JSON encoded string.

spring.pulsar.administration.auth-plugin-class-name

Fully qualified class name of the authentication plugin.

spring.pulsar.administration.authentication.*

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

spring.pulsar.administration.service-url

Pulsar service URL for the admin endpoint.

spring.pulsar.administration.ssl-provider

Name of the security provider used for SSL connections.

spring.pulsar.administration.tls-allow-insecure-connection

Whether the client accepts untrusted TLS certificates from the broker.

false

spring.pulsar.administration.tls-ciphers

Comma-separated list of cipher suites. This is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol. By default, all the available cipher suites are supported.

spring.pulsar.administration.tls-hostname-verification-enable

Whether the hostname is validated when the proxy creates a TLS connection with brokers.

false

spring.pulsar.administration.tls-protocols

Comma-separated list of SSL protocols used to generate the SSLContext. Allowed values in recent JVMs are TLS, TLSv1.3, TLSv1.2 and TLSv1.1.

spring.pulsar.administration.tls-trust-certs-file-path

Path to the trusted TLS certificate file.

spring.pulsar.administration.tls-trust-store-password

Store password for the key store file.

spring.pulsar.administration.tls-trust-store-path

Location of the trust store file.

spring.pulsar.administration.tls-trust-store-type

File format of the trust store file.

spring.pulsar.administration.use-key-store-tls

Enable KeyStore instead of PEM type configuration if TLS is enabled.

false