Closed xander-mbaka closed 6 years ago
AggregateLock - Domain
Deduplication - Domain
RevisionGuard - Saga + EvenDenormalizer
Thanks,
Is there an inbuilt way to guard against command payload duplication? To guard from user sending the same cmd payload (e.g from UI double click instead of single click)?
Or I should resort to smth like:
var hash = require('object-hash');
var data = {a: 1, b: 2};
var cmd = new Backbone.CQRS.Command({ id: hash(data), command: 'reverseTransaction', payload: data, }); cmd.emit();
So that the command id is always unique to the payload
No there is nothing inbuilt like that...
I don't know if it's a good idea to have the commad id always unique to the payload...
think of an increment command looking always the same... will be rejected (because of deduplication) but in reality correct.
Try to block the ui action for a couple of seconds or block until the event arrived... like a busy button...
Much thanks
Hi,
Was wondering where I might get some more info on how the following features work, their options and caveats:
Any pointers?