Class DefaultReactivePulsarSenderFactory.Builder<T>
java.lang.Object
org.springframework.pulsar.reactive.core.DefaultReactivePulsarSenderFactory.Builder<T>
- Type Parameters:
T
- the reactive sender type
- Enclosing class:
- DefaultReactivePulsarSenderFactory<T>
Builder for
DefaultReactivePulsarSenderFactory
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Construct the sender factory using the specified settings.Provide a customizer to apply to the sender builder.withDefaultConfigCustomizers
(List<ReactiveMessageSenderBuilderCustomizer<T>> customizers) Provide an optional list of sender builder customizers to apply to the builder before creating the senders.withDefaultTopic
(String defaultTopic) Provide the default topic to use when one is not specified.withMessageSenderCache
(org.apache.pulsar.reactive.client.api.ReactiveMessageSenderCache messageSenderCache) Provide the message sender cache to use.withTopicResolver
(TopicResolver topicResolver) Provide the topic resolver to use.
-
Method Details
-
withTopicResolver
Provide the topic resolver to use.- Parameters:
topicResolver
- the topic resolver to use- Returns:
- this same builder instance
-
withMessageSenderCache
public DefaultReactivePulsarSenderFactory.Builder<T> withMessageSenderCache(org.apache.pulsar.reactive.client.api.ReactiveMessageSenderCache messageSenderCache) Provide the message sender cache to use.- Parameters:
messageSenderCache
- the message sender cache to use- Returns:
- this same builder instance
-
withDefaultTopic
Provide the default topic to use when one is not specified.- Parameters:
defaultTopic
- the default topic to use- Returns:
- this same builder instance
-
withDefaultConfigCustomizer
public DefaultReactivePulsarSenderFactory.Builder<T> withDefaultConfigCustomizer(ReactiveMessageSenderBuilderCustomizer<T> customizer) Provide a customizer to apply to the sender builder.- Parameters:
customizer
- the customizer to apply to the builder before creating senders- Returns:
- this same builder instance
-
withDefaultConfigCustomizers
public DefaultReactivePulsarSenderFactory.Builder<T> withDefaultConfigCustomizers(List<ReactiveMessageSenderBuilderCustomizer<T>> customizers) Provide an optional list of sender builder customizers to apply to the builder before creating the senders.- Parameters:
customizers
- optional list of sender builder customizers to apply to the builder before creating the senders.- Returns:
- this same builder instance
-
build
Construct the sender factory using the specified settings.- Returns:
- pulsar sender factory
-