layout: doc_page title: “Kafka Simple Consumer”

Kafka Simple Consumer

To use this Apache Druid (incubating) extension, make sure to include druid-kafka-eight-simpleConsumer extension.

Firehose

This is an experimental firehose to ingest data from Apache Kafka using the Kafka simple consumer api. Currently, this firehose would only work inside standalone realtime processes. The configuration for KafkaSimpleConsumerFirehose is similar to the Kafka Eight Firehose , except firehose should be replaced with firehoseV2 like this:

"firehoseV2": {
  "type" : "kafka-0.8-v2",
  "brokerList" :  ["localhost:4443"],
  "queueBufferLength":10001,
  "resetOffsetToEarliest":"true",
  "partitionIdList" : ["0"],
  "clientId" : "localclient",
  "feed": "wikipedia"
}
propertydescriptionrequired?
typekafka-0.8-v2yes
brokerListlist of the kafka brokersyes
queueBufferLengththe buffer length for kafka message queueno default(20000)
resetOffsetToEarliestin case of kafkaOffsetOutOfRange error happens, consumer should starts from the earliest or latest message availabletrue
partitionIdListlist of kafka partition idsyes
clientIdthe clientId for kafka SimpleConsumeryes
feedkafka topicyes

For using this firehose at scale and possibly in production, it is recommended to set replication factor to at least three, which means at least three Kafka brokers in the brokerList. For a 1*10^4 events per second kafka topic, keeping one partition can work properly, but more partitions could be added if higher throughput is required.