LeCouteauSuisse provide flexible and evolutive architecture. In some case your service must change to add a new function, this new function must be encapsulate in the receiver but you don't want to modify the actual receiver. LeCouteauSuisse give a concept to group several receiver, this group subscribe one or more generators and will receive all events. You can choice how the receivers can receive and treat each event. This synchronization between receivers in the group has 3 options :
- None : no synchronization, with this option all receivers in the group will receive and treat the event in a parallel mode.
- Sequential : the event is given for each receiver in a specific order. When a receiver ends, the dispatcher take the event and give it to the next receiver.
- Conditional Sequence : this option is the same as Sequential, but each receiver can signal if the Dispatcher must continue or stop the sequence of receivers.
LeCouteauSuisse provide a context for each event in the group. This context object is created when event enter inside the group and released when event is treated by all receivers. This context object is used by receivers to signal the conditional return (stop or continue) and can store data to share between receivers
No synchronization
Sequential
Conditional Sequence