Bifrost
Bifrost copied to clipboard
CommandMetaData for adding data to Commands that does not appear in the clients that issue commands
In many cases you need to have additional information related to a command that does not exist in the client or the client should not be responsible for, for instance if you have a shopping cart and you want to add an item to it and you want it to be added with the current price of the product but don't want the price to come from the client as it can be tampered with. CommandMetaData could then fill this gap.
Bifrost should automatically pick up any classes implementing CommandMetaDataDescriptor or similar for the specific command and make sure it populates the meta-data on the command.
Some MetaData should be possible to add from the client as well - take for instance information related to versioning for a readModel a command has been linked with. Handy for checking staleness