类 ProducerBuilderImpl<T>
java.lang.Object
org.apache.pulsar.client.impl.ProducerBuilderImpl<T>
- 所有已实现的接口:
Cloneable,ProducerBuilder<T>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明accessMode(ProducerAccessMode accessMode) addEncryptionKey(String key) autoUpdatePartitions(boolean autoUpdate) autoUpdatePartitionsInterval(int interval, TimeUnit unit) batcherBuilder(BatcherBuilder batcherBuilder) batchingMaxBytes(int batchingMaxBytes) batchingMaxMessages(int batchMessagesMaxMessagesPerBatch) batchingMaxPublishDelay(long batchDelay, @NonNull TimeUnit timeUnit) blockIfQueueFull(boolean blockIfQueueFull) chunkMaxMessageSize(int chunkMaxMessageSize) clone()compressionType(@NonNull CompressionType compressionType) create()cryptoFailureAction(@NonNull ProducerCryptoFailureAction action) cryptoKeyReader(@NonNull CryptoKeyReader cryptoKeyReader) defaultCryptoKeyReader(@NonNull Map<String, String> publicKeys) defaultCryptoKeyReader(String publicKey) enableBatching(boolean batchMessagesEnabled) enableChunking(boolean chunkingEnabled) enableLazyStartPartitionedProducers(boolean lazyStartPartitionedProducers) enableMultiSchema(boolean multiSchema) hashingScheme(@NonNull HashingScheme hashingScheme) initialSequenceId(long initialSequenceId) initialSubscriptionName(String initialSubscriptionName) Use this config to automatically create an initial subscription when creating the topic.intercept(ProducerInterceptor... interceptors) intercept(ProducerInterceptor<T>... interceptors) 已过时。maxPendingMessages(int maxPendingMessages) maxPendingMessagesAcrossPartitions(int maxPendingMessagesAcrossPartitions) 已过时。messageCrypto(MessageCrypto messageCrypto) messageRouter(@NonNull MessageRouter messageRouter) messageRoutingMode(@NonNull MessageRoutingMode messageRouteMode) producerName(String producerName) properties(@NonNull Map<String, String> properties) roundRobinRouterBatchingPartitionSwitchFrequency(int frequency) Allow to override schema in builder implementation.sendTimeout(int sendTimeout, @NonNull TimeUnit unit) toString()
-
构造器详细资料
-
ProducerBuilderImpl
-
-
方法详细资料
-
schema
Allow to override schema in builder implementation.- 返回:
-
clone
- 指定者:
clone在接口中ProducerBuilder<T>- 覆盖:
clone在类中Object
-
create
- 指定者:
create在接口中ProducerBuilder<T>- 抛出:
PulsarClientException
-
createAsync
- 指定者:
createAsync在接口中ProducerBuilder<T>
-
loadConf
- 指定者:
loadConf在接口中ProducerBuilder<T>
-
topic
- 指定者:
topic在接口中ProducerBuilder<T>
-
producerName
- 指定者:
producerName在接口中ProducerBuilder<T>
-
sendTimeout
- 指定者:
sendTimeout在接口中ProducerBuilder<T>
-
maxPendingMessages
- 指定者:
maxPendingMessages在接口中ProducerBuilder<T>
-
maxPendingMessagesAcrossPartitions
@Deprecated public ProducerBuilder<T> maxPendingMessagesAcrossPartitions(int maxPendingMessagesAcrossPartitions) 已过时。- 指定者:
maxPendingMessagesAcrossPartitions在接口中ProducerBuilder<T>
-
accessMode
- 指定者:
accessMode在接口中ProducerBuilder<T>
-
blockIfQueueFull
- 指定者:
blockIfQueueFull在接口中ProducerBuilder<T>
-
messageRoutingMode
- 指定者:
messageRoutingMode在接口中ProducerBuilder<T>
-
compressionType
- 指定者:
compressionType在接口中ProducerBuilder<T>
-
hashingScheme
- 指定者:
hashingScheme在接口中ProducerBuilder<T>
-
messageRouter
- 指定者:
messageRouter在接口中ProducerBuilder<T>
-
enableBatching
- 指定者:
enableBatching在接口中ProducerBuilder<T>
-
enableChunking
- 指定者:
enableChunking在接口中ProducerBuilder<T>
-
chunkMaxMessageSize
- 指定者:
chunkMaxMessageSize在接口中ProducerBuilder<T>
-
cryptoKeyReader
- 指定者:
cryptoKeyReader在接口中ProducerBuilder<T>
-
defaultCryptoKeyReader
- 指定者:
defaultCryptoKeyReader在接口中ProducerBuilder<T>
-
defaultCryptoKeyReader
- 指定者:
defaultCryptoKeyReader在接口中ProducerBuilder<T>
-
messageCrypto
- 指定者:
messageCrypto在接口中ProducerBuilder<T>
-
addEncryptionKey
- 指定者:
addEncryptionKey在接口中ProducerBuilder<T>
-
cryptoFailureAction
- 指定者:
cryptoFailureAction在接口中ProducerBuilder<T>
-
batchingMaxPublishDelay
public ProducerBuilder<T> batchingMaxPublishDelay(long batchDelay, @NonNull @NonNull TimeUnit timeUnit) - 指定者:
batchingMaxPublishDelay在接口中ProducerBuilder<T>
-
roundRobinRouterBatchingPartitionSwitchFrequency
-
batchingMaxMessages
- 指定者:
batchingMaxMessages在接口中ProducerBuilder<T>
-
batchingMaxBytes
- 指定者:
batchingMaxBytes在接口中ProducerBuilder<T>
-
batcherBuilder
- 指定者:
batcherBuilder在接口中ProducerBuilder<T>
-
initialSequenceId
- 指定者:
initialSequenceId在接口中ProducerBuilder<T>
-
property
- 指定者:
property在接口中ProducerBuilder<T>
-
properties
- 指定者:
properties在接口中ProducerBuilder<T>
-
intercept
- 指定者:
intercept在接口中ProducerBuilder<T>
-
intercept
已过时。- 指定者:
intercept在接口中ProducerBuilder<T>
-
autoUpdatePartitions
- 指定者:
autoUpdatePartitions在接口中ProducerBuilder<T>
-
autoUpdatePartitionsInterval
- 指定者:
autoUpdatePartitionsInterval在接口中ProducerBuilder<T>
-
enableMultiSchema
- 指定者:
enableMultiSchema在接口中ProducerBuilder<T>
-
enableLazyStartPartitionedProducers
public ProducerBuilder<T> enableLazyStartPartitionedProducers(boolean lazyStartPartitionedProducers) - 指定者:
enableLazyStartPartitionedProducers在接口中ProducerBuilder<T>
-
initialSubscriptionName
Use this config to automatically create an initial subscription when creating the topic. If this field is not set, the initial subscription will not be created. If this field is set but the broker's `allowAutoSubscriptionCreation` is disabled, the producer will fail to be created. This method is limited to internal use. This method will only be used when the consumer creates the dlq producer.- 参数:
initialSubscriptionName- Name of the initial subscription of the topic.- 返回:
- the producer builder implementation instance
-
toString
-