rabbitmq / rabbitmq-web-mqtt

Provides support for MQTT over WebSockets
Other
55 stars 16 forks source link

not support last will message #23

Closed alexlee85 closed 7 years ago

alexlee85 commented 7 years ago

I've tested with mqtt.js and paho mqttws.js, both of them can't trigger last will message when client disconnect.

RabbitMQ 3.6.11, Erlang 20.0

michaelklishin commented 7 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes two things:

  1. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team)
  2. We have a certain amount of information to work with

We get at least a dozen of questions through various venues every single day, often quite light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions of potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.

Getting all the details necessary to reproduce an issue, make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing a way to reproduce the behavior you're observing, or at least sharing as much relevant information as possible on the list:

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have enough details and evidence we'd be happy to file a new issue.

Thank you.

michaelklishin commented 7 years ago

MQTT plugin does support Last Will and Testament, so should this plugin because it is pretty much a small proxy. Please start a rabbitmq-users thread and provide a script that can be used to reproduce.

bh4r4th commented 5 years ago

@michaelklishin That's what wondering me too. Last will and testament using rabbit_mqtt plugin is working fine but failing on with the rabbitmq-web-mqtt plugin.

I tried docker base images: rabbitmq:3.7.8-management rabbitmq:3.7.8-management-alpine

This is a popular issue for many and couldn't find anyone actually resolved this in any way.

michaelklishin commented 5 years ago

As I said earlier please start a rabbitmq-users thread and provide a set of steps to reproduce.

bh4r4th commented 5 years ago

Okay. I'll raise a thread soon. I found that the websocket_info is firing send_will only on the keep_alive timeout. If the application is killed abruptly, it is not firing any will at all.

Thread: https://groups.google.com/forum/#!searchin/rabbitmq-users/%5Brabbitmq-users%5D$20Last$20will$20and$20testament$20is$20not$20fired$20from$20rabbitmq_web_mqtt$20plugin%7Csort:date/rabbitmq-users/Jg88NdgcNPY/1w7LzK10CQAJ

bh4r4th commented 5 years ago

The fix by @karenbajador included in version 3.7.10 is looking good. Click to check the PR

I have tried this plugin with a cluster built using rabbitmq:3.7.14-management docker image. I used a client application created using python3.6 and hbmqtt v0.9.5 mqtt library to test this LWT feature.

I appreciate your time in fixing this issue.