Implement EventsByTag in javadsl.PersistenceTestKitReadJournal.scala
Hi
I wanted to Query events by tag using EventsByTag with org.apache.pekko.persistence.testkit.query.javadsl.PersistenceTestKitReadJournal. Unfortunately this interface is not implemented yet. The scala-Version does implement EventsByTag. Is there a specific reason for this? As far as I can tell (I'm no Scala-Developer) one could simply add an additional delegate method.
I also saw that the org.apache.pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal does not support specifying an offset other than NoOffset. This will probably be my next issue...
What I actually want to do is to replace io.github.alstanchev.pekko.persistence.inmemory.query.javadsl.InMemoryReadJournal with something that is included in the "standard" pekko libs. Is there another option? I saw that there is a org.apache.pekko.persistence.journal.inmem.InmemJournal but I could not figure out how I'm supposed to use that. How would I configure that in application.conf?
Thanks and regards Oliver
The Java DSL can often have a few missing features - mainly due to an oversight. In particular, EventsByTag support was only added recently to the Scala DSL PersistenceTestKitReadJournal - #1532. I have added #1763 but will need to get back to it to add a test or 2. There seem to be a few more missing interfaces too.
From the Javadoc of InMemJournal.
* InmemJournal is only intended to be used for tests and therefore binary backwards compatibility
* of the published messages are not guaranteed.
I think if you are going to use a persistence framework, that you should use real persistence (JDBC, Cassandra, DynamoDB, etc).
I created https://github.com/apache/pekko/issues/1765
Thanks a lot for your answers and work @pjfanning.
I use the io.github.alstanchev.pekko.persistence.inmemory.query.javadsl.InMemoryReadJournal only for testing. I use pekko-persistence-jdbc for my application. There is currently no Version for Pekko 1.1.3 of the InMemoryReadJournal and it's a bit tedious to add the dependencies to make it working. That's why I thought it would be nice to have something that comes directly with Pekko. But of course I can live with that for the moment :-) Thanks!