public class KafkaHighConsumer extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
KafkaHighConsumer.ConsumerTh
consumer thread running consume
|
| Modifier and Type | Field and Description |
|---|---|
static int |
QUEUE_SIZE |
static long |
SLEEPING_INTERVAL |
static int |
THREAD_COUNT |
| Constructor and Description |
|---|
KafkaHighConsumer(KafkaConf conf)
constructor with kafka conf
|
| Modifier and Type | Method and Description |
|---|---|
KafkaMsg |
consume()
consume a msg
|
List<KafkaMsg> |
consume(int num,
long timeout)
batch consume kafka
|
void |
start()
start the consumer client, start the thread pool to consume topic
|
void |
stop() |
public static final int QUEUE_SIZE
public static final long SLEEPING_INTERVAL
public static final int THREAD_COUNT
public KafkaHighConsumer(KafkaConf conf)
conf - Copyright © 2016. All rights reserved.