// We now try and resend the messages since we get a transaction rolled back exception
// but the commit actually succeeded, duplicate detection should kick in and prevent dups
for (int i = 0; i < numMessages; i++)
{
ClientMessage message = session2.createMessage(true);
if (i == 0)
{
// Only need to add it on one message per tx
message.putStringProperty(Message.HDR_DUPLICATE_DETECTION_ID, new SimpleString(txID));