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.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 messages sent will be batched 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.chunkMaxMessageSize
(int chunkMaxMessageSize) Max chunk-message size in bytes.ProducerBuilder.clone()
Create a copy of the currentProducerBuilder
.ProducerBuilder.compressionType
(CompressionType compressionType) Set the compression type for the producer.ProducerBuilder.cryptoFailureAction
(ProducerCryptoFailureAction action) Set 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) Set automatic batching of messages for the producer.ProducerBuilder.enableChunking
(boolean enableChunking) If a message's size is higher than the broker's allowed max publish-payload size, enableChunking allows the producer to split the message into multiple chunks and publish it to the broker separately and in order.ProducerBuilder.enableLazyStartPartitionedProducers
(boolean lazyStartPartitionedProducers) This config affects Shared mode producers of partitioned topics only.ProducerBuilder.enableMultiSchema
(boolean multiSchema) Set the multiple schema mode for producer.ProducerBuilder.hashingScheme
(HashingScheme hashingScheme) Change theHashingScheme
used to choose the partition on which to publish a particular message.ProducerBuilder.initialSequenceId
(long initialSequenceId) Set the baseline for 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.messageCrypto
(MessageCrypto messageCrypto) Sets aMessageCrypto
.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 for 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 messages.ProducerBuilder.sendTimeout
(int sendTimeout, TimeUnit unit) Set the send timeout (default: 30 seconds).Specify the topic this producer will be publishing on.