The gateway uses
Masstreansit to send commands to services. Some of services require event sourcing in their internal architecture. Since I need my aggregate states available, and the system requires speed, The actor model seems to be a good fit, but require to deal with a couple of issues:
- The actors should acknowledge the command to be removed from the message queue for reliability purposes.
- Out of order commands should not be acknowledged to be resent to the actor(Optimistic concurency).
- Reading a command from one queue(rabbitmq) and writing it to another queue(actor model's mailbox) seems to be redundant.
- I'm going to use
proto.actorand that seems to require remote cluster for sending commands to actors based on the id of the actor, and that means yet another unnecessary network layer after reading each command from message queue inside of my event sourced services.
And that complexity makes me uncertain about whether I am in the right path or not.
Am I in the right road?
Is there any alternatives to that solution?
Please help me to clarify the question with your comments if you find it unclear. Thanks.