public abstract class KafkaQueueFactory<T extends KafkaQueue> extends AbstractQueueFactory<T>
KafkaQueue instances.| Modifier and Type | Field and Description |
|---|---|
static String |
SPEC_FIELD_BOOTSTRAP_SERVERS |
static String |
SPEC_FIELD_CONSUMER_GROUP_ID |
static String |
SPEC_FIELD_CONSUMER_PROPERTIES |
static String |
SPEC_FIELD_PRODUCER_PROPERTIES |
static String |
SPEC_FIELD_PRODUCER_TYPE |
static String |
SPEC_FIELD_TOPIC |
queueInstances| Constructor and Description |
|---|
KafkaQueueFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
disposeQueue(T queue) |
Properties |
getDefaultConsumerProps() |
Properties |
getDefaultProducerProps() |
com.github.ddth.kafka.KafkaClient.ProducerType |
getDefaultProducerType() |
protected void |
initQueue(T queue,
QueueSpec spec)
Initializes a newly created queue instance.
|
void |
setDefaultConsumerProps(Properties defaultConsumerProps) |
void |
setDefaultProducerProps(Properties defaultProducerProps) |
void |
setDefaultProducerType(com.github.ddth.kafka.KafkaClient.ProducerType defaultProducerType) |
createAndInitQueue, createQueueInstance, destroy, disposeQueue, getQueue, initpublic static final String SPEC_FIELD_CONSUMER_GROUP_ID
public static final String SPEC_FIELD_BOOTSTRAP_SERVERS
public static final String SPEC_FIELD_TOPIC
public static final String SPEC_FIELD_PRODUCER_TYPE
public static final String SPEC_FIELD_PRODUCER_PROPERTIES
public static final String SPEC_FIELD_CONSUMER_PROPERTIES
public com.github.ddth.kafka.KafkaClient.ProducerType getDefaultProducerType()
public void setDefaultProducerType(com.github.ddth.kafka.KafkaClient.ProducerType defaultProducerType)
public Properties getDefaultProducerProps()
public void setDefaultProducerProps(Properties defaultProducerProps)
public Properties getDefaultConsumerProps()
public void setDefaultConsumerProps(Properties defaultConsumerProps)
protected void initQueue(T queue, QueueSpec spec)
Called by AbstractQueueFactory.createAndInitQueue(QueueSpec). Sub-class may override
this method to implement its own business logic.
initQueue in class AbstractQueueFactory<T extends KafkaQueue>protected boolean disposeQueue(T queue)
disposeQueue in class AbstractQueueFactory<T extends KafkaQueue>Copyright © 2016 DDTH. All rights reserved.