Uses of Interface
org.apache.pulsar.client.api.ReaderBuilder
-
Uses of ReaderBuilder in org.apache.pulsar.client.api
Modifier and TypeMethodDescriptionReaderBuilder.autoAckOldestChunkedMessageOnQueueFull
(boolean autoAckOldestChunkedMessageOnQueueFull) Buffering large number of outstanding uncompleted chunked messages can create memory pressure and it can be guarded by providing this @maxPendingChunkedMessage threshold.ReaderBuilder.autoUpdatePartitions
(boolean autoUpdate) If enabled, the reader will auto subscribe for partitions increasement.ReaderBuilder.autoUpdatePartitionsInterval
(int interval, TimeUnit unit) Set the interval of updating partitions (default: 1 minute).ReaderBuilder.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.expireTimeOfIncompleteChunkedMessage
(long duration, TimeUnit unit) If producer fails to publish all the chunks of a message then consumer can expire incomplete chunks if consumer won't be able to receive all chunks in expire times (default 1 minute).ReaderBuilder.intercept
(ReaderInterceptor<T>... interceptors) InterceptReader
.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.maxPendingChunkedMessage
(int maxPendingChunkedMessage) Consumer buffers chunk messages into memory until it receives all the chunks of the original message.ReaderBuilder.messageCrypto
(MessageCrypto messageCrypto) Sets aMessageCrypto
.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.