public static class OnapMsgRouterBatchPublisher.Builder extends Object
| Constructor and Description |
|---|
Builder()
Construct a batch publisher builder.
|
| Modifier and Type | Method and Description |
|---|---|
OnapMsgRouterBatchPublisher.Builder |
batchAtMost(int atMost)
specify how many messages to hold for a batch
|
OnapMsgRouterBatchPublisher.Builder |
batchMaxAgeMs(int maxAgeMs)
specify how long to wait for messages to join a batch
|
OnapMsgRouterBatchPublisher |
build()
Build the batching publisher
|
OnapMsgRouterBatchPublisher.Builder |
logTo(org.slf4j.Logger log)
Specify the log to use.
|
OnapMsgRouterBatchPublisher.Builder |
retryAfterMs(int retryWaitMs)
specify how long to wait before retrying when the MR call results in an error
|
OnapMsgRouterBatchPublisher.Builder |
usingPublisher(OnapMsgRouterPublisher pub)
Specify the publisher to use for sends.
|
OnapMsgRouterBatchPublisher.Builder |
withMaxPendingCount(int maxPending,
OnapMsgRouterBatchPublisher.DropPolicy dropPolicy) |
public OnapMsgRouterBatchPublisher.Builder usingPublisher(OnapMsgRouterPublisher pub)
pub - a publisher to use for batched sendspublic OnapMsgRouterBatchPublisher.Builder logTo(org.slf4j.Logger log)
log - the slf4j logger to use for this library. Do not pass null.public OnapMsgRouterBatchPublisher.Builder batchAtMost(int atMost)
atMost - the limit on the number of messages to batch before sendingpublic OnapMsgRouterBatchPublisher.Builder batchMaxAgeMs(int maxAgeMs)
maxAgeMs - the limit, in milliseconds, on how long to wait before sending a batchpublic OnapMsgRouterBatchPublisher.Builder withMaxPendingCount(int maxPending, OnapMsgRouterBatchPublisher.DropPolicy dropPolicy)
public OnapMsgRouterBatchPublisher.Builder retryAfterMs(int retryWaitMs)
retryWaitMs - the time, in millis, to wait before retrying a failed batch sendpublic OnapMsgRouterBatchPublisher build()
Copyright © 2024 continual.io. All rights reserved.