isEmptyDueToLogCompactedMessages() {
    const hasMessages = this.rawMessages.length > 0
    return hasMessages && this.isEmptyIncludingFiltered()
  }
With compressed messages, it's possible for the returned messages to have offsets smaller than the starting offset.
These messages will be filtered out (i.e. they are not even included in this.messagesWithinOffset)
If these are the only messages, the batch will appear as an empty batch.

isEmpty() and isEmptyIncludingFiltered() will always return true if the batch is empty,
but this method will only return true if the batch is empty due to log compacted messages.

@returns boolean True if the batch is empty, because of log compacted messages in the partition.