As it seems, dropping a DUPlicated message is up to the application, not the protocol or the underlying client library.
This HiveMQ post states that:
The duplicate (DUP) flag [...] won’t be processed by
broker or client in the case of QoS 1. The receiver will send a PUBACK
regardless of the DUP flag.
So under QoS 1 (at least once) you can have multiple duplicates of the message bouncing on the network and both library and broker will ACK each one of them.
If you are having trouble with duplicated messages, you can try QoS 2, which employs hard policies against duplicates. There's a tradeof on network usage, since QoS 2 uses some more messages to ensure only one copy of the message is delivered.
Hope it helps.