Class MutableReactiveMessageReaderSpec
java.lang.Object
org.apache.pulsar.reactive.client.api.MutableReactiveMessageReaderSpec
- All Implemented Interfaces:
ReactiveMessageReaderSpec
Mutable spec for a
ReactiveMessageReader
.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default MutableReactiveMessageReaderSpec.Constructs a MutableReactiveMessageReaderSpec from anotherReactiveMessageReaderSpec
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applySpec
(ReactiveMessageReaderSpec readerSpec) Updates this spec from the defined values of another spec.org.apache.pulsar.client.api.ConsumerCryptoFailureAction
Gets the action the reader will take in case of decryption failures.org.apache.pulsar.client.api.CryptoKeyReader
Gets the key reader to be used to decrypt the message payloads.Gets the generated subscription name prefix.List<org.apache.pulsar.client.api.Range>
Gets the key hash ranges of the reader.Gets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.Gets the reader name.Gets the size of the reader receive queue.Gets the subscription name.Gets the topics to read from.void
setCryptoFailureAction
(org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction) Sets the action the reader will take in case of decryption failures.void
setCryptoKeyReader
(org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader) Sets the key reader to be used to decrypt the message payloads.void
setGeneratedSubscriptionNamePrefix
(String generatedSubscriptionNamePrefix) Sets the generated subscription name prefix.void
setKeyHashRanges
(List<org.apache.pulsar.client.api.Range> keyHashRanges) Sets the key hash ranges of the reader.void
setReadCompacted
(Boolean readCompacted) Sets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.void
setReaderName
(String readerName) Sets the reader name.void
setReceiverQueueSize
(Integer receiverQueueSize) Sets the size of the reader receive queue.void
setSubscriptionName
(String subscriptionName) Sets the subscription name.void
setTopicNames
(List<String> topicNames) Sets the topics to read from.
-
Constructor Details
-
MutableReactiveMessageReaderSpec
public MutableReactiveMessageReaderSpec()Constructs a default MutableReactiveMessageReaderSpec. -
MutableReactiveMessageReaderSpec
Constructs a MutableReactiveMessageReaderSpec from anotherReactiveMessageReaderSpec
.- Parameters:
readerSpec
- the spec to construct from
-
-
Method Details
-
getTopicNames
Description copied from interface:ReactiveMessageReaderSpec
Gets the topics to read from.- Specified by:
getTopicNames
in interfaceReactiveMessageReaderSpec
- Returns:
- the topic names
- See Also:
-
ReaderBuilder.topics(List)
-
setTopicNames
Sets the topics to read from.- Parameters:
topicNames
- the topic names
-
getReaderName
Description copied from interface:ReactiveMessageReaderSpec
Gets the reader name.- Specified by:
getReaderName
in interfaceReactiveMessageReaderSpec
- Returns:
- the reader name
- See Also:
-
ReaderBuilder.readerName(String)
-
setReaderName
Sets the reader name.- Parameters:
readerName
- the reader name
-
getSubscriptionName
Description copied from interface:ReactiveMessageReaderSpec
Gets the subscription name.- Specified by:
getSubscriptionName
in interfaceReactiveMessageReaderSpec
- Returns:
- the name of the subscription
- See Also:
-
ReaderBuilder.subscriptionName(String)
-
setSubscriptionName
Sets the subscription name.- Parameters:
subscriptionName
- the name of the subscription
-
getGeneratedSubscriptionNamePrefix
Description copied from interface:ReactiveMessageReaderSpec
Gets the generated subscription name prefix. The default prefix is "reader".- Specified by:
getGeneratedSubscriptionNamePrefix
in interfaceReactiveMessageReaderSpec
- Returns:
- the generated subscription name prefix
- See Also:
-
ReaderBuilder.subscriptionRolePrefix(String)
-
setGeneratedSubscriptionNamePrefix
Sets the generated subscription name prefix.- Parameters:
generatedSubscriptionNamePrefix
- the generated subscription name prefix
-
getReceiverQueueSize
Description copied from interface:ReactiveMessageReaderSpec
Gets the size of the reader receive queue.- Specified by:
getReceiverQueueSize
in interfaceReactiveMessageReaderSpec
- Returns:
- the size of the reader receive queue
- See Also:
-
ReaderBuilder.receiverQueueSize(int)
-
setReceiverQueueSize
Sets the size of the reader receive queue.- Parameters:
receiverQueueSize
- the size of the reader receive queue
-
getReadCompacted
Description copied from interface:ReactiveMessageReaderSpec
Gets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.- Specified by:
getReadCompacted
in interfaceReactiveMessageReaderSpec
- Returns:
- true if messages are read from the compacted topic
- See Also:
-
ReaderBuilder.readCompacted(boolean)
-
setReadCompacted
Sets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.- Parameters:
readCompacted
- true to read messages from the compacted topic
-
getKeyHashRanges
Description copied from interface:ReactiveMessageReaderSpec
Gets the key hash ranges of the reader.- Specified by:
getKeyHashRanges
in interfaceReactiveMessageReaderSpec
- Returns:
- the key hash ranges
- See Also:
-
ReaderBuilder.keyHashRange(Range...)
-
setKeyHashRanges
Sets the key hash ranges of the reader.- Parameters:
keyHashRanges
- the key hash ranges
-
getCryptoKeyReader
public org.apache.pulsar.client.api.CryptoKeyReader getCryptoKeyReader()Description copied from interface:ReactiveMessageReaderSpec
Gets the key reader to be used to decrypt the message payloads.- Specified by:
getCryptoKeyReader
in interfaceReactiveMessageReaderSpec
- Returns:
- the key reader to be used to decrypt the message payloads
- See Also:
-
ReaderBuilder.cryptoKeyReader(org.apache.pulsar.client.api.CryptoKeyReader)
-
setCryptoKeyReader
public void setCryptoKeyReader(org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader) Sets the key reader to be used to decrypt the message payloads.- Parameters:
cryptoKeyReader
- the key reader to be used to decrypt the message payloads
-
getCryptoFailureAction
public org.apache.pulsar.client.api.ConsumerCryptoFailureAction getCryptoFailureAction()Description copied from interface:ReactiveMessageReaderSpec
Gets the action the reader will take in case of decryption failures.- Specified by:
getCryptoFailureAction
in interfaceReactiveMessageReaderSpec
- Returns:
- the action the reader will take in case of decryption failures
- See Also:
-
ReaderBuilder.cryptoFailureAction(org.apache.pulsar.client.api.ConsumerCryptoFailureAction)
-
setCryptoFailureAction
public void setCryptoFailureAction(org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction) Sets the action the reader will take in case of decryption failures.- Parameters:
cryptoFailureAction
- the action the reader will take in case of decryption failures
-
applySpec
Updates this spec from the defined values of another spec.- Parameters:
readerSpec
- the spec from which to update
-