# IoT gateway data to MQTT and then to KAFKA

**URL:** <https://discourse.nodered.org/t/iot-gateway-data-to-mqtt-and-then-to-kafka/46175>\
**Category:** General\
**Created:** [24 May 2021 19:23 UTC](https://discourse.nodered.org/t/iot-gateway-data-to-mqtt-and-then-to-kafka/46175 "2021-05-24T19:23:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![faiaz](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@faiaz](https://discourse.nodered.org/u/faiaz)\
**Post date:** [24 May 2021 19:23 UTC](https://discourse.nodered.org/t/iot-gateway-data-to-mqtt-and-then-to-kafka/46175/1 "2021-05-24T19:23:32Z")

</div>

Hi All  
I am first time here, and not a developer. I need help with a very basic flow  
I am successfully receiving data from IoT gateway via MQTT broker, i am able to filter and prepared dashboard with my data from BLE sensors.  
Now i want to publish data received at MQTT broker to Kafka bus  
I am using KAFKA manager, but somehow i am not able to publish the data to Kafka, its errors or invalid topic or randomly retrying.  
Kafka is also working fine as i can inject timestamp successfully and can consume also in Node-Red  
Issue is somehow with the data format i am writing to Kafka producer

will really appreciate some help

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [24 May 2021 20:09 UTC](https://discourse.nodered.org/t/iot-gateway-data-to-mqtt-and-then-to-kafka/46175/2 "2021-05-24T20:09:35Z")

</div>

Welcome to the forum!

While I'd love to give you an answer, you haven't given much to go on. Do you realize there are 15 nodes with KAFKA in the name?

When your looking for help it's a good idea to remember the person answering your question has no idea what type of device your node-red is running on, what version you are using, what nodes you are using, what the error you are getting and might not even know what Kafka is (which is true in my case).

So (incase someone else can help you ) please answer the following

1. what version of Node-RED and node.js are you using (see the startup log)
2. what Kafka node are you using (full name i.e. node-red-contrib-?????)
3. what device is NR running on? What os?
4. what error are you seeing?
5. where is the Kafka API documentation?
6. are you accessing an external Kafka service?

And it might be helpful to provide your flow. (in order to make code more readable and importable it is important to surround your code with three backticks  
`````  
`like this`  
`````

You can edit and correct your post by clicking the pencil icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506))

You might want to put a `catch` node connected to a `debug` node (set to display the complete msg object) on the tab with your flow, it might provide more information.

Hopefully with all that someone will be able to guide you to a solution.

---

<div class="post-metadata">

**Author:** ![faiaz](https://avatars.discourse-cdn.com/v4/letter/f/839c29/32.png) [@faiaz](https://discourse.nodered.org/u/faiaz)\
**Post date:** [25 May 2021 01:22 UTC](https://discourse.nodered.org/t/iot-gateway-data-to-mqtt-and-then-to-kafka/46175/3 "2021-05-25T01:22:10Z")

</div>

i was using kafka manager, and it was not accepting data  
i installed rdkafka and it works

thanks for your prompt detail response

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 July 2021 01:22 UTC](https://discourse.nodered.org/t/iot-gateway-data-to-mqtt-and-then-to-kafka/46175/4 "2021-07-24T01:22:29Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
