ReactiveDomain / reactive-domain

A toolkit for implementing CQRS-ES in a reactive system
MIT License
35 stars 21 forks source link

TCP bus does not properly route messages from single server to multiple clients #109

Open joshkempner opened 2 years ago

joshkempner commented 2 years ago

The server-side implementation of the TCP message bus broadcasts all outgoing messages to all clients, instead of routing them to the appropriate client.

With Events it's tough to know where a given message should be routed unless it has a non-empty causation ID that can be matched up with the message ID of a received message.

With Commands, it's quite a bit more straightforward. Servers should never initiate the sending of a Command, but should be able to handle Commands received from clients and then route each CommandResponse to the appropriate client.

joshkempner commented 2 years ago

110 Resolves this for Commands and their CommandResponses. Routing of Events that are published server-side still needs to be addressed.