Lagom groupedWithin Flow subscription

Hello,
This question is somewhat similar to Inconsistency with subscriber service and parallelism levels).

I recently used “groupedWithin” in my topic subscription flow and noticed that when I restarted the service, almost every event is replayed. I read that in the documentation for atLeastOnce ((https://github.com/lagom/lagom/blob/ae9771435a50d2091a0ae41d9cd89b95081b7a4a/service/scaladsl/api/src/main/scala/com/lightbend/lagom/scaladsl/api/broker/Subscriber.scala#L62)) that the flow should emit one Done per (incoming) event which I am doing in the code below. Would this code satisfy that requirement or is it incorrect? Given the unusual event replay behavior I would assume the latter but can’t be sure.

Thanks,

Flow[Event]
.groupedWithin(batchSize, duration)
      .mapAsync(1) {
        case evs: Seq[Event] =>
          Future(f(evs)).map(_ => Seq.fill(evs.length)(Done.done()))
        case _ =>
          Future.successful(Seq(Done.done()))
      }
      .mapConcat(_.toList)
  }