You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
When sending multiple commands, we are not able to correlate the IExecutionResult responses received from aggregate managers. This is not a problem when using a synchronous "Ask" from a UI application, but if several commands are sent from a single saga, for example, the responses can't be related to the requests (commands). We have to mitigate failures from within the saga such as by issuing compensating commands or retrying, but cannot.
Potential solution
An optional property, CorrelationId, should be added to IExecutionResult that will indicate which command succeeded or failed. I suggest an IIdentity type, with the expectation the user will return the Command object's ISourceId value.
I considered returning an object rather than IIdentity, but it might tempt users to query on the wrong side of the CQRS divide.
public interface IExecutionResult
{
bool IsSuccess { get; }
IIdentity CorrelationId {get;} // <-- new thing
}
A solution exists, of course, in that we could create a custom implementation of this interface, but given that it's intended to be an asynchronous response to a request, it seems natural to indicate the request's identity with a correlation value.
The text was updated successfully, but these errors were encountered:
Problem
When sending multiple commands, we are not able to correlate the IExecutionResult responses received from aggregate managers. This is not a problem when using a synchronous "Ask" from a UI application, but if several commands are sent from a single saga, for example, the responses can't be related to the requests (commands). We have to mitigate failures from within the saga such as by issuing compensating commands or retrying, but cannot.
Potential solution
An optional property,
CorrelationId
, should be added toIExecutionResult
that will indicate which command succeeded or failed. I suggest anIIdentity
type, with the expectation the user will return theCommand
object'sISourceId
value.I considered returning an
object
rather thanIIdentity
, but it might tempt users to query on the wrong side of the CQRS divide.A solution exists, of course, in that we could create a custom implementation of this interface, but given that it's intended to be an asynchronous response to a request, it seems natural to indicate the request's identity with a correlation value.
The text was updated successfully, but these errors were encountered: