This server places a HTTP server in front of Kafka to allow the client to quickly post via a RESTful interface.
-
BOOST 1.55+
-
CLang 3.4+
mkdir build
cd build
cmake ..
make all
./http-to-kafka {config file}
The configuration is stored in the config.json file and looks like:
{
"address": "0.0.0.0",
"port": "8084",
"kafka-brokers": "localhost:9092",
"topics": ["topic1", "topic2"]
}
Where address is the server address, port is the server port, kafka-brokers are the Kafka brokers that this service connects to and topics are the permitted topics that this service may publish to. Once configured and running you can simply post to the server topics like:
POST http://0.0.0.0:8084/topic1
POST http://0.0.0.0:8084/topic2
The REST interface expects a POST request. The body will be the body of your Kafka message.
MIT
https://registry.hub.docker.com/u/bowlofstew/http-to-kafka
Stewart Henderson<[email protected]>