The way dup detection works in HornetQ is the server rejects messages it has seen before, this allows the client to simply resend messages in event of failure without having to worry about whether they have sent before. In effect, it makes sending idempotent.
So the client does not need to know.
Yes, I read how it works. I was just trying to think of any scenario where the client would need to know that a duplicate was received.
My understanding is: Currently there's no need for that. If a message is duplicated, with a pre-determined ID set by the user, the message will just be ignored.
You can of course request a feature for some sort of listener if you find a need.