Right, when the app crashes or restarted, then messages will be lost, but when the app performing reconnect those unacknowledged messages will be sent.
This behavior causes different handling between a reconnect and the first connection in my use case.