Class ImmutableReactiveMessageSenderSpec
- java.lang.Object
-
- org.apache.pulsar.reactive.client.api.ImmutableReactiveMessageSenderSpec
-
- All Implemented Interfaces:
ReactiveMessageSenderSpec
public class ImmutableReactiveMessageSenderSpec extends java.lang.Object implements ReactiveMessageSenderSpec
Immutable spec for aReactiveMessageSender
.
-
-
Constructor Summary
Constructors Constructor Description ImmutableReactiveMessageSenderSpec(java.lang.String topicName, java.lang.String producerName, java.time.Duration sendTimeout, java.lang.Integer maxPendingMessages, java.lang.Integer maxPendingMessagesAcrossPartitions, org.apache.pulsar.client.api.MessageRoutingMode messageRoutingMode, org.apache.pulsar.client.api.HashingScheme hashingScheme, org.apache.pulsar.client.api.ProducerCryptoFailureAction cryptoFailureAction, org.apache.pulsar.client.api.MessageRouter messageRouter, java.time.Duration batchingMaxPublishDelay, java.lang.Integer roundRobinRouterBatchingPartitionSwitchFrequency, java.lang.Integer batchingMaxMessages, java.lang.Integer batchingMaxBytes, java.lang.Boolean batchingEnabled, org.apache.pulsar.client.api.BatcherBuilder batcherBuilder, java.lang.Boolean chunkingEnabled, org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader, java.util.Set<java.lang.String> encryptionKeys, org.apache.pulsar.client.api.CompressionType compressionType, java.lang.Long initialSequenceId, java.lang.Boolean autoUpdatePartitions, java.time.Duration autoUpdatePartitionsInterval, java.lang.Boolean multiSchema, org.apache.pulsar.client.api.ProducerAccessMode accessMode, java.lang.Boolean lazyStartPartitionedProducers, java.util.Map<java.lang.String,java.lang.String> properties)
ImmutableReactiveMessageSenderSpec(ReactiveMessageSenderSpec senderSpec)
Constructs a ImmutableReactiveMessageConsumerSpec from anotherReactiveMessageConsumerSpec
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.pulsar.client.api.ProducerAccessMode
getAccessMode()
Gets the type of access mode that the producer requires on the topic.java.lang.Boolean
getAutoUpdatePartitions()
Gets whether partitioned producer will automatically discover new partitions at runtime.java.time.Duration
getAutoUpdatePartitionsInterval()
Gets the interval of partitions updates if autoUpdatePartitions is enabled.org.apache.pulsar.client.api.BatcherBuilder
getBatcherBuilder()
Gets the batcher builder of the producer.java.lang.Boolean
getBatchingEnabled()
Gets whether automatic batching of messages is enabled for the producer.java.lang.Integer
getBatchingMaxBytes()
Gets the maximum number of bytes permitted in a batch.java.lang.Integer
getBatchingMaxMessages()
Gets the maximum number of messages permitted in a batch.java.time.Duration
getBatchingMaxPublishDelay()
Gets the time period within which the messages sent will be batched.java.lang.Boolean
getChunkingEnabled()
Gets whether chunking of messages is enabled.org.apache.pulsar.client.api.CompressionType
getCompressionType()
Gets the compression type for the producer.org.apache.pulsar.client.api.ProducerCryptoFailureAction
getCryptoFailureAction()
Gets the action the producer will take in case of encryption failures.org.apache.pulsar.client.api.CryptoKeyReader
getCryptoKeyReader()
Gets the key reader to be used to encrypt the message payloads.java.util.Set<java.lang.String>
getEncryptionKeys()
Gets the public encryption key names, used by producer to encrypt the data key.org.apache.pulsar.client.api.HashingScheme
getHashingScheme()
Gets the hashing function determining the partition where to publish a particular message on partitioned topics.java.lang.Long
getInitialSequenceId()
Gets the baseline for the sequence ids for messages published by the producer.java.lang.Boolean
getLazyStartPartitionedProducers()
Gets whether producers register and connect immediately to the owner broker of each partition or start lazily on demand.java.lang.Integer
getMaxPendingMessages()
Gets the maximum size of the queue holding the messages pending to receive an acknowledgment from the broker.java.lang.Integer
getMaxPendingMessagesAcrossPartitions()
Gets the maximum number of pending messages across all the partitions.org.apache.pulsar.client.api.MessageRouter
getMessageRouter()
Gets the custom message router.org.apache.pulsar.client.api.MessageRoutingMode
getMessageRoutingMode()
Gets the message routing logic for producers on partitioned topics.java.lang.Boolean
getMultiSchema()
Gets whether the multiple schema mode is enabled.java.lang.String
getProducerName()
Gets the name of the producer.java.util.Map<java.lang.String,java.lang.String>
getProperties()
Gets the properties of the producer.java.lang.Integer
getRoundRobinRouterBatchingPartitionSwitchFrequency()
Gets the partition switch frequency while batching of messages is enabled and using round-robin routing mode for non-keyed message.java.time.Duration
getSendTimeout()
Gets the send timeout.java.lang.String
getTopicName()
Gets the topic to publish on.
-
-
-
Constructor Detail
-
ImmutableReactiveMessageSenderSpec
public ImmutableReactiveMessageSenderSpec(java.lang.String topicName, java.lang.String producerName, java.time.Duration sendTimeout, java.lang.Integer maxPendingMessages, java.lang.Integer maxPendingMessagesAcrossPartitions, org.apache.pulsar.client.api.MessageRoutingMode messageRoutingMode, org.apache.pulsar.client.api.HashingScheme hashingScheme, org.apache.pulsar.client.api.ProducerCryptoFailureAction cryptoFailureAction, org.apache.pulsar.client.api.MessageRouter messageRouter, java.time.Duration batchingMaxPublishDelay, java.lang.Integer roundRobinRouterBatchingPartitionSwitchFrequency, java.lang.Integer batchingMaxMessages, java.lang.Integer batchingMaxBytes, java.lang.Boolean batchingEnabled, org.apache.pulsar.client.api.BatcherBuilder batcherBuilder, java.lang.Boolean chunkingEnabled, org.apache.pulsar.client.api.CryptoKeyReader cryptoKeyReader, java.util.Set<java.lang.String> encryptionKeys, org.apache.pulsar.client.api.CompressionType compressionType, java.lang.Long initialSequenceId, java.lang.Boolean autoUpdatePartitions, java.time.Duration autoUpdatePartitionsInterval, java.lang.Boolean multiSchema, org.apache.pulsar.client.api.ProducerAccessMode accessMode, java.lang.Boolean lazyStartPartitionedProducers, java.util.Map<java.lang.String,java.lang.String> properties)
-
ImmutableReactiveMessageSenderSpec
public ImmutableReactiveMessageSenderSpec(ReactiveMessageSenderSpec senderSpec)
Constructs a ImmutableReactiveMessageConsumerSpec from anotherReactiveMessageConsumerSpec
.- Parameters:
senderSpec
- the spec to construct from
-
-
Method Detail
-
getTopicName
public java.lang.String getTopicName()
Description copied from interface:ReactiveMessageSenderSpec
Gets the topic to publish on.- Specified by:
getTopicName
in interfaceReactiveMessageSenderSpec
- Returns:
- the topic
- See Also:
ProducerBuilder.topic(java.lang.String)
-
getProducerName
public java.lang.String getProducerName()
Description copied from interface:ReactiveMessageSenderSpec
Gets the name of the producer.- Specified by:
getProducerName
in interfaceReactiveMessageSenderSpec
- Returns:
- the producer name
- See Also:
ProducerBuilder.producerName(java.lang.String)
-
getSendTimeout
public java.time.Duration getSendTimeout()
Description copied from interface:ReactiveMessageSenderSpec
Gets the send timeout.- Specified by:
getSendTimeout
in interfaceReactiveMessageSenderSpec
- Returns:
- the send timeout
- See Also:
ProducerBuilder.sendTimeout(int, java.util.concurrent.TimeUnit)
-
getMaxPendingMessages
public java.lang.Integer getMaxPendingMessages()
Description copied from interface:ReactiveMessageSenderSpec
Gets the maximum size of the queue holding the messages pending to receive an acknowledgment from the broker.- Specified by:
getMaxPendingMessages
in interfaceReactiveMessageSenderSpec
- Returns:
- the maximum pending messages
- See Also:
ProducerBuilder.maxPendingMessages(int)
-
getMaxPendingMessagesAcrossPartitions
public java.lang.Integer getMaxPendingMessagesAcrossPartitions()
Description copied from interface:ReactiveMessageSenderSpec
Gets the maximum number of pending messages across all the partitions.- Specified by:
getMaxPendingMessagesAcrossPartitions
in interfaceReactiveMessageSenderSpec
- Returns:
- the maximum number of pending messages across all the partitions
- See Also:
ProducerBuilder.maxPendingMessagesAcrossPartitions(int)
-
getMessageRoutingMode
public org.apache.pulsar.client.api.MessageRoutingMode getMessageRoutingMode()
Description copied from interface:ReactiveMessageSenderSpec
Gets the message routing logic for producers on partitioned topics.- Specified by:
getMessageRoutingMode
in interfaceReactiveMessageSenderSpec
- Returns:
- the message routing mode
- See Also:
ProducerBuilder.messageRoutingMode(org.apache.pulsar.client.api.MessageRoutingMode)
-
getHashingScheme
public org.apache.pulsar.client.api.HashingScheme getHashingScheme()
Description copied from interface:ReactiveMessageSenderSpec
Gets the hashing function determining the partition where to publish a particular message on partitioned topics.- Specified by:
getHashingScheme
in interfaceReactiveMessageSenderSpec
- Returns:
- the hashing scheme
- See Also:
ProducerBuilder.hashingScheme(org.apache.pulsar.client.api.HashingScheme)
-
getCryptoFailureAction
public org.apache.pulsar.client.api.ProducerCryptoFailureAction getCryptoFailureAction()
Description copied from interface:ReactiveMessageSenderSpec
Gets the action the producer will take in case of encryption failures.- Specified by:
getCryptoFailureAction
in interfaceReactiveMessageSenderSpec
- Returns:
- the action the producer will take in case of encryption failures
- See Also:
ProducerBuilder.cryptoFailureAction(org.apache.pulsar.client.api.ProducerCryptoFailureAction)
-
getMessageRouter
public org.apache.pulsar.client.api.MessageRouter getMessageRouter()
Description copied from interface:ReactiveMessageSenderSpec
Gets the custom message router.- Specified by:
getMessageRouter
in interfaceReactiveMessageSenderSpec
- Returns:
- the message router
- See Also:
ProducerBuilder.messageRouter(org.apache.pulsar.client.api.MessageRouter)
-
getBatchingMaxPublishDelay
public java.time.Duration getBatchingMaxPublishDelay()
Description copied from interface:ReactiveMessageSenderSpec
Gets the time period within which the messages sent will be batched.- Specified by:
getBatchingMaxPublishDelay
in interfaceReactiveMessageSenderSpec
- Returns:
- the batch delay
- See Also:
ProducerBuilder.batchingMaxPublishDelay(long, java.util.concurrent.TimeUnit)
-
getRoundRobinRouterBatchingPartitionSwitchFrequency
public java.lang.Integer getRoundRobinRouterBatchingPartitionSwitchFrequency()
Description copied from interface:ReactiveMessageSenderSpec
Gets the partition switch frequency while batching of messages is enabled and using round-robin routing mode for non-keyed message.- Specified by:
getRoundRobinRouterBatchingPartitionSwitchFrequency
in interfaceReactiveMessageSenderSpec
- Returns:
- the frequency of partition switch
- See Also:
ProducerBuilder.roundRobinRouterBatchingPartitionSwitchFrequency(int)
-
getBatchingMaxMessages
public java.lang.Integer getBatchingMaxMessages()
Description copied from interface:ReactiveMessageSenderSpec
Gets the maximum number of messages permitted in a batch.- Specified by:
getBatchingMaxMessages
in interfaceReactiveMessageSenderSpec
- Returns:
- the maximum number of messages in a batch
- See Also:
ProducerBuilder.batchingMaxMessages(int)
-
getBatchingMaxBytes
public java.lang.Integer getBatchingMaxBytes()
Description copied from interface:ReactiveMessageSenderSpec
Gets the maximum number of bytes permitted in a batch.- Specified by:
getBatchingMaxBytes
in interfaceReactiveMessageSenderSpec
- Returns:
- the maximum bytes of messages in a batch
- See Also:
ProducerBuilder.batchingMaxBytes(int)
-
getBatchingEnabled
public java.lang.Boolean getBatchingEnabled()
Description copied from interface:ReactiveMessageSenderSpec
Gets whether automatic batching of messages is enabled for the producer.- Specified by:
getBatchingEnabled
in interfaceReactiveMessageSenderSpec
- Returns:
- true if batching is enabled
- See Also:
ProducerBuilder.enableBatching(boolean)
-
getBatcherBuilder
public org.apache.pulsar.client.api.BatcherBuilder getBatcherBuilder()
Description copied from interface:ReactiveMessageSenderSpec
Gets the batcher builder of the producer.- Specified by:
getBatcherBuilder
in interfaceReactiveMessageSenderSpec
- Returns:
- the batcher builder
- See Also:
ProducerBuilder.batcherBuilder(org.apache.pulsar.client.api.BatcherBuilder)
-
getChunkingEnabled
public java.lang.Boolean getChunkingEnabled()
Description copied from interface:ReactiveMessageSenderSpec
Gets whether chunking of messages is enabled.- Specified by:
getChunkingEnabled
in interfaceReactiveMessageSenderSpec
- Returns:
- true if message chunking is enabled
- See Also:
ProducerBuilder.enableChunking(boolean)
-
getCryptoKeyReader
public org.apache.pulsar.client.api.CryptoKeyReader getCryptoKeyReader()
Description copied from interface:ReactiveMessageSenderSpec
Gets the key reader to be used to encrypt the message payloads.- Specified by:
getCryptoKeyReader
in interfaceReactiveMessageSenderSpec
- Returns:
- the key reader to be used to encrypt the message payloads
- See Also:
ProducerBuilder.cryptoKeyReader(org.apache.pulsar.client.api.CryptoKeyReader)
-
getEncryptionKeys
public java.util.Set<java.lang.String> getEncryptionKeys()
Description copied from interface:ReactiveMessageSenderSpec
Gets the public encryption key names, used by producer to encrypt the data key.- Specified by:
getEncryptionKeys
in interfaceReactiveMessageSenderSpec
- Returns:
- the public encryption key names
- See Also:
ProducerBuilder.addEncryptionKey(java.lang.String)
-
getCompressionType
public org.apache.pulsar.client.api.CompressionType getCompressionType()
Description copied from interface:ReactiveMessageSenderSpec
Gets the compression type for the producer.- Specified by:
getCompressionType
in interfaceReactiveMessageSenderSpec
- Returns:
- the compression type
- See Also:
ProducerBuilder.compressionType(org.apache.pulsar.client.api.CompressionType)
-
getInitialSequenceId
public java.lang.Long getInitialSequenceId()
Description copied from interface:ReactiveMessageSenderSpec
Gets the baseline for the sequence ids for messages published by the producer.- Specified by:
getInitialSequenceId
in interfaceReactiveMessageSenderSpec
- Returns:
- the initial sequence id
- See Also:
ProducerBuilder.initialSequenceId(long)
-
getAutoUpdatePartitions
public java.lang.Boolean getAutoUpdatePartitions()
Description copied from interface:ReactiveMessageSenderSpec
Gets whether partitioned producer will automatically discover new partitions at runtime.- Specified by:
getAutoUpdatePartitions
in interfaceReactiveMessageSenderSpec
- Returns:
- true if auto discovery of the partition configuration changes is enabled
- See Also:
ProducerBuilder.autoUpdatePartitions(boolean)
-
getAutoUpdatePartitionsInterval
public java.time.Duration getAutoUpdatePartitionsInterval()
Description copied from interface:ReactiveMessageSenderSpec
Gets the interval of partitions updates if autoUpdatePartitions is enabled.- Specified by:
getAutoUpdatePartitionsInterval
in interfaceReactiveMessageSenderSpec
- Returns:
- the interval of partitions updates
- See Also:
ProducerBuilder.autoUpdatePartitionsInterval(int, java.util.concurrent.TimeUnit)
-
getMultiSchema
public java.lang.Boolean getMultiSchema()
Description copied from interface:ReactiveMessageSenderSpec
Gets whether the multiple schema mode is enabled.- Specified by:
getMultiSchema
in interfaceReactiveMessageSenderSpec
- Returns:
- true if the multiple schema mode is enabled
- See Also:
ProducerBuilder.enableMultiSchema(boolean)
-
getAccessMode
public org.apache.pulsar.client.api.ProducerAccessMode getAccessMode()
Description copied from interface:ReactiveMessageSenderSpec
Gets the type of access mode that the producer requires on the topic.- Specified by:
getAccessMode
in interfaceReactiveMessageSenderSpec
- Returns:
- the access mode
- See Also:
ProducerBuilder.accessMode(org.apache.pulsar.client.api.ProducerAccessMode)
-
getLazyStartPartitionedProducers
public java.lang.Boolean getLazyStartPartitionedProducers()
Description copied from interface:ReactiveMessageSenderSpec
Gets whether producers register and connect immediately to the owner broker of each partition or start lazily on demand.- Specified by:
getLazyStartPartitionedProducers
in interfaceReactiveMessageSenderSpec
- Returns:
- true if lazy starting of partitioned producers is enabled
- See Also:
ProducerBuilder.enableLazyStartPartitionedProducers(boolean)
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Description copied from interface:ReactiveMessageSenderSpec
Gets the properties of the producer.- Specified by:
getProperties
in interfaceReactiveMessageSenderSpec
- Returns:
- the properties of the producer
- See Also:
ProducerBuilder.properties(java.util.Map<java.lang.String, java.lang.String>)
-
-