简体   繁体   中英

Can we use Cassandra for managing persistent entity and MySQL for readside

我可以使用Cassandra来存储持久性实体,而使用MySQL来作为读取侧数据库。

Yes, the read side is completely independent from persistent entities. Feel free to implemement your read side processors using whatever you like.

That said, is you're planning to include both lagom-javadsl-persistence-cassandra and lagom-javadsl-persistence-jdbc in your project, you might have a problem. Both include bindings for PersistentEntityRegistry and OffsetStore . I'm not sure how Guice would resolve this conflict, and you might have to override these bindings in your own application module.

  • Bind PersistentEntityRegistry to CassandraPersistentEntityRegistry
  • Bind OffsetStore to SlickOffsetStore .

It would be nice if Lagom split the bindings of these two implementations to separate modules that we could then enable or disable as required. That's not the case in the current version, alas.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM