Argh, okay, I missed the obvious. So receiving the payload twice is fine. I am still confused, though. To get things sorted out, are these statements okay:
- client != "onward delivery" aka user of the client
- If broker publishes message1 - message2, the client receives them in the exact same order (due to TCP)
- If the client get message 1 - message 2 the USER may get them in reversed order, e.g. if message 1 is send with QOS2 and method A of "Figure 4.3 – QoS 2 protocol flow diagram, non normative example" is used and message 2 arrives between PUBREC and PUBREL. (This is because the specification does not cover the issues of the user of a client at all. (?))
- In case of a re-deliver of a QOS1 message it may be possible that the retry is interpreted as a second (new) message (like in my example: 1 - 2 - 1*)
I thought that too but how? The standard says - regarding the receiver: "After it has sent a PUBACK Packet the Receiver MUST treat any incoming PUBLISH packet that contains the same Packet Identifier *as being a new publication*, irrespective of the setting of its DUP flag."