# Outgoing message passing problem

**URL:** <https://discourse.nodered.org/t/outgoing-message-passing-problem/34032>\
**Category:** General\
**Created:** [10 October 2020 05:58 UTC](https://discourse.nodered.org/t/outgoing-message-passing-problem/34032 "2020-10-10T05:58:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdalee](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdalee/32/18818_2.png) [@sdalee](https://discourse.nodered.org/u/sdalee)\
**Post date:** [10 October 2020 05:58 UTC](https://discourse.nodered.org/t/outgoing-message-passing-problem/34032/1 "2020-10-10T05:58:28Z")

</div>

Hi

I have the following node red nodes:

| node1 out 1 |----------| node2 |----------| node3 |----------| mqtt out1 |  
| node1 out 2 | ---------| dynamic mqtt in 2 |

('node 1' has two outputs)

* * *

| mqtt in1 |.---- | some nodes |-----| mqtt out 2 |

* * *

The process start with 'node 1' (with two output). The topic of 'dynamic mqtt in 2' node is set by the 2'nd output of 'node 1'  
There are some nodes and mqtt message transfer before the 'dynamic mqtt in 2' node get mqtt message, but how can I be sure to program the topic of 'dynamic mqtt in 2' node first and be sure to get a message only after that?  
Certainly, I can put a big delay after 1'st output of 'node 1', but there can be no delay in the process.

Generalizing the question:  
It may be influenced in some way that the message of 2'nd output of 'node 1' is transmitted first?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 October 2020 06:16 UTC](https://discourse.nodered.org/t/outgoing-message-passing-problem/34032/2 "2020-10-10T06:16:43Z")

</div>

What is a dynamic mqtt in node?

---

<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:** [10 October 2020 07:03 UTC](https://discourse.nodered.org/t/outgoing-message-passing-problem/34032/3 "2020-10-10T07:03:55Z")

</div>

Not knowing what ‘node 1’ is, if possible why not swap the outputs? Saw it is a function node, remorse the order of msgs in the return statement

---

<div class="post-metadata">

**Author:** ![sdalee](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdalee/32/18818_2.png) [@sdalee](https://discourse.nodered.org/u/sdalee)\
**Post date:** [10 October 2020 08:17 UTC](https://discourse.nodered.org/t/outgoing-message-passing-problem/34032/4 "2020-10-10T08:17:45Z")

</div>

Yes, you are right, I swap the outputs.

Thank you for your help.

---

<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 October 2020 08:17 UTC](https://discourse.nodered.org/t/outgoing-message-passing-problem/34032/5 "2020-10-24T08:17:56Z")

</div>

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