faust93 / fluent-bit_kafka_input

re-work existing in_kafka to make it (great agin :) usable

Home Page:https://fluentbit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fluent Bit Kafka Input

More or less working kafka input plugin for Fluent Bit :)

Kafka input being promised for several years atm but nothing was done in that respect except from some recent half-assed PoC attempt Though in_kafka is included in current codebase it does not work for me, it's slow and crashes FB quite requently

FB included PoC implementation uses threads and has no queue/buffering so consuming speed is quite slow I rewrote it to use interval polling (flb_input_set_collector_time) instead of threads and added rudimentary queue/buffering

Building

$ git clone -b 1.9.9-in_kafka https://github.com/faust93/fluent-bit_kafka_input.git
$ cd fluent-bit_kafka_input/build
$ cmake3 .. -DFLB_OUT_KAFKA=On -DFLB_IN_KAFKA=On -DFLB_JEMALLOC=On
$ make

Config

...
[INPUT]
    Name               kafka
    brokers            localhost:9092
    topics             topic1,topic2,topic3
    Tag                kafka_input.*
    format             json
    rdkafka.group.id   fluentbit
    rdkafka.fetch.max.bytes  2024000
    Buffer_Chunk_Size  5MB
    Buffer_Size        128MB
    Mem_Buf_Limit      128MB

[FILTER]
    Name         nest
    Match        kafka_input.*
    Operation    lift
    Nested_under payload

[FILTER]
    Name       modify
    Match      kafka_input.*
    Remove     partition
    Remove     offset
    Remove     error
    Remove     key
...

About

re-work existing in_kafka to make it (great agin :) usable

https://fluentbit.io

License:Apache License 2.0


Languages

Language:C 82.3%Language:C++ 4.9%Language:Shell 4.8%Language:Makefile 1.6%Language:Python 1.3%Language:CMake 1.0%Language:M4 1.0%Language:Lua 0.9%Language:HTML 0.7%Language:Roff 0.6%Language:Perl 0.5%Language:Ruby 0.1%Language:JavaScript 0.1%Language:Dockerfile 0.1%Language:Batchfile 0.0%Language:Yacc 0.0%Language:CSS 0.0%Language:Java 0.0%Language:Lex 0.0%Language:BitBake 0.0%Language:GDB 0.0%Language:PowerShell 0.0%Language:Awk 0.0%Language:jq 0.0%Language:NASL 0.0%Language:sed 0.0%Language:XSLT 0.0%Language:SmPL 0.0%Language:Emacs Lisp 0.0%Language:PHP 0.0%Language:Tcl 0.0%