Rafał Ryszkowski
Rafał Ryszkowski

Reputation: 425

Status of a composite event in MassTransit

When defining a composite event, there is a status property, for example:

CompositeEvent(() => Visited, x => x.VisitedStatus, CompositeEventOptions.IncludeInitial, Entered, Left);

In this example, the author used int as a status property type, but I'm using string. Three questions:

  1. Why am I getting an error about type mismatch trying to use string as a property status instead of int?
  2. Why is it necessary to define separate status properties for coposite events?
  3. What is stored in such a property?

Upvotes: 1

Views: 852

Answers (1)

Chris Patterson
Chris Patterson

Reputation: 33278

The composite event status must be an int. The property is used to store bit flags for the events that will ultimately trigger the composite event. As each dependent event is consumed by the saga, the bits are set – once they're all set the composite event is triggered.

Upvotes: 3

Related Questions