Open behrad opened 8 years ago
I do not think retained messages should be forwarded in this case. Have you tried this with mosquitto or another MQTT broker and checked if they behave like Mosca?
I think it should not. If this is still unclear from the spec, we might ask it to be clarified/fixed.
This topic is about the following scenario:
here A should receive the message, however it currently doesn't.
Yes, absolutely.
Would you mind sending a PR?
I'm having the same issue as described above.
If a client is subscribing a qos=1 topic, but not issuing the subscribe command on each reconnect, retained messages are not forwarded, however I think they should!
This is since
forwardRetained
is called inside handleSubscribe https://github.com/mcollina/mosca/blob/master/lib/client.js#L496, but should be moved inside restoreClientSubscriptions or authorizeSubscribe so that it gets called on each subscription restore.