In distributed systems, there’s a common understanding that it is not possible to guarantee exactly-once delivery of messages.
What is possible though is exactly-once processing. By adding a unique idempotency key to each message, you can enable consumers to recognize and ignore duplicate messages, i.e. messages which they have received and successfully processed before.