session.start(xid1, XAResource.TMNOFLAGS);
for (int i = 0; i < 10; i++)
{
Message clientFile = createLargeClientMessage(session, messageSize, true);
clientFile.putIntProperty("txid", 1);
producer.send(clientFile);
}
session.end(xid1, XAResource.TMSUCCESS);
session.prepare(xid1);
session.start(xid2, XAResource.TMNOFLAGS);
for (int i = 0; i < 10; i++)
{
Message clientFile = createLargeClientMessage(session, messageSize, true);
clientFile.putIntProperty("txid", 2);
clientFile.putIntProperty("i", i);
producer.send(clientFile);
}
session.end(xid2, XAResource.TMSUCCESS);
session.prepare(xid2);