-
Notifications
You must be signed in to change notification settings - Fork 69
MQTT Last Will not retaining messages #74
Comments
What version of RabbitMQ is used? What's in log files? |
RabbitMQ status:
Logs show nothing too interesting I guess:
|
OK, that's enough information to investigate, thanks for the code sample. |
There is another log, |
Nope, I checked and there were no updates at all when interacting with it during the tests. If you need anything else just say. Cheers! |
Hey @michaelklishin any news about the status of this ticket? Thanks |
@francisco-elements no update. This issue is not a high priority at the moment. |
Ok @michaelklishin thanks for the response, we'll keep on waiting until that moment arrives while it's not a blocking issue for us. Please keep us updated if there are any news about this. |
HI @francisco-elements i am getting same issue, how to fix this issue |
Hey @pavi32 we're still waiting... for now we set up a continuous listener all the time and an API call that returns the last known status of the machines. We're still hoping this will get attention as it is definitely a bug in the platform. |
+1 Same for me. I wasn't able to get retain working for the will message. Any update on this? @michaelklishin By the way, thanks for the great work with RabbitMQ and especially with the MQTT plugin. We're loving it so far. |
Hi, I'm also faced with his issue. What I found was that with a regular published message, a retained message is send to the retainer in "rabbit_mqtt_processor.erl" on lines 190-193:
However, when a LWT is published, the "retained" flag is not checked and will not be stored to the retainer. So hopefully adding the above 4 lines around line 458 of "rabbit_mqtt_processor.erl" will solve the problem. Again, not familiar with Erlang, just trying to speed up solving this issue. |
@FrankAdesys thanks. It does make sense (at least without looking at the code) :) |
@devops-github Would you be interested in running your test against a patched version of RabbitMQ that contains the fix for the retained last will (using RabbitMQ generic Unix package)? |
@acogoluegnes yes sure I'd be glad to try it! How can I get it? Edit: it was me who posted under the devops-github account ;) |
@chescales you can get 3.6.7 Milestone 2 binary builds from GitHub. |
@michaelklishin @acogoluegnes works like a charm, thanks! Do you know when approximately could 3.6.7 be released? |
@chescales should be this month. |
Ok awesome, again thanks for the great work. |
Hello, first of all thanks for maintaining such a great tool to all the people involved in the project. I've been using it for a while and has helped a lot in my previous projects.
I believe I found an issue with the MQTT adapter's ability to retain Last Will messages. What I am trying to achieve is a "last_status" channel for IoT. Devices post an "Online" message whenever they connect including some useful info, with retained=True, and they set an "Offline" Last Will in case they disconnect, also with retained=True.
I haven't been able to make that work. I've went through RabbitMQ config, I've made queues durable, went through MQTT adapter config, and it never happened. Only the published messages with retain=True are retained, but not last wills with retain=True.
I then tried with another MQTT broker and it worked. Here are the steps to reproduce the bug. I am using Python with PAHO MQTT client.
This works properly, and first sends the "Online" message, and afterwards the "Offline" message. In another listener I see this messages:
When I restart the listener, I receive the following retained message:
If I change the broker to a sample broker from Eclipse:
The next time I restart the listener I receive:
Any ideas of what can be wrong in my setup? Or is it definitely a bug?
Thanks in advance,
Chesco.
The text was updated successfully, but these errors were encountered: