I am new to Internet Of things. I have pushed temperature data to mosquito server and successfully consumed all data. Now I want to push data from arduino to kafka server and consume from kafka. Is there any kafka library for arduino? What architecture will be suitable for scaling mqqt using apache kafka?
Thanks
Kafka uses a binary protocol over TCP. The protocol defines all APIs as request response message pairs. All messages are size delimited and are made up of the following primitive types.
Apache Kafka vs. MQTT. MQTT is an open standard for a publish/subscribe messaging protocol. Open source and commercial solutions provide implementations of different MQTT standard version. MQTT was built for IoT use cases, including constrained devices and unreliable networks.
Since Kafka is pull-based, it implements aggressive batching of data. Kafka like many pull based systems implements a long poll (SQS, Kafka both do). A long poll keeps a connection open after a request for a period and waits for a response.
You might wanna take a look at the below article for the architecture and scalability part of your design:
http://www.confluent.io/blog/stream-data-platform-1/
Not tying the answer to a particular language- but personally I find Kafka Library for Java is much more mature than the counterparts.
You could easily write a wrapper around the arduino library (http://mvnrepository.com/artifact/li.rudin.arduino/arduino-api), that collects the data as input and streams it real-time to Kafka as kafka-producer using the library (http://mvnrepository.com/artifact/org.apache.kafka/kafka_2.10).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With