Package org.springframework.pulsar.core
Interface PulsarReaderFactory<T>
- Type Parameters:
T
- Underlying message type handled by this reader.
- All Known Implementing Classes:
DefaultPulsarReaderFactory
public interface PulsarReaderFactory<T>
Pulsar
Reader
factory interface.- Author:
- Soby Chacko, Chris Bono
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pulsar.client.api.Reader<T>
createReader
(List<String> topics, org.apache.pulsar.client.api.MessageId messageId, org.apache.pulsar.client.api.Schema<T> schema, List<ReaderBuilderCustomizer<T>> customizers) Creating a PulsarReader
based on the provided topics, schema and properties.
-
Method Details
-
createReader
org.apache.pulsar.client.api.Reader<T> createReader(@Nullable List<String> topics, @Nullable org.apache.pulsar.client.api.MessageId messageId, org.apache.pulsar.client.api.Schema<T> schema, @Nullable List<ReaderBuilderCustomizer<T>> customizers) Creating a PulsarReader
based on the provided topics, schema and properties.- Parameters:
topics
- set of topics to read frommessageId
- starting message id to read fromschema
- schema of the message to consumecustomizers
- the optional list of customizers to apply to the reader builder. Note that the customizers are applied last and have the potential for overriding any specified parameters or default properties.- Returns:
- the created reader
- Throws:
PulsarException
- if anyPulsarClientException
occurs communicating with Pulsar
-