Skip to content

mxl-space/gr-kafka

Repository files navigation

GitHub last commit gnuradio License: GPL v3

gr-kafka

gr-kafka is an Out-Of-Tree (OOT) GNU Radio module providing a Kafka Sink block. It publishes incoming byte-stream packets to an Apache Kafka topic, making it easy to integrate real-time GNU Radio flows into distributed data pipelines.


Installation

Prerequisites

  • GNU Radio 3.10+
  • CMake ≥ 3.10
  • Python 3
  • confluent-kafka Python package
  • A running Kafka cluster (bootstrap server list)

Standard Installation

git clone https://github.com/mxl-space/gr-kafka.git
cd gr-kafka
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig

Installation in a Conda Environment

conda activate <ENV_NAME>
git clone https://github.com/mxl-space/gr-kafka.git
cd gr-kafka
mkdir build && cd build
cmake .. -DPYTHON_EXECUTABLE=$(which python) \\
    -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make
sudo make install
sudo ldconfig

Replace <ENV_NAME> with your Conda environment name.


Usage

Once installed, Kafka Sink will appear in your GNU Radio Companion (GRC) block library.

Parameters:

  • kafka_broker (string): Bootstrap server list, e.g. 192.168.0.1:9092,192.168.0.2:9092,192.168.0.3:9092
  • topic (string): Kafka topic name, e.g. packets

Example Flowgraph

Alt text

Configure the block’s kafka_broker and topic in the block properties, then run your flowgraph. Packets emitted by upstream blocks will be delivered to the specified Kafka topic, with each message carrying a timestamp_ms header (ms since epoch).


Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub if you encounter any bugs or have feature requests.


License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

About

GNU Radio OOT module with a Kafka Sink block for publishing to a Kafka topic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published