Class ImmutableReactiveMessageReaderSpec
- java.lang.Object
-
- org.apache.pulsar.reactive.client.api.ImmutableReactiveMessageReaderSpec
-
- All Implemented Interfaces:
ReactiveMessageReaderSpec
public class ImmutableReactiveMessageReaderSpec extends java.lang.Object implements ReactiveMessageReaderSpec
Immutable spec for aReactiveMessageReader
.
-
-
Constructor Summary
Constructors Constructor Description ImmutableReactiveMessageReaderSpec(java.util.List<java.lang.String> topicNames, java.lang.String readerName, java.lang.String subscriptionName, java.lang.String generatedSubscriptionNamePrefix, java.lang.Integer receiverQueueSize, java.lang.Boolean readCompacted, java.util.List<org.apache.pulsar.client.api.Range> keyHashRanges, org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader, org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction)
ImmutableReactiveMessageReaderSpec(ReactiveMessageReaderSpec readerSpec)
Constructs a ImmutableReactiveMessageConsumerSpec from anotherReactiveMessageConsumerSpec
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.pulsar.client.api.ConsumerCryptoFailureAction
getCryptoFailureAction()
Gets the action the reader will take in case of decryption failures.org.apache.pulsar.client.api.CryptoKeyReader
getCryptoKeyReader()
Gets the key reader to be used to decrypt the message payloads.java.lang.String
getGeneratedSubscriptionNamePrefix()
Gets the generated subscription name prefix.java.util.List<org.apache.pulsar.client.api.Range>
getKeyHashRanges()
Gets the key hash ranges of the reader.java.lang.Boolean
getReadCompacted()
Gets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.java.lang.String
getReaderName()
Gets the reader name.java.lang.Integer
getReceiverQueueSize()
Gets the size of the reader receive queue.java.lang.String
getSubscriptionName()
Gets the subscription name.java.util.List<java.lang.String>
getTopicNames()
Gets the topics to read from.
-
-
-
Constructor Detail
-
ImmutableReactiveMessageReaderSpec
public ImmutableReactiveMessageReaderSpec(java.util.List<java.lang.String> topicNames, java.lang.String readerName, java.lang.String subscriptionName, java.lang.String generatedSubscriptionNamePrefix, java.lang.Integer receiverQueueSize, java.lang.Boolean readCompacted, java.util.List<org.apache.pulsar.client.api.Range> keyHashRanges, org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader, org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction)
-
ImmutableReactiveMessageReaderSpec
public ImmutableReactiveMessageReaderSpec(ReactiveMessageReaderSpec readerSpec)
Constructs a ImmutableReactiveMessageConsumerSpec from anotherReactiveMessageConsumerSpec
.- Parameters:
readerSpec
- the spec to construct from
-
-
Method Detail
-
getTopicNames
public java.util.List<java.lang.String> 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)
-
getReaderName
public java.lang.String getReaderName()
Description copied from interface:ReactiveMessageReaderSpec
Gets the reader name.- Specified by:
getReaderName
in interfaceReactiveMessageReaderSpec
- Returns:
- the reader name
- See Also:
ReaderBuilder.readerName(String)
-
getSubscriptionName
public java.lang.String 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)
-
getGeneratedSubscriptionNamePrefix
public java.lang.String 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)
-
getReceiverQueueSize
public java.lang.Integer 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)
-
getReadCompacted
public java.lang.Boolean 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)
-
getKeyHashRanges
public java.util.List<org.apache.pulsar.client.api.Range> 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...)
-
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)
-
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)
-
-