Uses of Interface
org.apache.pulsar.client.api.ReaderBuilder
-
Uses of ReaderBuilder in org.apache.pulsar.client.api
Modifier and TypeMethodDescriptionReaderBuilder.clone()
Create a copy of the currentReaderBuilder
.ReaderBuilder.cryptoFailureAction
(ConsumerCryptoFailureAction action) Sets theConsumerCryptoFailureAction
to specify.ReaderBuilder.cryptoKeyReader
(CryptoKeyReader cryptoKeyReader) Sets aCryptoKeyReader
to decrypt the message payloads.ReaderBuilder.defaultCryptoKeyReader
(String privateKey) Sets the default implementation ofCryptoKeyReader
.ReaderBuilder.defaultCryptoKeyReader
(Map<String, String> privateKeys) Sets the default implementation ofCryptoKeyReader
.ReaderBuilder.keyHashRange
(Range... ranges) Set key hash range of the reader, broker will only dispatch messages which hash of the message key contains by the specified key hash range.Load the configuration from provided config map.ReaderBuilder<byte[]>
PulsarClient.newReader()
Create a topic reader builder with no schema (Schema.BYTES
) to read from the specified topic.<T> ReaderBuilder<T>
Create a topic reader builder with a specificSchema
) to read from the specified topic.ReaderBuilder.poolMessages
(boolean poolMessages) Enable pooling of messages and the underlying data buffers.ReaderBuilder.readCompacted
(boolean readCompacted) If enabled, the reader will read messages from the compacted topic rather than reading the full message backlog of the topic.ReaderBuilder.readerListener
(ReaderListener<T> readerListener) Sets aReaderListener
for the reader.ReaderBuilder.readerName
(String readerName) Specify a reader name.ReaderBuilder.receiverQueueSize
(int receiverQueueSize) Sets the size of the consumer receive queue.ReaderBuilder.startMessageFromRollbackDuration
(long rollbackDuration, TimeUnit timeunit) The initial reader positioning can be set at specific timestamp by providing total rollback duration.ReaderBuilder.startMessageId
(MessageId startMessageId) The initial reader positioning is done by specifying a message id.ReaderBuilder.startMessageIdInclusive()
Set the reader to include the given position ofstartMessageId(MessageId)
ReaderBuilder.subscriptionName
(String subscriptionName) Set the subscription name.ReaderBuilder.subscriptionRolePrefix
(String subscriptionRolePrefix) Set the subscription role prefix.Specify the topic this reader will read from.Specify topics this reader will read from.