Class CloudEvent
Minimal CloudEvents v1.0 representation. Used as the wire format for
Dapr pub/sub topics. Conforms to https://github.com/cloudevents/spec/blob/v1.0.2/spec.md.
public sealed record CloudEvent : IEquatable<CloudEvent>
- Inheritance
-
CloudEvent
- Implements
- Inherited Members
- Extension Methods
Remarks
Virtufin envelope fields not present in the standard CloudEvent spec (e.g. EventTime, CorrelationId, lane selectors) are carried as extension attributes.
Properties
Data
CloudEvent data — the event payload (typically serialised JSON).
public object? Data { get; init; }
Property Value
DataContentType
CloudEvent datacontenttype — content type of Data.
public string? DataContentType { get; init; }
Property Value
DataSchema
CloudEvent dataschema — URI identifying the schema of Data.
public string? DataSchema { get; init; }
Property Value
Extensions
Extension attributes (e.g. eventtime, correlationid, scenariomarketselector).
public IReadOnlyDictionary<string, object?> Extensions { get; init; }
Property Value
Id
CloudEvent id — unique event identifier.
public required string Id { get; init; }
Property Value
Source
CloudEvent source — context producing the event (e.g. virtufin/scenario/S7F3A9B).
public required string Source { get; init; }
Property Value
Subject
CloudEvent subject — scenario id.
public string? Subject { get; init; }
Property Value
Time
CloudEvent time — wall-clock time the event was produced.
public DateTimeOffset? Time { get; init; }
Property Value
Type
CloudEvent type — names the event type (e.g. virtufin.trade.fill.received).
public required string Type { get; init; }