Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
524 views
in Technique[技术] by (71.8m points)

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?
question from:https://stackoverflow.com/questions/65918943/status-of-a-composite-event-in-masstransit

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...