When the sender disk is full, the sender will generate messages with same sequence number. The reason for is in the sendRaw() method
try{
...
.....
......
if (num == 0) {
int msgSeqNum = header.getInt(MsgSeqNum.FIELD);
if (persistMessages)
{
state.set(msgSeqNum, messageString);
}
state.incrNextSenderMsgSeqNum();
}
return result;
} catch (IOException e)
{
logThrowable(getLog(), "Error Reading/Writing in MessageStore", e);
return false;
}
When the sender disk is full, state.set(msgSeqNum, messageString) will throw an IOException.So it will return false but does not increase SenderMsgSeqNum.So next time calling sendRaw() will generate message with same sequence number.
|