Class MutableReactiveMessageConsumerSpec
java.lang.Object
org.apache.pulsar.reactive.client.api.MutableReactiveMessageConsumerSpec
- All Implemented Interfaces:
ReactiveMessageConsumerSpec
public class MutableReactiveMessageConsumerSpec
extends Object
implements ReactiveMessageConsumerSpec
Mutable spec for a
ReactiveMessageConsumer.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default MutableReactiveMessageConsumerSpec.Constructs a MutableReactiveMessageConsumerSpec from anotherReactiveMessageConsumerSpec. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplySpec(ReactiveMessageConsumerSpec consumerSpec) Updates this spec from the defined values of another spec.Gets whether to ignore the acknowledge operation completion and make it asynchronous from the message consuming processing to improve performance by allowing the acknowledges and message processing to interleave.Gets the duration used to group acknowledgements.reactor.core.scheduler.SchedulerGets the scheduler to use to handle acknowledgements.Gets the timeout duration for unacknowledged messages.org.apache.pulsar.client.api.RedeliveryBackoffGet the redelivery backoff policy for messages that are redelivered due to acknowledgement timeout.Gets the tick time of the ack-timeout redelivery.Gets whether to automatically acknowledge pending chunked messages when maxPendingChunkedMessage is reached.Gets whether the consumer shall subscribe automatically to new partitions of partitioned topics.Gets the interval of updating partitions when autoUpdatePartitions is enabled.Gets whether batch index acknowledgement is enabled.Gets the consumer name.org.apache.pulsar.client.api.ConsumerCryptoFailureActionGets the action the consumer will take in case of decryption failures.org.apache.pulsar.client.api.CryptoKeyReaderGets the key reader to be used to decrypt the message payloads.org.apache.pulsar.client.api.DeadLetterPolicyGets the dead letter policy for the consumer.Gets the time interval to expire incomplete chunks if a consumer fails to receive all the chunks.org.apache.pulsar.client.api.KeySharedPolicyGets the policy used forSubscriptionType.Key_Sharedsubscriptions.Gets the maximum number of messages in the queue holding pending chunked messages.Gets the max total receiver queue size across partitions.org.apache.pulsar.client.api.RedeliveryBackoffGet the negative ack redelivery backoff policy for messages that are negatively acknowledged.Gets the delay to wait before re-delivering messages that have failed to be processed.Gets the priority level for the consumer to which a broker gives more priority while dispatching messages.Gets the consumer properties.Gets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.Gets the size of the consumer receive queue.Gets whether the subscription shall be replicated.Gets whether the retries are enabled.org.apache.pulsar.client.api.SubscriptionInitialPositionGets the subscription initial position.org.apache.pulsar.client.api.SubscriptionModeGets the subscription mode.Gets the subscription name.Gets the properties for the subscription.org.apache.pulsar.client.api.SubscriptionTypeGets the subscription type.Gets the topics to subscribe to.Gets the topics pattern of the topics to subscribe to.Gets the topics auto discovery period when using a topic pattern.org.apache.pulsar.client.api.RegexSubscriptionModeGets the type of topics to subscribe to when using a topic pattern - Persistent, Non-Persistent, or both.voidsetAcknowledgeAsynchronously(Boolean acknowledgeAsynchronously) Sets whether to ignore the acknowledge operation completion and make it asynchronous from the message consuming processing to improve performance by allowing the acknowledges and message processing to interleave.voidsetAcknowledgementsGroupTime(Duration acknowledgementsGroupTime) Sets the duration used to group acknowledgements.voidsetAcknowledgeScheduler(reactor.core.scheduler.Scheduler acknowledgeScheduler) Sets the scheduler to use to handle acknowledgements.voidsetAckTimeout(Duration ackTimeout) Sets the timeout duration for unacknowledged messages.voidsetAckTimeoutRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff ackTimeoutRedeliveryBackoff) Sets the redelivery backoff policy for messages that are redelivered due to acknowledgement timeout.voidsetAckTimeoutTickTime(Duration ackTimeoutTickTime) Sets the tick time of the ack-timeout redelivery.voidsetAutoAckOldestChunkedMessageOnQueueFull(Boolean autoAckOldestChunkedMessageOnQueueFull) Sets whether to automatically acknowledge pending chunked messages when maxPendingChunkedMessage is reached.voidsetAutoUpdatePartitions(Boolean autoUpdatePartitions) Sets whether the consumer shall subscribe automatically to new partitions of partitioned topics.voidsetAutoUpdatePartitionsInterval(Duration autoUpdatePartitionsInterval) Sets the interval of updating partitions when autoUpdatePartitions is enabled.voidsetBatchIndexAckEnabled(Boolean batchIndexAckEnabled) Sets whether batch index acknowledgement is enabled.voidsetConsumerName(String consumerName) Sets the consumer name.voidsetCryptoFailureAction(org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction) Sets the action the consumer will take in case of decryption failures.voidsetCryptoKeyReader(org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader) Sets the key reader to be used to decrypt the message payloads.voidsetDeadLetterPolicy(org.apache.pulsar.client.api.DeadLetterPolicy deadLetterPolicy) Sets the dead letter policy for the consumer.voidsetExpireTimeOfIncompleteChunkedMessage(Duration expireTimeOfIncompleteChunkedMessage) Sets the time interval to expire incomplete chunks if a consumer fails to receive all the chunks.voidsetKeySharedPolicy(org.apache.pulsar.client.api.KeySharedPolicy keySharedPolicy) Sets the policy used forSubscriptionType.Key_Sharedsubscriptions.voidsetMaxPendingChunkedMessage(Integer maxPendingChunkedMessage) Sets the maximum number of messages in the queue holding pending chunked messages.voidsetMaxTotalReceiverQueueSizeAcrossPartitions(Integer maxTotalReceiverQueueSizeAcrossPartitions) Sets the maximum total receiver queue size across partitions.voidsetNegativeAckRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff negativeAckRedeliveryBackoff) Sets the redelivery backoff policy for messages that are negatively acknowledged.voidsetNegativeAckRedeliveryDelay(Duration negativeAckRedeliveryDelay) Sets the delay to wait before re-delivering messages that have failed to be processed.voidsetPriorityLevel(Integer priorityLevel) Sets the priority level for the consumer to which a broker gives more priority while dispatching messages.voidsetProperties(Map<String, String> properties) Sets the consumer properties.voidsetReadCompacted(Boolean readCompacted) Sets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.voidsetReceiverQueueSize(Integer receiverQueueSize) Sets the size of the consumer receive queue.voidsetReplicateSubscriptionState(Boolean replicateSubscriptionState) Sets whether the subscription shall be replicated.voidsetRetryLetterTopicEnable(Boolean retryLetterTopicEnable) Sets whether the retries are enabled.voidsetSubscriptionInitialPosition(org.apache.pulsar.client.api.SubscriptionInitialPosition subscriptionInitialPosition) Sets the subscription initial position.voidsetSubscriptionMode(org.apache.pulsar.client.api.SubscriptionMode subscriptionMode) Sets the subscription mode.voidsetSubscriptionName(String subscriptionName) Sets the subscription name.voidsetSubscriptionProperties(Map<String, String> subscriptionProperties) Sets the properties for the subscription.voidsetSubscriptionType(org.apache.pulsar.client.api.SubscriptionType subscriptionType) Sets the subscription type.voidsetTopicNames(List<String> topicNames) Sets the topics to subscribe to.voidsetTopicsPattern(Pattern topicsPattern) Sets the topics pattern of the topics to subscribe to.voidsetTopicsPatternAutoDiscoveryPeriod(Duration topicsPatternAutoDiscoveryPeriod) Sets the topics auto discovery period when using a topic pattern.voidsetTopicsPatternSubscriptionMode(org.apache.pulsar.client.api.RegexSubscriptionMode topicsPatternSubscriptionMode) Sets the type of topics to subscribe to when using a topic pattern - Persistent, Non-Persistent, or both.
-
Constructor Details
-
MutableReactiveMessageConsumerSpec
public MutableReactiveMessageConsumerSpec()Constructs a default MutableReactiveMessageConsumerSpec. -
MutableReactiveMessageConsumerSpec
Constructs a MutableReactiveMessageConsumerSpec from anotherReactiveMessageConsumerSpec.- Parameters:
consumerSpec- the spec to construct from
-
-
Method Details
-
getTopicNames
Description copied from interface:ReactiveMessageConsumerSpecGets the topics to subscribe to.- Specified by:
getTopicNamesin interfaceReactiveMessageConsumerSpec- Returns:
- the topic names
- See Also:
-
ConsumerBuilder.topics(java.util.List<java.lang.String>)
-
setTopicNames
Sets the topics to subscribe to.- Parameters:
topicNames- the topics to subscribe to.
-
getTopicsPattern
Description copied from interface:ReactiveMessageConsumerSpecGets the topics pattern of the topics to subscribe to.- Specified by:
getTopicsPatternin interfaceReactiveMessageConsumerSpec- Returns:
- the topics pattern
- See Also:
-
ConsumerBuilder.topicsPattern(Pattern)
-
setTopicsPattern
Sets the topics pattern of the topics to subscribe to.- Parameters:
topicsPattern- the topics pattern of the topics to subscribe to.
-
getTopicsPatternSubscriptionMode
public org.apache.pulsar.client.api.RegexSubscriptionMode getTopicsPatternSubscriptionMode()Description copied from interface:ReactiveMessageConsumerSpecGets the type of topics to subscribe to when using a topic pattern - Persistent, Non-Persistent, or both.- Specified by:
getTopicsPatternSubscriptionModein interfaceReactiveMessageConsumerSpec- Returns:
- the pattern subscription mode
- See Also:
-
ConsumerBuilder.subscriptionTopicsMode(org.apache.pulsar.client.api.RegexSubscriptionMode)
-
setTopicsPatternSubscriptionMode
public void setTopicsPatternSubscriptionMode(org.apache.pulsar.client.api.RegexSubscriptionMode topicsPatternSubscriptionMode) Sets the type of topics to subscribe to when using a topic pattern - Persistent, Non-Persistent, or both.- Parameters:
topicsPatternSubscriptionMode- type of topics to subscribe to
-
getTopicsPatternAutoDiscoveryPeriod
Description copied from interface:ReactiveMessageConsumerSpecGets the topics auto discovery period when using a topic pattern.- Specified by:
getTopicsPatternAutoDiscoveryPeriodin interfaceReactiveMessageConsumerSpec- Returns:
- the topics discovery period
- See Also:
-
ConsumerBuilder.patternAutoDiscoveryPeriod(int)
-
setTopicsPatternAutoDiscoveryPeriod
Sets the topics auto discovery period when using a topic pattern.- Parameters:
topicsPatternAutoDiscoveryPeriod- the topics auto discovery period
-
getSubscriptionName
Description copied from interface:ReactiveMessageConsumerSpecGets the subscription name.- Specified by:
getSubscriptionNamein interfaceReactiveMessageConsumerSpec- Returns:
- the name of the subscription
- See Also:
-
ConsumerBuilder.subscriptionName(java.lang.String)
-
setSubscriptionName
Sets the subscription name.- Parameters:
subscriptionName- the subscription name
-
getSubscriptionMode
public org.apache.pulsar.client.api.SubscriptionMode getSubscriptionMode()Description copied from interface:ReactiveMessageConsumerSpecGets the subscription mode.- Specified by:
getSubscriptionModein interfaceReactiveMessageConsumerSpec- Returns:
- the subscription mode
- See Also:
-
ConsumerBuilder.subscriptionMode(org.apache.pulsar.client.api.SubscriptionMode)
-
setSubscriptionMode
public void setSubscriptionMode(org.apache.pulsar.client.api.SubscriptionMode subscriptionMode) Sets the subscription mode.- Parameters:
subscriptionMode- the subscription mode
-
getSubscriptionType
public org.apache.pulsar.client.api.SubscriptionType getSubscriptionType()Description copied from interface:ReactiveMessageConsumerSpecGets the subscription type.- Specified by:
getSubscriptionTypein interfaceReactiveMessageConsumerSpec- Returns:
- the subscription type
- See Also:
-
ConsumerBuilder.subscriptionType(org.apache.pulsar.client.api.SubscriptionType)
-
setSubscriptionType
public void setSubscriptionType(org.apache.pulsar.client.api.SubscriptionType subscriptionType) Sets the subscription type.- Parameters:
subscriptionType- the subscription type
-
getSubscriptionInitialPosition
public org.apache.pulsar.client.api.SubscriptionInitialPosition getSubscriptionInitialPosition()Description copied from interface:ReactiveMessageConsumerSpecGets the subscription initial position.- Specified by:
getSubscriptionInitialPositionin interfaceReactiveMessageConsumerSpec- Returns:
- the position where to initialize a newly created subscription
- See Also:
-
ConsumerBuilder.subscriptionInitialPosition(org.apache.pulsar.client.api.SubscriptionInitialPosition)
-
setSubscriptionInitialPosition
public void setSubscriptionInitialPosition(org.apache.pulsar.client.api.SubscriptionInitialPosition subscriptionInitialPosition) Sets the subscription initial position.- Parameters:
subscriptionInitialPosition- the subscription initial position
-
getReplicateSubscriptionState
Description copied from interface:ReactiveMessageConsumerSpecGets whether the subscription shall be replicated.- Specified by:
getReplicateSubscriptionStatein interfaceReactiveMessageConsumerSpec- Returns:
- true if the subscription is replicated
- See Also:
-
ConsumerBuilder.replicateSubscriptionState(boolean)
-
setReplicateSubscriptionState
Sets whether the subscription shall be replicated.- Parameters:
replicateSubscriptionState- true to replicate the subscription
-
getSubscriptionProperties
Description copied from interface:ReactiveMessageConsumerSpecGets the properties for the subscription.- Specified by:
getSubscriptionPropertiesin interfaceReactiveMessageConsumerSpec- Returns:
- the subscription properties
- See Also:
-
ConsumerBuilder.subscriptionProperties(java.util.Map<java.lang.String, java.lang.String>)
-
setSubscriptionProperties
Sets the properties for the subscription.- Parameters:
subscriptionProperties- the subscription properties
-
getConsumerName
Description copied from interface:ReactiveMessageConsumerSpecGets the consumer name.- Specified by:
getConsumerNamein interfaceReactiveMessageConsumerSpec- Returns:
- the consumer name
- See Also:
-
ConsumerBuilder.consumerName(java.lang.String)
-
setConsumerName
Sets the consumer name.- Parameters:
consumerName- the consumer name
-
getProperties
Description copied from interface:ReactiveMessageConsumerSpecGets the consumer properties.- Specified by:
getPropertiesin interfaceReactiveMessageConsumerSpec- Returns:
- the consumer properties
- See Also:
-
ConsumerBuilder.properties(java.util.Map<java.lang.String, java.lang.String>)
-
setProperties
Sets the consumer properties.- Parameters:
properties- the consumer properties
-
getPriorityLevel
Description copied from interface:ReactiveMessageConsumerSpecGets the priority level for the consumer to which a broker gives more priority while dispatching messages.- Specified by:
getPriorityLevelin interfaceReactiveMessageConsumerSpec- Returns:
- the priority level of the consumer
- See Also:
-
ConsumerBuilder.priorityLevel(int)
-
setPriorityLevel
Sets the priority level for the consumer to which a broker gives more priority while dispatching messages.- Parameters:
priorityLevel- the priority level of the consumer
-
getReadCompacted
Description copied from interface:ReactiveMessageConsumerSpecGets whether to read messages from the compacted topic rather than reading the full message backlog of the topic.- Specified by:
getReadCompactedin interfaceReactiveMessageConsumerSpec- Returns:
- true if messages are read from the compacted topic
- See Also:
-
ConsumerBuilder.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
-
getBatchIndexAckEnabled
Description copied from interface:ReactiveMessageConsumerSpecGets whether batch index acknowledgement is enabled.- Specified by:
getBatchIndexAckEnabledin interfaceReactiveMessageConsumerSpec- Returns:
- true if batch index acknowledgement is enabled
- See Also:
-
ConsumerBuilder.enableBatchIndexAcknowledgment(boolean)
-
setBatchIndexAckEnabled
Sets whether batch index acknowledgement is enabled.- Parameters:
batchIndexAckEnabled- true to enable batch index acknowledgement
-
getAckTimeout
Description copied from interface:ReactiveMessageConsumerSpecGets the timeout duration for unacknowledged messages.- Specified by:
getAckTimeoutin interfaceReactiveMessageConsumerSpec- Returns:
- the timeout duration for unacknowledged messages
- See Also:
-
ConsumerBuilder.ackTimeout(long, java.util.concurrent.TimeUnit)
-
setAckTimeout
Sets the timeout duration for unacknowledged messages.- Parameters:
ackTimeout- the timeout duration for unacknowledged messages
-
getAckTimeoutTickTime
Description copied from interface:ReactiveMessageConsumerSpecGets the tick time of the ack-timeout redelivery.- Specified by:
getAckTimeoutTickTimein interfaceReactiveMessageConsumerSpec- Returns:
- the tick time of the ack-timeout redelivery
- See Also:
-
ConsumerBuilder.ackTimeoutTickTime(long, java.util.concurrent.TimeUnit)
-
setAckTimeoutTickTime
Sets the tick time of the ack-timeout redelivery.- Parameters:
ackTimeoutTickTime- the tick time of the ack-timeout redelivery
-
getAcknowledgementsGroupTime
Description copied from interface:ReactiveMessageConsumerSpecGets the duration used to group acknowledgements.- Specified by:
getAcknowledgementsGroupTimein interfaceReactiveMessageConsumerSpec- Returns:
- the duration used to group acknowledgements
- See Also:
-
ConsumerBuilder.acknowledgmentGroupTime(long, java.util.concurrent.TimeUnit)
-
setAcknowledgementsGroupTime
Sets the duration used to group acknowledgements.- Parameters:
acknowledgementsGroupTime- the duration used to group acknowledgements
-
getAcknowledgeAsynchronously
Description copied from interface:ReactiveMessageConsumerSpecGets whether to ignore the acknowledge operation completion and make it asynchronous from the message consuming processing to improve performance by allowing the acknowledges and message processing to interleave.- Specified by:
getAcknowledgeAsynchronouslyin interfaceReactiveMessageConsumerSpec- Returns:
- true if the acknowledge operation completion is ignored
-
setAcknowledgeAsynchronously
Sets whether to ignore the acknowledge operation completion and make it asynchronous from the message consuming processing to improve performance by allowing the acknowledges and message processing to interleave.- Parameters:
acknowledgeAsynchronously- true to ignore the acknowledge operation completion
-
getAcknowledgeScheduler
public reactor.core.scheduler.Scheduler getAcknowledgeScheduler()Description copied from interface:ReactiveMessageConsumerSpecGets the scheduler to use to handle acknowledgements.- Specified by:
getAcknowledgeSchedulerin interfaceReactiveMessageConsumerSpec- Returns:
- the scheduler to use to handle acknowledgements
-
setAcknowledgeScheduler
public void setAcknowledgeScheduler(reactor.core.scheduler.Scheduler acknowledgeScheduler) Sets the scheduler to use to handle acknowledgements.- Parameters:
acknowledgeScheduler- the scheduler to use to handle acknowledgements
-
getNegativeAckRedeliveryDelay
Description copied from interface:ReactiveMessageConsumerSpecGets the delay to wait before re-delivering messages that have failed to be processed.- Specified by:
getNegativeAckRedeliveryDelayin interfaceReactiveMessageConsumerSpec- Returns:
- the redelivery delay for failed messages
- See Also:
-
ConsumerBuilder.negativeAckRedeliveryDelay(long, java.util.concurrent.TimeUnit)
-
setNegativeAckRedeliveryDelay
Sets the delay to wait before re-delivering messages that have failed to be processed.- Parameters:
negativeAckRedeliveryDelay- the redelivery delay for failed messages
-
getAckTimeoutRedeliveryBackoff
public org.apache.pulsar.client.api.RedeliveryBackoff getAckTimeoutRedeliveryBackoff()Description copied from interface:ReactiveMessageConsumerSpecGet the redelivery backoff policy for messages that are redelivered due to acknowledgement timeout.- Specified by:
getAckTimeoutRedeliveryBackoffin interfaceReactiveMessageConsumerSpec- Returns:
- redeliveryBackoff
- See Also:
-
ConsumerBuilder.ackTimeoutRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff)
-
setAckTimeoutRedeliveryBackoff
public void setAckTimeoutRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff ackTimeoutRedeliveryBackoff) Sets the redelivery backoff policy for messages that are redelivered due to acknowledgement timeout.- Parameters:
ackTimeoutRedeliveryBackoff- the backoff policy to use for messages that exceed their ack timeout
-
getNegativeAckRedeliveryBackoff
public org.apache.pulsar.client.api.RedeliveryBackoff getNegativeAckRedeliveryBackoff()Description copied from interface:ReactiveMessageConsumerSpecGet the negative ack redelivery backoff policy for messages that are negatively acknowledged.- Specified by:
getNegativeAckRedeliveryBackoffin interfaceReactiveMessageConsumerSpec- Returns:
- redeliveryBackoff
- See Also:
-
ConsumerBuilder.negativeAckRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff)
-
setNegativeAckRedeliveryBackoff
public void setNegativeAckRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff negativeAckRedeliveryBackoff) Sets the redelivery backoff policy for messages that are negatively acknowledged.- Parameters:
negativeAckRedeliveryBackoff- the backoff policy to use for negatively acknowledged messages
-
getDeadLetterPolicy
public org.apache.pulsar.client.api.DeadLetterPolicy getDeadLetterPolicy()Description copied from interface:ReactiveMessageConsumerSpecGets the dead letter policy for the consumer.- Specified by:
getDeadLetterPolicyin interfaceReactiveMessageConsumerSpec- Returns:
- the dead letter policy
- See Also:
-
ConsumerBuilder.deadLetterPolicy(org.apache.pulsar.client.api.DeadLetterPolicy)
-
setDeadLetterPolicy
public void setDeadLetterPolicy(org.apache.pulsar.client.api.DeadLetterPolicy deadLetterPolicy) Sets the dead letter policy for the consumer.- Parameters:
deadLetterPolicy- the dead letter policy
-
getRetryLetterTopicEnable
Description copied from interface:ReactiveMessageConsumerSpecGets whether the retries are enabled.- Specified by:
getRetryLetterTopicEnablein interfaceReactiveMessageConsumerSpec- Returns:
- true if retries are enabled
- See Also:
-
ConsumerBuilder.enableRetry(boolean)
-
setRetryLetterTopicEnable
Sets whether the retries are enabled.- Parameters:
retryLetterTopicEnable- true to enable retries
-
getReceiverQueueSize
Description copied from interface:ReactiveMessageConsumerSpecGets the size of the consumer receive queue.- Specified by:
getReceiverQueueSizein interfaceReactiveMessageConsumerSpec- Returns:
- the size of the consumer receive queue
- See Also:
-
ConsumerBuilder.receiverQueueSize(int)
-
setReceiverQueueSize
Sets the size of the consumer receive queue.- Parameters:
receiverQueueSize- the size of the consumer receive queue
-
getMaxTotalReceiverQueueSizeAcrossPartitions
Description copied from interface:ReactiveMessageConsumerSpecGets the max total receiver queue size across partitions.- Specified by:
getMaxTotalReceiverQueueSizeAcrossPartitionsin interfaceReactiveMessageConsumerSpec- Returns:
- the max total receiver queue size across partitions
- See Also:
-
ConsumerBuilder.maxTotalReceiverQueueSizeAcrossPartitions(int)
-
setMaxTotalReceiverQueueSizeAcrossPartitions
public void setMaxTotalReceiverQueueSizeAcrossPartitions(Integer maxTotalReceiverQueueSizeAcrossPartitions) Sets the maximum total receiver queue size across partitions.- Parameters:
maxTotalReceiverQueueSizeAcrossPartitions- the maximum total receiver queue size across partitions
-
getAutoUpdatePartitions
Description copied from interface:ReactiveMessageConsumerSpecGets whether the consumer shall subscribe automatically to new partitions of partitioned topics.- Specified by:
getAutoUpdatePartitionsin interfaceReactiveMessageConsumerSpec- Returns:
- true if the consumer subscribes automatically to new partitions
- See Also:
-
ConsumerBuilder.autoUpdatePartitions(boolean)
-
setAutoUpdatePartitions
Sets whether the consumer shall subscribe automatically to new partitions of partitioned topics.- Parameters:
autoUpdatePartitions- true for the consumer to subscribe automatically to new partitions
-
getAutoUpdatePartitionsInterval
Description copied from interface:ReactiveMessageConsumerSpecGets the interval of updating partitions when autoUpdatePartitions is enabled.- Specified by:
getAutoUpdatePartitionsIntervalin interfaceReactiveMessageConsumerSpec- Returns:
- the interval between partitions updates
- See Also:
-
ConsumerBuilder.autoUpdatePartitionsInterval(int, java.util.concurrent.TimeUnit)ConsumerBuilder.autoUpdatePartitions(boolean)
-
setAutoUpdatePartitionsInterval
Sets the interval of updating partitions when autoUpdatePartitions is enabled.- Parameters:
autoUpdatePartitionsInterval- the interval between partitions updates
-
getCryptoKeyReader
public org.apache.pulsar.client.api.CryptoKeyReader getCryptoKeyReader()Description copied from interface:ReactiveMessageConsumerSpecGets the key reader to be used to decrypt the message payloads.- Specified by:
getCryptoKeyReaderin interfaceReactiveMessageConsumerSpec- Returns:
- the key reader to be used to decrypt the message payloads
- See Also:
-
ConsumerBuilder.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:ReactiveMessageConsumerSpecGets the action the consumer will take in case of decryption failures.- Specified by:
getCryptoFailureActionin interfaceReactiveMessageConsumerSpec- Returns:
- the action the consumer will take in case of decryption failures
- See Also:
-
ConsumerBuilder.cryptoFailureAction(org.apache.pulsar.client.api.ConsumerCryptoFailureAction)
-
setCryptoFailureAction
public void setCryptoFailureAction(org.apache.pulsar.client.api.ConsumerCryptoFailureAction cryptoFailureAction) Sets the action the consumer will take in case of decryption failures.- Parameters:
cryptoFailureAction- the action the consumer will take in case of decryption failures
-
getMaxPendingChunkedMessage
Description copied from interface:ReactiveMessageConsumerSpecGets the maximum number of messages in the queue holding pending chunked messages.- Specified by:
getMaxPendingChunkedMessagein interfaceReactiveMessageConsumerSpec- Returns:
- the maximum number of messages in the queue holding pending chunked
- See Also:
-
messages.
-
setMaxPendingChunkedMessage
Sets the maximum number of messages in the queue holding pending chunked messages.- Parameters:
maxPendingChunkedMessage- the maximum number of messages in the queue holding pending chunked messages
-
getAutoAckOldestChunkedMessageOnQueueFull
Description copied from interface:ReactiveMessageConsumerSpecGets whether to automatically acknowledge pending chunked messages when maxPendingChunkedMessage is reached.- Specified by:
getAutoAckOldestChunkedMessageOnQueueFullin interfaceReactiveMessageConsumerSpec- Returns:
- true to acknowledge the messages, false to have them redelivered.
- See Also:
-
ConsumerBuilder.autoAckOldestChunkedMessageOnQueueFull(boolean)ConsumerBuilder.maxPendingChunkedMessage(int)
-
setAutoAckOldestChunkedMessageOnQueueFull
public void setAutoAckOldestChunkedMessageOnQueueFull(Boolean autoAckOldestChunkedMessageOnQueueFull) Sets whether to automatically acknowledge pending chunked messages when maxPendingChunkedMessage is reached.- Parameters:
autoAckOldestChunkedMessageOnQueueFull- true to acknowledge the messages, false to have them redelivered
-
getExpireTimeOfIncompleteChunkedMessage
Description copied from interface:ReactiveMessageConsumerSpecGets the time interval to expire incomplete chunks if a consumer fails to receive all the chunks.- Specified by:
getExpireTimeOfIncompleteChunkedMessagein interfaceReactiveMessageConsumerSpec- Returns:
- the time interval to expire incomplete chunks.
- See Also:
-
ConsumerBuilder.expireTimeOfIncompleteChunkedMessage(long, java.util.concurrent.TimeUnit)
-
setExpireTimeOfIncompleteChunkedMessage
Sets the time interval to expire incomplete chunks if a consumer fails to receive all the chunks.- Parameters:
expireTimeOfIncompleteChunkedMessage- the time interval to expire incomplete chunks.
-
applySpec
Updates this spec from the defined values of another spec.- Parameters:
consumerSpec- the spec from which to update
-