-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bridge connection loops messages back forever #63
Comments
We've changed our IoT rules to also accept messages on a topic structure separate from the one being subscribed to. This is the resulting config:
With the config in the previous comment I expected a single loopback 100% of the time, but instead got infinite loopback some percentage of the time. With this new config, I don't expect any loopback, ever. I'm still seeing the same issue with infinite loopback. This tells me that the issue does not have anything to do with attempting to send and receive from the same topic structure, as sending to I was able to restart emqx a (seemingly) random number of times to get the issue to go away. Any thoughts on other config options that could be causing this? |
There is a problem with your configuration, causing the message to be sent in a loop
The emqx bridged messages will be sent to AWS IoT via some/topic/structure/cloud/# topic You configured again
|
Thanks for the response. Changing the configuration so that there isn't a loop, I still see this exact same issue. Ideally I'd be able to send/receive to the bridge on the same topic structure, but it isn't a deal breaker if this isn't possible. My config now contains:
Messages should be sent to AWS on I was able to find some more information while debugging as well:
Thus, the issue is not looping so much as sending too many messages quickly with AWS IoT causes some sort of bad state. |
Maybe it is retransmission.
|
I had initially thought the same. I'm not sure that we know definitively that qos2 is '1'. Since my latest config has the publish/subscribe topics completely disjoint, the '1' qos for subscribed topics should not effect which QoS published messages are sent out as. In my bash example above, I'm not sure what qos3 was during my testing. I would like to say that I tested with both 0 and 1, but I'm not 100% sure about that. |
I am also having the same problem. I have AWS IOT as broker and emqx bridge is to bridge devices using MQTT-SN protocol to send data to this emqx bridge. The same data comes back on each publish. I have to have MQTT based devices which are sending data to AWS IOT direectly which should reach to MQTT-SN based devices running behind emqx bridge. |
@mspoehr or @turtleDeng can you please help in resolving looping in case brigde is subscribing same topics as publishing? I am connecting bridge to AWS IOT endpoint. |
I really don't think this is a QoS issue. This issue occurs when using any combination of QoS values, even with all 0's, which should never cause this.
@saumilsdk I am not sure that this is possible with emqx in its current state. This issue seems like a bug in emqx to me. In my case, I was able to configure my publishing and bridge subscriptions to be completely disjoint, and I still received the same messages looped back forever. If you're not experiencing the messages being looped back forever, but instead just receiving the same message you publish one time-I would actually expect this behavior. |
@mspoehr Hi i agree with you if i get the same message twice but here I am stuck with looping forever and ended up restarting server every time. I can find no way out of this issue. Any help will be appreciated. Here is my bridge config. I am using EMQX-SN plugin to act as gateway and EMQX-BRIDGE to bridge the gateway to end AWS IOT broker. @qingchuwudi and @turtleDeng If you guys can also look into this.
|
@ saumilsdk I'm not sure if your use case will work with this, but you could try adding a
^ but this still didn't fix the issue for me. I could see in your case where emqx could loop back infinitely if you are bridging |
@mspoehr i had tried adding both the mount points but seems looping still happens and topic prefix also keeps getting added on the messages looped. As you know i am not running emqx broker and only emqx-sn and emqx-bridge i am running, what options do we have for these to disable looping?
|
Did you have solution for this issue? |
———
Maybe add prefix or suffix will avoid this problem . |
This looping error is occurring again. Message ar looping forever when published on same topic. |
I am using the emqx-bridge-mqtt plugin to bridge EMQX to an AWS IoT endpoint. Occasionally (seemly randomly, on emqx start) the connection will start spamming the same messages over and over via the bridge connection until the service is restarted again. It appears that this issue occurs roughly 25% of the time when emqx starts up.
I am using emqx version 4.0.5, with this plugin configured to be loaded on startup (via /var/lib/emqx/loaded_plugins) on Ubuntu Linux 18.04.
Below is an excerpt from the log when this issue occurs.
Those messages can be seen repeatedly with different identifiers and topics.
The following is the
emqx_bridge_mqtt.conf
being used:You may notice I am bridging both to and from
cloud/#
on the bridge connection. I would expect a single loopback of all bridged messages if any clients subscribe locally - and this does occur the 75% of the time where emqx is not spamming messages. Could this be causing the issue the other 25% of the time? Any config recommendations or is this a bug with emqx?The text was updated successfully, but these errors were encountered: