Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ruud Welling
    @WellingR
    Do you mean that you want to use a different slick database connection for your persistent queries?
    I think you should be able to use the following configuration example, with the only different that you configure the different jdbc connection for the jbdc-read-journal
    Adam Chaulk
    @acchaulk
    ah, right, I think that is what I'm looking for. thanks!
    Ruud Welling
    @WellingR
    Akka-persistence 3.5.2 is now available on maven central. This release is similar to 3.5.1, however it includes support for scala 2.13.0
    Renato Cavalcanti
    @renatocaval
    Thanks @WellingR!
    Dave
    @dave-fl
    Hi, is it possible at all to obtain the session from akka-persistence-jdbc for a "regular" slick session, so that they are shared.
    Dave
    @dave-fl
    @WellingR I do not see anything in ther related to session. Wouldn't I need the same session to share the connection pool.
    Ruud Welling
    @WellingR
    In most cases one connection corresponds to one session. Sharing sessions implies sharing connections
    Dave
    @dave-fl
    @WellingR yes, i dont think this is 1 connection. This is a connection pool.
    Would like to share the pool.
    or do multiple sessions all occupy from the same pool?
    Ruud Welling
    @WellingR
    The wording in the readme could be improved. The slick database can be shared, which means that the connection pool will be shared too.
    David Roon
    @adridadou
    hi everyone! Just trying out the plugin and I have a question. Is there a way of sharing the database connection between akka-persistence-jdbc and play?
    I’m using slick there and It seems like they are in conflict
    David Roon
    @adridadou
    does anyone here has experience and could provide an example of akka-persistence-jdbc working within play that uses slick
    ?
    Ruud Welling
    @WellingR

    I’m using slick there and It seems like they are in conflict

    What do you mean exactly? Why does there seem to be a conflict?

    I am not completely sure if it is possible to share the slick Database connection pool between play and akka-persistence-jdbc. But it should be possible to configure akka-persistence-jdbc and play to use similar connection settings. This way the components create their own Slick Database (i.e. their own connection pools and asyncExecutors).
    David Roon
    @adridadou
    hi guys! I have a question regarding configuration of akka-persistence-jdbc. Is there a way of telling it to use a different connection URL for reading and writing?
    I want to use AWS database and they have a certain endpoint for writing and another one for reading (for scaling purposes). I’d love to make it possible to configure it in such a way that it writes in one place but reads in another
    Ruud Welling
    @WellingR
    This is partially possible, there are three places where you can configure the URL, one is the (regular) journal, one is the snapshot journal, and there is a separate read-jounal
    The last is used for the persistence-queries such as eventsByTag and eventsByPersistenceId
    however the regular journal and snapshot journals also execute queries to retrieve the current state
    David Roon
    @adridadou
    yes so you can separate by type of data being saved but not for read / write things
    Tim Moore
    @TimMoore
    @adridadou it depends on what you mean by read/write. Journal Queries are a form of read. Generally, you wouldn't want to split the reads that happen in the Journal plugins to a separate database, because they need to be strongly consistent with the writes.
    But it's usually OK for Journal Queries to be eventually consistent.
    Tulio Gomez Rodrigues
    @tuliogrodrigues

    Hi everyone,
    I'm trying delete all events into my journal based in some conditions in tag column. I managed to do like that, but I don't like this import in the middle of the code and would like to remove it.
    Anyone knows how to do it without this import in the middle?
    `
    def deleteJournal(companyId: CompanyId): EitherF[Done] = {

    val query: PostgresReadJournal = PersistenceQuery(actorSystem).readJournalFor[PostgresReadJournal](PostgresReadJournal.Identifier)
    
    import query.driver.api._
    
    val deleteQuery = query.journals.filter(t => t.tags @> Map("companyId" -> companyId.id.toString)).delete
    EitherT.liftF(
      query.database
        .run(deleteQuery)
        .map(_ => Done))
    } 

    `

    Ruud Welling
    @WellingR
    Are you using other extension on top of akka-persistence jdbc? As far as I know PostgresReadJournal is not part of akka-persistence-jdbc. The jdbc driver of akka-persistence-jdbc does not provide access to the driver/profile this way
    The only officially supported api for message deletion is the following
    This is done by a persistent actor
    David Roon
    @adridadou
    hi everyone, so I’m trying to figure out a way to configure slick so I can use the connection pool for akka-persistence-jdbc but also for my slick table configuration in my application
    the configuration for slick is slick.dbs.default but all examples are using slick.db
    is there a way of using slick.dbs.default
    David Roon
    @adridadou
    on the same subject, I am pretty sure my configuration is wrong and the akka persistence query hangs when I use it but I see no error message. What should I do to see the errors ?
    i nthe logs I mean
    David Roon
    @adridadou
    ok I think I figured out the issue. There were still some configurations that pointed to LevelDb instead of Jdbc
    OlafurD
    @OlafurD
    Hi guys. I was wondering about the performance of eventsByTag query, is it using any wildcards in the sql query (e.g. where tags like '%some_tag%') or is it free of wildcards?
    Renato Cavalcanti
    @renatocaval
    it is using wildcards indeed
    and that's not great
    we want to refactor it
    OlafurD
    @OlafurD
    gotcha, thanks
    Enno
    @ennru
    We intend to move Akka Persistence JDBC to the Akka Github organisation dnvriend/akka-persistence-jdbc#252
    Enno
    @ennru
    The repository has now been moved to https://github.com/akka/akka-persistence-jdbc
    Ihor Zadyra
    @TomoHavvk
    Hi, I am using your implementation of akka-persistence-jdbc, at the moment the snapshot table has grown to a large size, tell me please, whether it is possible to configure automatic removal of old snapshots? If not, how can this be implemented correctly? Thank you so much for earlier ;)
    Ruud Welling
    @WellingR
    @TomoHavvk see https://doc.akka.io/docs/akka/current/persistence.html#snapshot-deletion whenever you receive a SaveSnapshotSuccess you could choose to atomatically delete the old snapshots
    alexmnyc
    @alexmnyc
    guys, how can I implement a database connection provider for akka-persistence-jdbc that uses rotating credentials?
    Ruud Welling
    @WellingR
    @alexmnyc I think you should look for this solution in the database-connection pool you are using. I have little experience with this. All you can do is make sure Slick is configured with a DataSource with automatically handles the credential rotation