# Sending data to Kafka from devices (e.g. Raspberry Pi, Tinkerboard)

**URL:** <https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146>\
**Category:** Clients\
**Created:** [7 March 2021 12:52 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146 "2021-03-07T12:52:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![accat](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@accat](https://forum.confluent.io/u/accat)\
**Post date:** [7 March 2021 12:52 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/1 "2021-03-07T12:52:42Z")

</div>

Hello everyone,  
I followed this beautiful guide to install kafka on GCP:

> **[Setting up your first Apache Kafka development environment in Google Cloud in...](https://medium.com/@alipazaga07/setting-up-your-first-apache-kafka-development-environment-in-google-cloud-in-15-minutes-ffdb1623e125)**
>
> Here I am writing my first post, I posponed it for a long time… In this article I would like to share my experience installing and testing…

I have followed all the steps and everything works fine. I was wondering: I have a lot of devices around the world that would like to send data to Kafka on my GCP. How can I do it? does it make sense to use Kafka in this way?

Thanks

---

<div class="post-metadata">

**Author:** ![gianlucanatali](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/gianlucanatali/32/302_2.png) [@gianlucanatali](https://forum.confluent.io/u/gianlucanatali)\
**Post date:** [7 March 2021 13:37 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/2 "2021-03-07T13:37:02Z")

</div>

Hi @accat , welcome to the forum! This is a very interesting topic, general answer is: yes, it is possible and many companies do that. The how, really depends on your use case. I can point you to some blog posts that will be able to give you an overview way better than I could in this message 🙂 Feel free to come back here and add more details for your use-case and let us know if this info was useful!

- [IoT Integration with Kafka Connect, REST / HTTP, MQTT, OPC-UA – Lightboard Video](https://www.kai-waehner.de/blog/2019/07/26/iot-integration-apache-kafka-rest-http-mqtt-opcua-lightboard-video/)
- [Use Cases and Architectures for Kafka at the Edge](https://www.kai-waehner.de/blog/2020/10/14/use-cases-architectures-apache-kafka-edge-computing-industrial-iot-retail-store-cell-tower-train-factory/). This could be interesting if you also want to run kafka at the edge .

---

<div class="post-metadata">

**Author:** ![accat](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@accat](https://forum.confluent.io/u/accat)\
**Post date:** [13 March 2021 10:17 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/3 "2021-03-13T10:17:57Z")

</div>

They are truly “theoretical” posts, I was looking for something more practical with examples of sending data from devices in the field to Kafka

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [13 March 2021 12:54 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/4 "2021-03-13T12:54:02Z")

</div>

What kind of devices? Practically you’d probably end up using MQTT or maybe HTTP, both of which are supported in the Kafka ecosystem. If you can give us more specifics to go on we can help you better 🙂

---

<div class="post-metadata">

**Author:** ![accat](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@accat](https://forum.confluent.io/u/accat)\
**Post date:** [13 March 2021 13:18 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/5 "2021-03-13T13:18:35Z")

</div>

@rmoff I use Raspberry and TinkerBoard with NodeJS or Python environment.  
Yes, with MQTT or HTTP protocol. How can I send data from these devices to Kafka deployed on my GCP?

---

<div class="post-metadata">

**Author:** ![gianlucanatali](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/gianlucanatali/32/302_2.png) [@gianlucanatali](https://forum.confluent.io/u/gianlucanatali)\
**Post date:** [16 March 2021 08:47 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/6 "2021-03-16T08:47:08Z")

</div>

Hi @accat , then maybe this example could be interesting?

- If you want to try Confluent Cloud, there is a [full set of clients examples](https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/clients-all-examples.html) ready to use, Including a [Python example](https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/python.html#client-examples-python)

Some more sophisticated demos using specific MQTT technologies

- [Streaming Machine Learning at Scale from 100000 IoT Devices with HiveMQ, Apache Kafka and TensorFLow](https://github.com/kaiwaehner/hivemq-mqtt-tensorflow-kafka-realtime-iot-machine-learning-training-inference)

- You can use Confluent [MQTT Proxy](https://docs.confluent.io/platform/current/kafka-mqtt/index.html), see [tutorial](https://docs.confluent.io/platform/current/kafka-mqtt/intro.html)

- this can be another interesting example, using [waterstream.io](https://waterstream.io/): [Waterstream Fleet Demo](https://github.com/simplematter/waterstream-fleet-demo). [Blog post](https://www.confluent.io/blog/iot-streaming-use-cases-with-kafka-mqtt-confluent-and-waterstream/) if you are interested in higher level architecture

---

<div class="post-metadata">

**Author:** ![accat](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@accat](https://forum.confluent.io/u/accat)\
**Post date:** [16 March 2021 09:18 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/7 "2021-03-16T09:18:40Z")

</div>

With MQTT proxy can I send data from a remote device (for example a Raspberry somewhere in the world) to a Kafka cluster installed on **my** GCP?  
Thanks

---

<div class="post-metadata">

**Author:** ![gianlucanatali](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/gianlucanatali/32/302_2.png) [@gianlucanatali](https://forum.confluent.io/u/gianlucanatali)\
**Post date:** [16 March 2021 09:29 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/8 "2021-03-16T09:29:04Z")

</div>

Sure. Probably you will install the proxy somewhere reachable from you devices, and the proxy should have access to Kafka too. Proxy will receive MQTT from your devices and produce to Kafka using the producer API.

---

<div class="post-metadata">

**Author:** ![accat](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@accat](https://forum.confluent.io/u/accat)\
**Post date:** [16 March 2021 09:49 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/9 "2021-03-16T09:49:46Z")

</div>

I’ll try and I’ll give you a feedback!

---

<div class="post-metadata">

**Author:** ![accat](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@accat](https://forum.confluent.io/u/accat)\
**Post date:** [20 March 2021 10:34 UTC](https://forum.confluent.io/t/sending-data-to-kafka-from-devices-e-g-raspberry-pi-tinkerboard/1146/10 "2021-03-20T10:34:20Z")

</div>

I finally found the time to try something.  
But I don’t understand one thing.  
Reading this guide I should have an MQTT Proxy that I don’t actually have inside Kafka …  
How do i install it?  
Thanks
