The-Inevitable-Event-Centric-Book icon indicating copy to clipboard operation
The-Inevitable-Event-Centric-Book copied to clipboard

Problem: Define the word Command

Open ylorph opened this issue 6 years ago • 4 comments

ylorph avatar Sep 06 '19 12:09 ylorph

From the point of view of a CQRS system, a command is anything that alters a state that our system is tracking.

(It is easy to confuse this with anything the user asks the system to do - but if no state change occurs in our system then that is a query or an instruction/request.)

A command can be rejected in its entirety or partially at the recipient system's discretion.

MerrionComputing avatar Oct 30 '19 11:10 MerrionComputing

There is some question on what the difference is between a command and an event - to my mind an event once committed to the stream cannot be rejected... if something goes wrong then that event needs to be reversed with a compensating action.

MerrionComputing avatar Sep 11 '20 13:09 MerrionComputing

Command can be rejected by the system, events can not be rejected by the system

ylorph avatar Sep 14 '20 10:09 ylorph

It seems there is also a tense difference - an event is past-tense in that it has happened. A command is an instruction to a future tense action. Perhaps this is where the "command can be rejected but event cannot" comes from?

MerrionComputing avatar Sep 21 '20 08:09 MerrionComputing