Roiocam commented on code in PR #199:
URL: 
https://github.com/apache/pekko-persistence-jdbc/pull/199#discussion_r1616966091


##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala:
##########
@@ -119,7 +117,8 @@ class JdbcReadJournal(config: Config, configPath: 
String)(implicit val system: E
   override def persistenceIds(): Source[String, NotUsed] =
     Source
       .repeat(0)
-      .flatMapConcat(_ => delaySource.flatMapConcat(_ => 
currentPersistenceIds()))
+      .throttle(1, readJournalConfig.refreshInterval)
+      .flatMapConcat(_ => currentPersistenceIds())

Review Comment:
   It can't, i guess... because this is an infinite stream. if we use something 
like:
   
   ```scala
     override def persistenceIds(): Source[String, NotUsed] =
       currentPersistenceIds()
         .throttle(1, readJournalConfig.refreshInterval)
         ....
   ```
   
   It only queries once, and then throttles the set of ids in flight.



-- 
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

Reply via email to