# OPC UA multiple subscription

**URL:** <https://discourse.nodered.org/t/opc-ua-multiple-subscription/68633>\
**Category:** General\
**Tags:** opcua\
**Created:** [6 October 2022 09:24 UTC](https://discourse.nodered.org/t/opc-ua-multiple-subscription/68633 "2022-10-06T09:24:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [6 October 2022 09:46 UTC](https://discourse.nodered.org/t/opc-ua-multiple-subscription/68633/2 "2022-10-06T09:46:18Z")

</div>

First there is almost always a way to process without looping. Loops introduce risk to node-red (a run-away loop will crash node-red) - in simple terms, uninstall the loop node. If you ever need to "loop" an array, use the built in `split` and `join` nodes.

Next, there is multiple examples built in to `node-red-contrib-opcua `.

`CTRL-I` → examples → node-red-contrib-opcua

In particular `OPCUA-MULTI-SUB` and `OPCUA_READMULTIPLE`

I suspect you need to subscribe to multiple nodesids by sending a `msg.topic` = `multiple` and the `msg.payload` as...

```auto
[ 
  { "nodeId": "ns=1;s=NodeIdString1" },
  { "nodeId": "ns=1;s=NodeIdString2" },
  { "nodeId": "ns=1;s=NodeIdString3" }
]

```

---

_[View the full topic](https://discourse.nodered.org/t/opc-ua-multiple-subscription/68633)._
