public abstract class BaseConsumer<K,V> extends Janitor.ManagedCloseable implements Consumer<K,V>
| Constructor and Description |
|---|
BaseConsumer(BaseMessageSource<K,V> messageSource,
Processor<K,V> processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the consumer.
|
ConsumeFailedException |
consumeLoop() |
BaseConsumerConfig<K,V> |
getConfig()
Get the configuration for this consumer
|
ConsumeFailedException |
getConsumeResult()
Returns the result of the background consume task.
|
boolean |
isConsuming()
Indicated whether the consumer is still consuming, might return ConsumeFailedException if no
longer consuming because of an error
|
java.util.concurrent.Future<ConsumeFailedException> |
startConsuming()
This method starts the actual consumeThreadRunning, it can be stopped by calling
stopconsuming()
|
ConsumeFailedException |
stopConsuming()
Stops consuming and disconnects
|
public BaseConsumerConfig<K,V> getConfig()
Consumerpublic java.util.concurrent.Future<ConsumeFailedException> startConsuming()
startConsuming in interface Consumer<K,V>public ConsumeFailedException stopConsuming()
ConsumerstopConsuming in interface Consumer<K,V>public boolean isConsuming()
ConsumerisConsuming in interface Consumer<K,V>public ConsumeFailedException getConsumeResult()
ConsumergetConsumeResult in interface Consumer<K,V>public ConsumeFailedException consumeLoop()
public void close()
ConsumerCopyright © 2020–2021 Axual B.V.. All rights reserved.