The ExcerptTailer/Excerpt can alter an existing Excerpt whether it is being appended or modified by another thread or process on the same machine.
For modifying the entry in a thread safe manner, I suggest using compareAndSetInt or compareAndSetLong to ensure the change is atomic. You might want to have the Appender pad the message with 4/8 bytes so you can perform this update later. I suggest putting in a timestamp so you can also see when a message was processed.
if (tailer.compareAndSetLong(offset, System.nanoTime())) {
// updated successfully
}
If you have multiple consumers you want to load balance between you can give each one an id like 1,2,3 and
if (tailer.compareAndSetInt(offset, workerId)) {
// work is assigned to me
} else {
// some one else got there first
}
Regards,
Peter.