public class ConsumerRunner<M extends Message> extends Object implements Callable<ConsumerStatus>, MQRebalanceListener
Modifier and Type | Field and Description |
---|---|
protected com.codahale.metrics.Timer |
acceptTimer |
protected com.codahale.metrics.Timer |
batchCommitTimer |
protected com.codahale.metrics.Counter |
batchFailureCount |
protected com.codahale.metrics.Counter |
committedCounter |
protected com.codahale.metrics.Counter |
consumersCount |
static String |
NUXEO_METRICS_REGISTRY_NAME |
protected com.codahale.metrics.MetricRegistry |
registry |
Constructor and Description |
---|
ConsumerRunner(ConsumerFactory<M> factory,
ConsumerPolicy policy,
MQManager<M> manager,
List<MQPartition> defaultAssignments) |
Modifier and Type | Method and Description |
---|---|
ConsumerStatus |
call() |
void |
onPartitionsAssigned(Collection<MQPartition> partitions) |
void |
onPartitionsRevoked(Collection<MQPartition> partitions) |
public static final String NUXEO_METRICS_REGISTRY_NAME
protected final com.codahale.metrics.MetricRegistry registry
protected com.codahale.metrics.Timer acceptTimer
protected com.codahale.metrics.Counter committedCounter
protected com.codahale.metrics.Timer batchCommitTimer
protected com.codahale.metrics.Counter batchFailureCount
protected com.codahale.metrics.Counter consumersCount
public ConsumerRunner(ConsumerFactory<M> factory, ConsumerPolicy policy, MQManager<M> manager, List<MQPartition> defaultAssignments)
public ConsumerStatus call() throws Exception
call
in interface Callable<ConsumerStatus>
Exception
public void onPartitionsRevoked(Collection<MQPartition> partitions)
onPartitionsRevoked
in interface MQRebalanceListener
public void onPartitionsAssigned(Collection<MQPartition> partitions)
onPartitionsAssigned
in interface MQRebalanceListener
Copyright © 2017 Nuxeo. All rights reserved.