Interface ReactivePulsarSenderFactory<T>
- Type Parameters:
T
- reactive message sender payload type
- All Known Implementing Classes:
DefaultReactivePulsarSenderFactory
public interface ReactivePulsarSenderFactory<T>
The strategy to create a
ReactiveMessageSender
instance(s).- Author:
- Christophe Bornet, Chris Bono
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pulsar.reactive.client.api.ReactiveMessageSender<T>
createSender
(org.apache.pulsar.client.api.Schema<T> schema, String topic) Create a reactive message sender.org.apache.pulsar.reactive.client.api.ReactiveMessageSender<T>
createSender
(org.apache.pulsar.client.api.Schema<T> schema, String topic, List<ReactiveMessageSenderBuilderCustomizer<T>> customizers) Create a reactive message sender.org.apache.pulsar.reactive.client.api.ReactiveMessageSender<T>
createSender
(org.apache.pulsar.client.api.Schema<T> schema, String topic, ReactiveMessageSenderBuilderCustomizer<T> customizer) Create a reactive message sender.Get the default topic to use for all created senders.
-
Method Details
-
createSender
org.apache.pulsar.reactive.client.api.ReactiveMessageSender<T> createSender(org.apache.pulsar.client.api.Schema<T> schema, @Nullable String topic) Create a reactive message sender.- Parameters:
topic
- the topic to send messages to ornull
to use the default topicschema
- the schema of the messages to be sent- Returns:
- the reactive message sender
-
createSender
org.apache.pulsar.reactive.client.api.ReactiveMessageSender<T> createSender(org.apache.pulsar.client.api.Schema<T> schema, @Nullable String topic, @Nullable ReactiveMessageSenderBuilderCustomizer<T> customizer) Create a reactive message sender.- Parameters:
schema
- the schema of the messages to be senttopic
- the topic to send messages to ornull
to use the default topiccustomizer
- the optional customizer to apply to the reactive message sender builder- Returns:
- the reactive message sender
-
createSender
org.apache.pulsar.reactive.client.api.ReactiveMessageSender<T> createSender(org.apache.pulsar.client.api.Schema<T> schema, @Nullable String topic, @Nullable List<ReactiveMessageSenderBuilderCustomizer<T>> customizers) Create a reactive message sender.- Parameters:
schema
- the schema of the messages to be senttopic
- the topic to send messages to ornull
to use the default topiccustomizers
- the optional list of customizers to apply to the reactive message sender builder- Returns:
- the reactive message sender
-
getDefaultTopic
Get the default topic to use for all created senders.- Returns:
- the default topic to use for all created senders or null if no default set.
-