in core/src/main/scala/org/apache/pekko/kafka/internal/MessageBuilder.scala [169:176]
def offsets: Map[GroupTopicPartition, Long] = offsetsAndMetadata.view.mapValues(_.offset() - 1L).toMap
def updated(committable: Committable): CommittableOffsetBatch = committable match {
case offset: CommittableOffset => updatedWithOffset(offset)
case batch: CommittableOffsetBatch => updatedWithBatch(batch)
case null => throw new IllegalArgumentException(s"unexpected Committable [null]")
case _ => throw new IllegalArgumentException(s"unexpected Committable [${committable.getClass}]")
}