moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 509 forks source link

why remove retransmissions on qos 1 #539

Closed moria closed 7 years ago

moria commented 8 years ago

hi mcollina thank you for your great work, i have read the code and find that the inflight messages just publish to client but without retry. in the code history i found that on 13 Apr 2014 you have remove the retransmissions and resend the offline message by client reconnction (probably when the inflight message number increase to 1024 then server will close the connection)

i want to know why you replace the retransmissions with resend on connect because i am thinking add retransmissions on the first time.

mcollina commented 8 years ago

The answer is.. it was 2014. I do not remember, and I would have to dig.

Why this is problematic for you? Can please attach some code that reproduce the issue? What is the correct behavior in yoiur opinion?

You can also issue a PR and we'll discuss there.

moria commented 8 years ago

@mcollina sorry i put the link into "on 13 Apr 2014" the history link is below: https://github.com/mcollina/mosca/commit/f4beee3191f90d23db16de08e13cc4395f16f41f#diff-50cfa59973c04321b5da0c6da0fdf4fe


i think it is better to retry than close the connection when the inflight message number increase to max because in my option when the offline msg is more than max, when the client connect, it will be close before its puback reach mosca.

mcollina commented 7 years ago

Is this still a problem? Closing for now, but feel free to reopen.