Command enrichment with Lagom

Hey,

The scenario is that in my service implementation, I’m calling multiple database queries that return Future[X]
Then I have some logic which combines these futures, and I use the combined result to enrich a command sent to lagom.

Question: As far as I know PersistenceEntity cannot receive a Future. Is the only way to block then with Await.result before sending the actual command? (not very nice)

@gabox01 command is sent to entity via PersistentEntityRef.ask that returns a future. So you need to chain it with enrichment future.