diff --git a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala index f09caa52d8..f2ca34c6cb 100644 --- a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala +++ b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala @@ -89,7 +89,7 @@ final private[pekko] class EventsByTagStage( if (isAvailable(out)) { val maybeNextEvent = storage .tryReadByTag(tag) - .sortBy(pr => (pr.timestamp, pr.persistenceId, pr.sequenceNr)) + .sortBy(pr => (pr.timestamp, pr.sequenceNr)) .find { pr => state.forall(_.isAfter(pr.timestamp, pr.sequenceNr)) }