public interface ProducerBuilder
Producer.| Modifier and Type | Interface and Description |
|---|---|
static class |
ProducerBuilder.RoutingType |
| Modifier and Type | Method and Description |
|---|---|
ProducerBuilder |
batchPublishingDelay(Duration batchPublishingDelay)
Period to send a batch of messages.
|
ProducerBuilder |
batchSize(int batchSize)
The maximum number of messages to accumulate before sending them to the broker.
|
Producer |
build()
Create the
Producer instance. |
ProducerBuilder |
compression(Compression compression) |
ProducerBuilder |
confirmTimeout(Duration timeout)
Time before the client calls the confirm callback to signal outstanding unconfirmed messages
timed out.
|
ProducerBuilder |
enqueueTimeout(Duration timeout)
Time before enqueueing of a message fail when the maximum number of unconfirmed is reached.
|
ProducerBuilder |
maxUnconfirmedMessages(int maxUnconfirmedMessages)
The maximum number of unconfirmed outbound messages.
|
ProducerBuilder |
name(String name)
The logical name of the producer.
|
ProducerBuilder |
routing(Function<Message,String> routingKeyExtractor,
ProducerBuilder.RoutingType routingType)
Routing strategy for super streams.
|
ProducerBuilder |
routing(Function<Message,String> routingKeyExtractor,
ProducerBuilder.RoutingType routingType,
ToIntFunction<String> hash)
Routing strategy for super streams.
|
ProducerBuilder |
stream(String stream)
The stream to send messages to.
|
ProducerBuilder |
subEntrySize(int subEntrySize)
The number of messages to put in a sub-entry of a publish frame.
|
ProducerBuilder name(String name)
Set a value to enable de-duplication.
name - ProducerBuilder stream(String stream)
stream - ProducerBuilder subEntrySize(int subEntrySize)
The default is 1 (no sub-entry batching).
subEntrySize - ProducerBuilder compression(Compression compression)
ProducerBuilder batchSize(int batchSize)
Default is 100.
batchSize - ProducerBuilder batchPublishingDelay(Duration batchPublishingDelay)
Default is 100 ms.
batchPublishingDelay - ProducerBuilder maxUnconfirmedMessages(int maxUnconfirmedMessages)
Producer.send(Message, ConfirmationHandler) will start blocking when the limit is
reached.
Default is 10,000.
maxUnconfirmedMessages - ProducerBuilder confirmTimeout(Duration timeout)
Default is 30 seconds.
timeout - ProducerBuilder enqueueTimeout(Duration timeout)
Default is 10 seconds.
Set the value to Duration.ZERO if there should be no timeout.
timeout - ProducerBuilder routing(Function<Message,String> routingKeyExtractor, ProducerBuilder.RoutingType routingType)
routingKeyExtractor - routingType - ProducerBuilder routing(Function<Message,String> routingKeyExtractor, ProducerBuilder.RoutingType routingType, ToIntFunction<String> hash)
routingKeyExtractor - routingType - hash - Copyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.