Package org.springframework.pulsar.core
Class DefaultPulsarReaderFactory<T>
java.lang.Object
org.springframework.pulsar.core.DefaultPulsarReaderFactory<T>
- Type Parameters:
T- message type
- All Implemented Interfaces:
PulsarReaderFactory<T>
Default implementation of
PulsarReaderFactory.- Author:
- Soby Chacko
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPulsarReaderFactory(org.apache.pulsar.client.api.PulsarClient pulsarClient) DefaultPulsarReaderFactory(org.apache.pulsar.client.api.PulsarClient pulsarClient, Map<String, Object> readerConfig) -
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 PulsarReaderbased on the provided topics, schema and properties.
-
Constructor Details
-
DefaultPulsarReaderFactory
public DefaultPulsarReaderFactory(org.apache.pulsar.client.api.PulsarClient pulsarClient) -
DefaultPulsarReaderFactory
-
-
Method Details
-
createReader
public 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) throws org.apache.pulsar.client.api.PulsarClientException Description copied from interface:PulsarReaderFactoryCreating a PulsarReaderbased on the provided topics, schema and properties.- Specified by:
createReaderin interfacePulsarReaderFactory<T>- 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:
- Pulsar
Reader - Throws:
org.apache.pulsar.client.api.PulsarClientException- if there are issues when creating the reader
-