public static class ConsumerPolicy.Builder extends Object
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
ConsumerPolicy.Builder |
batchPolicy(BatchPolicy policy) |
ConsumerPolicy |
build() |
ConsumerPolicy.Builder |
continueOnFailure(boolean value)
Continue on next message even if the retry policy has failed.
|
ConsumerPolicy.Builder |
retryPolicy(net.jodah.failsafe.RetryPolicy policy) |
ConsumerPolicy.Builder |
salted()
Consumer will wait some random time before start, to prevent wave of concurency in batch processing.
|
ConsumerPolicy.Builder |
startOffset(ConsumerPolicy.StartOffset startOffset)
Where to read the first message.
|
ConsumerPolicy.Builder |
waitMessageForEver()
Consumer will wait for ever message.
|
ConsumerPolicy.Builder |
waitMessageTimeout(Duration duration)
Consumer will stop if there is no more message after this timeout.
|
protected Builder()
public ConsumerPolicy.Builder batchPolicy(BatchPolicy policy)
public ConsumerPolicy.Builder retryPolicy(net.jodah.failsafe.RetryPolicy policy)
public ConsumerPolicy.Builder continueOnFailure(boolean value)
public ConsumerPolicy.Builder waitMessageTimeout(Duration duration)
public ConsumerPolicy.Builder waitMessageForEver()
public ConsumerPolicy.Builder startOffset(ConsumerPolicy.StartOffset startOffset)
public ConsumerPolicy.Builder salted()
public ConsumerPolicy build()
Copyright © 2017 Nuxeo. All rights reserved.