Open whitedr opened 9 years ago
I know more is needed for this (like testing...), but this is the beginnings of a kafka input/output plugin. This is using https://github.com/SOHU-Co/kafka-node/ and the HighLevelProducer/HighLevelConsumer interfaces to produce/consume messages to kafka topics. On the output side, I also created a kafka_river output that is the same as the kafka output but formats the messages published to kafka with an JSON envelope that can be indexed into ElasticSearch with the https://github.com/clippPR/elasticsearch-river-kafka ES river. An example of this JSON envelope structure can be seen here: https://github.com/clippPR/elasticsearch-river-kafka/blob/master/src/main/java/org/elasticsearch/river/kafka/JsonMessageHandler.java#L35
kafka_river
kafka
One thing I wasn't completely sure of was whether to have the kafka_river as a separate output type or have it be a filter. I ended up following the example of the output_elasticsearch_zeromq.
output_elasticsearch_zeromq
Can you add documentation for this great plugin ?
I know more is needed for this (like testing...), but this is the beginnings of a kafka input/output plugin. This is using https://github.com/SOHU-Co/kafka-node/ and the HighLevelProducer/HighLevelConsumer interfaces to produce/consume messages to kafka topics. On the output side, I also created a
kafka_river
output that is the same as thekafka
output but formats the messages published to kafka with an JSON envelope that can be indexed into ElasticSearch with the https://github.com/clippPR/elasticsearch-river-kafka ES river. An example of this JSON envelope structure can be seen here: https://github.com/clippPR/elasticsearch-river-kafka/blob/master/src/main/java/org/elasticsearch/river/kafka/JsonMessageHandler.java#L35One thing I wasn't completely sure of was whether to have the
kafka_river
as a separate output type or have it be a filter. I ended up following the example of theoutput_elasticsearch_zeromq
.