| Package | Description |
|---|---|
| org.apache.pulsar.client.api |
Pulsar Client API.
|
| Modifier and Type | Method and Description |
|---|---|
ReaderBuilder<T> |
ReaderBuilder.clone()
Create a copy of the current
ReaderBuilder. |
ReaderBuilder<T> |
ReaderBuilder.cryptoFailureAction(ConsumerCryptoFailureAction action)
Sets the
ConsumerCryptoFailureAction to specify. |
ReaderBuilder<T> |
ReaderBuilder.cryptoKeyReader(CryptoKeyReader cryptoKeyReader)
Sets a
CryptoKeyReader to decrypt the message payloads. |
ReaderBuilder<T> |
ReaderBuilder.defaultCryptoKeyReader(Map<String,String> privateKeys)
Sets the default implementation of
CryptoKeyReader. |
ReaderBuilder<T> |
ReaderBuilder.defaultCryptoKeyReader(String privateKey)
Sets the default implementation of
CryptoKeyReader. |
ReaderBuilder<T> |
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.
|
ReaderBuilder<T> |
ReaderBuilder.loadConf(Map<String,Object> config)
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> |
PulsarClient.newReader(Schema<T> schema)
Create a topic reader builder with a specific
Schema) to read from the specified topic. |
ReaderBuilder<T> |
ReaderBuilder.poolMessages(boolean poolMessages)
Enable pooling of messages and the underlying data buffers.
|
ReaderBuilder<T> |
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<T> |
ReaderBuilder.readerListener(ReaderListener<T> readerListener)
Sets a
ReaderListener for the reader. |
ReaderBuilder<T> |
ReaderBuilder.readerName(String readerName)
Specify a reader name.
|
ReaderBuilder<T> |
ReaderBuilder.receiverQueueSize(int receiverQueueSize)
Sets the size of the consumer receive queue.
|
ReaderBuilder<T> |
ReaderBuilder.startMessageFromRollbackDuration(long rollbackDuration,
TimeUnit timeunit)
The initial reader positioning can be set at specific timestamp by providing total rollback duration.
|
ReaderBuilder<T> |
ReaderBuilder.startMessageId(MessageId startMessageId)
The initial reader positioning is done by specifying a message id.
|
ReaderBuilder<T> |
ReaderBuilder.startMessageIdInclusive()
Set the reader to include the given position of
startMessageId(MessageId) |
ReaderBuilder<T> |
ReaderBuilder.subscriptionName(String subscriptionName)
Set the subscription name.
|
ReaderBuilder<T> |
ReaderBuilder.subscriptionRolePrefix(String subscriptionRolePrefix)
Set the subscription role prefix.
|
ReaderBuilder<T> |
ReaderBuilder.topic(String topicName)
Specify the topic this reader will read from.
|
ReaderBuilder<T> |
ReaderBuilder.topics(List<String> topicNames)
Specify topics this reader will read from.
|
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.