public class ConsumerPolicy extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConsumerPolicy.StartOffset |
Modifier and Type | Field and Description |
---|---|
protected BatchPolicy |
batchPolicy |
static ConsumerPolicy |
BOUNDED
Consumer policy that stop on starvation and failure.
|
static ConsumerPolicy |
BOUNDED_RETRY |
static String |
DEFAULT_NAME |
protected short |
maxThreads |
protected String |
name |
static net.jodah.failsafe.RetryPolicy |
NO_RETRY |
protected net.jodah.failsafe.RetryPolicy |
retryPolicy |
protected boolean |
salted |
protected boolean |
skipFailure |
protected ConsumerPolicy.StartOffset |
startOffset |
static ConsumerPolicy |
UNBOUNDED
Consumer policy that wait for ever for new message and skip failure.
|
static ConsumerPolicy |
UNBOUNDED_RETRY |
protected Duration |
waitMessageTimeout |
Constructor and Description |
---|
ConsumerPolicy(ConsumerPolicyBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static ConsumerPolicyBuilder |
builder() |
boolean |
continueOnFailure() |
BatchPolicy |
getBatchPolicy() |
short |
getMaxThreads() |
String |
getName() |
net.jodah.failsafe.RetryPolicy |
getRetryPolicy() |
ConsumerPolicy.StartOffset |
getStartOffset() |
Duration |
getWaitMessageTimeout() |
boolean |
isSalted() |
String |
toString() |
public static final String DEFAULT_NAME
public static final net.jodah.failsafe.RetryPolicy NO_RETRY
public static final ConsumerPolicy BOUNDED
public static final ConsumerPolicy BOUNDED_RETRY
public static final ConsumerPolicy UNBOUNDED
public static final ConsumerPolicy UNBOUNDED_RETRY
protected final BatchPolicy batchPolicy
protected final net.jodah.failsafe.RetryPolicy retryPolicy
protected final boolean skipFailure
protected final Duration waitMessageTimeout
protected final ConsumerPolicy.StartOffset startOffset
protected final boolean salted
protected final short maxThreads
public ConsumerPolicy(ConsumerPolicyBuilder builder)
public BatchPolicy getBatchPolicy()
public net.jodah.failsafe.RetryPolicy getRetryPolicy()
public boolean continueOnFailure()
public Duration getWaitMessageTimeout()
public ConsumerPolicy.StartOffset getStartOffset()
public boolean isSalted()
public short getMaxThreads()
public static ConsumerPolicyBuilder builder()
Copyright © 2019 Nuxeo. All rights reserved.