MQTT-For-Twisted-Python icon indicating copy to clipboard operation
MQTT-For-Twisted-Python copied to clipboard

QOS 2 messages not being delivered

Open trunet opened this issue 11 years ago • 9 comments

Hi,

First of all, congratulations for the excellent work. I'm trying to use your library to delivery qos 2 messages however I'm receiving pubrec message from my broker and the library does not reply pubrel packet back making the message being lost.

Am I doing anything wrong or it's a know issue?

Check this: http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html#qos-flows

Thanks,

Wagner Sartori Junior

trunet avatar Oct 22 '13 03:10 trunet

G'day!

Yep, it's a known issue. I've never got around to supporting them. Would you like to do it?

adamvr avatar Oct 22 '13 07:10 adamvr

I already did it but I don't know how to incorporate in the main code.

The only thing you really need to do it is to add below your protocol the pubrecReceived function to send the pubrel packet:

class MQTTListener(MQTTProtocol):
    def pubrecReceived(self, messageId):
            self.pubrel(messageId)

I think the correct is to add a queue control to your messages inside your code and only delete it when you receive the pubcomp package from server.

If you point me in the right direction I can fork and send you a merge request.

trunet avatar Oct 22 '13 16:10 trunet

Looks like nice work. Any usage examples available?

rbarkas avatar Jan 15 '14 14:01 rbarkas

Hi Nice work, its hard for us to follow, any good example would be nice. I found one http://metaclaws.com/2013/04/29/publication_of_australian_weather_observations_using_mqtt/

I want to know that which MQTT protocol version u implemented, is there any addition to this existing code that you may have written, I see ur recent work is on node.js but this work is very useful as it help me to put everything in Twisted architecture running on single reactor loop. Kindly provide support or a documentation so that we can implement any change in existing protocol

funky12 avatar Feb 06 '15 06:02 funky12

This implementation is closing the connection after sending pubrel. @trunet Did you end up implementing it?

thegraycoder avatar Sep 30 '19 07:09 thegraycoder

this was 4 years ago. don't remember, sorry!

trunet avatar Sep 30 '19 08:09 trunet

@trunet Can you share something that will help me implement QoS 2 in a twisted application?

thegraycoder avatar Sep 30 '19 08:09 thegraycoder

Sorry, I don't have it anymore. I ended up using something else.

trunet avatar Sep 30 '19 08:09 trunet

Okay, thanks anyway!

thegraycoder avatar Sep 30 '19 08:09 thegraycoder