There is a bug which causes duplicate MessageIDs to be received. Note, the Message IDs are duplicated not the actual messages. This happens if a producer sends several messages to the same queue over the same session.
Note 1: In MessageID.cs SetValue(string messageKey) the producerSequenceId is stripped from the original unique key when a message is received.
Note 2: In the Message.cs NMSMessageId get method the unique Id is reconstructed without the sequence id. Because the sequence id is part of what makes the message id itself unique, multiple received messages will now have the same id.
Suggested Fix: The sequenceID should be added back to the MessageId in the above get method unless I am not seeing other potential problems.
Better Approach: As a side note, with this approach NMS can't be used with any other message queue because the current implementation would force the other queues to construct their unique message ids the same exact way. In bound messages should be void of any message id formatting.