Closed ashwanthkumar closed 7 years ago
Merging #27 into multi-find-consistent-hash will increase coverage by 12.49%
@@ multi-find-consistent-hash #27 diff @@
============================================================
Files 20 22 +2
Lines 359 380 +21
Methods 0 0
Messages 0 0
Branches 54 56 +2
============================================================
+ Hits 180 238 +58
+ Misses 164 124 -40
- Partials 15 18 +3
Powered by Codecov. Last update ebab3a6...3fe47d3
Just as I was writing tests for SequentialReplication this happened 😄
Fixes #21
New Workflow for replication
HandleOrForward Interceptor always sets a header called "ELIGIBLE_NODES" which contains list of all nodes that're eligible to participate in the current operation as defined by RoutingStrategy.
SequentialReplicator would know to replicate the incomingMessage based on ELIGIBLE_NODES, if REPLICATION_REQUEST header is not set. Now while replicating the message it would add REPLICATION_REQUEST header to those messages so ReplicationRouter on the other node (or process) will not forward the message instead just delegate it to the local handler.
As part of this change we've also made ReplicationRouter an abstract class and provided an implementation called SequentialReplicator which does Sequential replication to all the ELIGIBLE_NODES.