janjaali commented on code in PR #267: URL: https://github.com/apache/pekko-persistence-jdbc/pull/267#discussion_r1957068980
########## core/src/main/scala/org/apache/pekko/persistence/jdbc/query/javadsl/JdbcReadJournal.scala: ########## @@ -132,4 +138,16 @@ class JdbcReadJournal(journal: ScalaJdbcReadJournal) */ override def eventsByTag(tag: String, offset: Offset): Source[EventEnvelope, NotUsed] = journal.eventsByTag(tag, offset).asJava + + /** + * Returns the last known sequence number for the given `persistenceId`. Empty if the `persistenceId` is unknown. + * + * @param persistenceId The `persistenceId` for which the last known sequence number should be returned. + * @return Some sequence number or None if the `persistenceId` is unknown. + */ + def currentLastKnownSequenceNumberByPersistenceId(persistenceId: String): CompletionStage[Optional[Long]] = Review Comment: I was considering `scala.Long` as the better suited one here, since the `EventEnvelope` itself - which is the return type of multiple other methods in this class - carries the offset and specially the sequenceNr - the attribute that this method is actually interested in - as scala.Long. The Optional wrapper was "inspired" by the `GetObjectResult` for the `DurableStateStore` javadsl. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org