# Many-to-One modelling

**URL:** <https://discourse.nodered.org/t/many-to-one-modelling/54313>\
**Category:** General\
**Created:** [26 November 2021 08:31 UTC](https://discourse.nodered.org/t/many-to-one-modelling/54313 "2021-11-26T08:31:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scull06](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scull06/32/51595_2.png) [@scull06](https://discourse.nodered.org/u/scull06)\
**Post date:** [26 November 2021 08:31 UTC](https://discourse.nodered.org/t/many-to-one-modelling/54313/1 "2021-11-26T08:31:31Z")

</div>

Hi all,

I'm very new to Node-RED and I have a use case where many sensors (around 500) need to connected to a flow application in Node-RED.

- Is there a way of modelling this many-to-one relationship in the flow-graph?
- Is there any built-in support to differentiate the readings from different sensors coming into the graph?

Thanks.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 November 2021 08:34 UTC](https://discourse.nodered.org/t/many-to-one-modelling/54313/2 "2021-11-26T08:34:08Z")

</div>

It will depend entirely on how those sensors are connected. For example, if they are publishing their data via MQTT, then each would use a unique topic and you could have a single flow subscribed to all of those topics, using `msg.topic` to identify which device each individual reading came from.

---

<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:** [25 January 2022 08:34 UTC](https://discourse.nodered.org/t/many-to-one-modelling/54313/3 "2022-01-25T08:34:38Z")

</div>

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