This is not hypothetical. This is true with all messaging systems. The (durable) subscriber is always responsible for duplicate detection.
Think about it. The broker delivers the message to the subscriber. The subscriber (along with the whole client application) dies. Then the subscriber comes back (when the application is restarted)... did the subscriber get the message? and if so, did the subscriber processed it? and if so, did it process it to completion?
The messaging environment always choose to resend under these edge conditions -- meaning it will choose to guarantee the delivery over avoiding duplicates.
PS... Yes, XA transactions would help here, but keep in mind, this is not in common usage -- and not many messaging environments support them.