[Lagom][Cassandra][CosmoDB] Using cosmodb with Lagom

Hi Guys,

I try to run Lagom and use CosmoDB as Cassandra.
I could connect to Cassandra, but I got an error in runtime:
'CREATE MATERIALIZED VIEW' is not supported yet.

Maybe it is possible to use some workaround so we do not need to create MATERIALIZED VIEW?

Maybe somebody has success experience of using CosmoDB and Lagom(maybe Akka persistence)?

Hi,
I did not use CosmoDB but if MV is a problem i would suggest upgrading to a newest version of
Akka Persistance Cassandra that does not use MV.

Br,
Alan

I don’t think that Cosmos DB is compatible with even the newest version of Akka Persistence Cassandra.

IIUC, Cosmos doesn’t support static columns, which is currently still used by APC:

There may be other issues as well. We’d be interested in hearing from anyone who is trying to get it to work.

1 Like

In the case of Lagom (1.4.x) with akka persistence cassandra. When building a projection in Cassandra on the readside, you are reading an event and returning BoundStatements. These are executed as a batch write which includes the BoundStatements + another BoundStatement for updating the readside offset. I believe this must be executed as a logged batch in Cassandra because it crosses partitions. The cassandra driver for Cosmos does not support logged batches.

I’m not sure whether akka persistence in general might also see that issue. I’m definitely interested in CosmosDB support in akka persistence that can be used by the Lagom patterns as well.