clp icon indicating copy to clipboard operation
clp copied to clipboard

[WIP] Add support for ingesting logs from Kafka

Open gibber9809 opened this issue 5 months ago • 1 comments

Description

This PR adds support for ingesting log data from Kafka by integrating with the librdkafka C library. A user specifies the Kafka topic they want to consume from, the partition, the starting offset, and the number of Kafka messages they would like to consume on the command line. Users must also specify a path to a config file containing configuration options for kafka such as the list of bootstrapping brokers to connect to.

This configuration file is written in YAML, and may look something like:

kafka:
  boostrap.servers: "localhost:9092,localhost:9093"
  debug: "all"

and accepts any configuration option from the global configuration properties here.

The debug option enables internal debug logging from the librdkafka library, and is useful for diagnosing connection issues with Kafka.

Note that while this config file can be used for simple userid/password authentication it can't handle more advanced authentication flows. If we need to support some of the more advanced security options like authenticating with an OAUTH provider it seems like librdkafka requires us to implement some callback functions to reach out to an OAUTH broker on our own.

This PR is marked WIP since the end to end flow of ingesting logs from Kafka has not been fully validated.

Validation performed

  • Validated that process exits without hanging when the Kafka broker can not be reached

gibber9809 avatar Sep 27 '24 13:09 gibber9809