log.debug("Entry: RMMsgCreator::addAckMessage " + sequenceId);
String rmVersion = rmdBean.getRMVersion();
String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmVersion);
SequenceAcknowledgement sequenceAck = new SequenceAcknowledgement(rmNamespaceValue);
Identifier id = new Identifier(rmNamespaceValue);
id.setIndentifer(sequenceId);
sequenceAck.setIdentifier(id);
ArrayList ackRangeArrayList = SandeshaUtil.getAckRangeArrayList(rmdBean.getServerCompletedMessages(), rmNamespaceValue);
sequenceAck.setAckRanges(ackRangeArrayList);
if (rmdBean.isClosed()) {
// sequence is closed. so add the 'Final' part.
if (SpecSpecificConstants.isAckFinalAllowed(rmVersion)) {
AckFinal ackFinal = new AckFinal(rmNamespaceValue);
sequenceAck.setAckFinal(ackFinal);
}
}
applicationMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT, sequenceAck);