max and not last: a batch is assembled by groupedWithin across partitions and is not ordered by offset within one, so taking the final element would checkpoint whichever record happened to arrive last.
max and not last: a batch is assembled by groupedWithin across partitions and is not ordered by offset within one, so taking the final element would checkpoint whichever record happened to arrive last.