8

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

user3313379
  • 459
  • 10
  • 21

2 Answers2

1

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).

Ajay Pal Singh
  • 682
  • 1
  • 5
  • 16
0

If you are using Arduino Yun to build your IoT application(s), yes!

Arduino Yun contains two processors, one of these processors runs OpenWRT linux distribution. You can simply port kafka to this OS and run kafka client to push data to apache kafka server.

I've done it myself. To do this, you simply have to access the Yun's root by doing ssh from the terminal.

Run

$ opkg install update

Download the kafka library written in Python (OpenWRT has Python already installed).

Run Python kafka script inside your OS as client. Make sure you have your Yun connected to the network. Poof! It is working now.

Fahad Siddiqui
  • 1,829
  • 1
  • 19
  • 41