Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1365

Akka CQRS example question

$
0
0

Hello!

I am looking into the provided CQRS example.
While code is pretty self explanatory, I’m still trying to wrap my head around an issue.
When you add an item:
val entityRef = sharding.entityRefFor(Expense.EntityKey, data.cartId)
Now, the behaviour that I see is that if the entity with the cartId does not exist, it get created and returned by cluster sharding. However, I would like to have a little bit more control over how and/or when an entity is created. Because if I send an ID that is wrong, it will get created nevertheless.
Is my understanding correct ? If not, what I’m getting wrong ? If yes, how do I control entity creation ?

Thank you!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1365

Trending Articles