# Having problems with mqtt response

**URL:** <https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271>\
**Category:** General\
**Created:** [9 October 2024 15:34 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271 "2024-10-09T15:34:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [9 October 2024 15:34 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271/1 "2024-10-09T15:34:52Z")

</div>

Trying to get a simple mqtt subscribe-and-respond flow up. I can receive with mqtt-in from remote thingsboard server. But when I add mqtt-out (with same server config), both in & out disconnects when the message goes through. The mqtt is triggered by a rpc call in thingsboard, and it is set up with two-way-command, so it waits for a response and results in request timeout error.

Not sure if there are any restrictions or missing configurations in thingsboard for this to work, but regardless it seems strange that both in and out disconnects? Have tried with setting client id (shared for both in and out). Have tried making duplicate server config with different client id. Have tried leaving empty client id (auto-generated). So far no luck.

---

<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:** [9 October 2024 16:35 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271/3 "2024-10-09T16:35:08Z")

</div>

Export the two mqtt nodes here so we can see how they are configured.

---

<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:** [9 October 2024 17:53 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271/4 "2024-10-09T17:53:50Z")

</div>

> [@ThingsTinkerer](#):
>
> But when I add mqtt-out (with same server config)

Have you created 2 configs with the same clientid?

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [9 October 2024 19:56 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271/5 "2024-10-09T19:56:26Z")

</div>

Thanks for your interest! Tried lots of things. But found solution, for reference:

Change 'request' in incoming topic:

```auto
v1/devices/me/rpc/request/109

```

To 'response':

```auto
v1/devices/me/rpc/response/109

```

---

<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:** [9 October 2024 20:25 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271/6 "2024-10-09T20:25:56Z")

</div>

In that case I think you were either crashing node-red or crashing the broker.

---

<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:** [23 October 2024 20:26 UTC](https://discourse.nodered.org/t/having-problems-with-mqtt-response/92271/7 "2024-10-23T20:26:29Z")

</div>

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