Uses of Interface
org.apache.pulsar.client.api.ProducerBuilder
Packages that use ProducerBuilder
-
Uses of ProducerBuilder in org.apache.pulsar.client.api
Methods in org.apache.pulsar.client.api that return ProducerBuilderModifier and TypeMethodDescriptionProducerBuilder.accessMode
(ProducerAccessMode accessMode) Configure the type of access mode that the producer requires on the topic.ProducerBuilder.addEncryptionKey
(String key) Add public encryption key, used by producer to encrypt the data key.ProducerBuilder.autoUpdatePartitions
(boolean autoUpdate) If enabled, partitioned producer will automatically discover new partitions at runtime.ProducerBuilder.autoUpdatePartitionsInterval
(int interval, TimeUnit unit) Set the interval of updating partitions (default: 1 minute).ProducerBuilder.batcherBuilder
(BatcherBuilder batcherBuilder) Set the batcher builderBatcherBuilder
of the producer.ProducerBuilder.batchingMaxBytes
(int batchingMaxBytes) Set the maximum number of bytes permitted in a batch.ProducerBuilder.batchingMaxMessages
(int batchMessagesMaxMessagesPerBatch) Set the maximum number of messages permitted in a batch.ProducerBuilder.batchingMaxPublishDelay
(long batchDelay, TimeUnit timeUnit) Set the time period within which the messages sent will be batched default: 1 ms if batch messages are enabled.ProducerBuilder.blockIfQueueFull
(boolean blockIfQueueFull) Set whether theProducer.send(T)
andProducer.sendAsync(T)
operations should block when the outgoing message queue is full.ProducerBuilder.clone()
Create a copy of the currentProducerBuilder
.ProducerBuilder.compressionType
(CompressionType compressionType) Set the compression type for the producer.ProducerBuilder.cryptoFailureAction
(ProducerCryptoFailureAction action) Sets the ProducerCryptoFailureAction to the value specified.ProducerBuilder.cryptoKeyReader
(CryptoKeyReader cryptoKeyReader) Sets aCryptoKeyReader
.ProducerBuilder.defaultCryptoKeyReader
(String publicKey) Sets the default implementation ofCryptoKeyReader
.ProducerBuilder.defaultCryptoKeyReader
(Map<String, String> publicKeys) Sets the default implementation ofCryptoKeyReader
.ProducerBuilder.enableBatching
(boolean enableBatching) Control whether automatic batching of messages is enabled for the producer.ProducerBuilder.enableChunking
(boolean enableChunking) If message size is higher than allowed max publish-payload size by broker then enableChunking helps producer to split message into multiple chunks and publish them to broker separately and in order.ProducerBuilder.enableLazyStartPartitionedProducers
(boolean lazyStartPartitionedProducers) This config affects Shared mode producers of partitioned topics only.ProducerBuilder.enableMultiSchema
(boolean multiSchema) Control whether enable the multiple schema mode for producer.ProducerBuilder.hashingScheme
(HashingScheme hashingScheme) Change theHashingScheme
used to chose the partition on where to publish a particular message.ProducerBuilder.initialSequenceId
(long initialSequenceId) Set the baseline for the sequence ids for messages published by the producer.ProducerBuilder.intercept
(ProducerInterceptor... interceptors) Add a set ofProducerInterceptor
to the producer.ProducerBuilder.intercept
(ProducerInterceptor<T>... interceptors) Deprecated.Load the configuration from provided config map.ProducerBuilder.maxPendingMessages
(int maxPendingMessages) Set the max size of the queue holding the messages pending to receive an acknowledgment from the broker.ProducerBuilder.maxPendingMessagesAcrossPartitions
(int maxPendingMessagesAcrossPartitions) Deprecated.ProducerBuilder.messageRouter
(MessageRouter messageRouter) Set a custom message routing policy by passing an implementation of MessageRouter.ProducerBuilder.messageRoutingMode
(MessageRoutingMode messageRoutingMode) Set theMessageRoutingMode
for a partitioned producer.ProducerBuilder<byte[]>
PulsarClient.newProducer()
Create a producer builder that can be used to configure and construct a producer with defaultSchema.BYTES
.<T> ProducerBuilder<T>
PulsarClient.newProducer
(Schema<T> schema) Create a producer builder that can be used to configure and construct a producer with the specified schema.ProducerBuilder.producerName
(String producerName) Specify a name for the producer.ProducerBuilder.properties
(Map<String, String> properties) Add all the properties in the provided map to the producer.Set a name/value property with this producer.ProducerBuilder.roundRobinRouterBatchingPartitionSwitchFrequency
(int frequency) Set the partition switch frequency while batching of messages is enabled and using round-robin routing mode for non-keyed message default: 10.ProducerBuilder.sendTimeout
(int sendTimeout, TimeUnit unit) Set the send timeout (default: 30 seconds).Specify the topic this producer will be publishing on.