install gcc
sudo apt-get install gcc
install librdkafka
sudo apt-get install librdkafka
install pkg-config
sudo apt-get install pkg-config
install glib
sudo apt-get install -y libglib2.0-dev
create a new Makefile
create a common c file will be usded by producer and consumer common.c
rename config file getting_started-template.ini to getting_started.ini
replace below values with yours:
- bootstrap.servers
- CLUSTER API KEY
- cluster API SECRET
create a producer file producer.c
create a consumer file consumer.c
Compile producer file
make producer
Run producer program with config file
./producer getting-started.ini
Compile consumer file
make consumer
Run consumer program with config file
./consumer getting-started.ini