If the broker received the original message and sent a PUBACK, but the PUBACK didn't reach the publisher (again, maybe due to a network issue), then the broker will receive the duplicate message.When publishing a message, include a unique identifier or a sequence number in the payload.