I’m trying to implement a Lagom project managing customers. It has a web interface and I want to have a web page with at some point the detail of one customer and notably a table of all actions performed on that customer. In Lagom terms, it is all events for an entity.
When you read Event Sourcing advantages, one is “It provides event sourcing for free”. Ok, good but the implementation is not trivial, at least for me !
May be there is a simple way to do it ? or an example exists ?
It works but I have 2 problems:
- The web socket is closed after 75 seconds. (Not sure but may be normal as you can read it here: https://github.com/lagom/lagom/issues/1284 but something weird with the error (1011)). To solve that, I re-create the web socket when it is closed.
- I get all event only at startup and then only the newly created
There is another Lagom feature which look promising at first for this feature: eventStream on PersistentEntityRegistry as you can read here: https://www.lagomframework.com/documentation/1.4.x/scala/ReadSide.html#Raw-Stream-of-Events but it looks like it shouldn’t be used in Service Call (how bad)
Any help would be grateful
If you are interested, the code is here: https://github.com/domschoen/customerLagom