Envelope
Derived events carry the input's envelope (openspec pubsub-topics, "Envelope
on a derived event") unless the worker sets a field explicitly.
output.WithCorrelationId(input)
.WithScenarioId("S7F3A9B")
.WithTimestamp()
.WithEventTime(candle.WindowEnd);
| Helper | Attribute |
|---|---|
WithCorrelationId / GetCorrelationId |
correlationid |
WithScenarioId / GetScenarioId |
scenarioid |
WithRunId / GetRunId |
runid |
WithExchange / GetExchange |
exchange |
WithClockType / GetClockType |
clocktype |
WithEventTime / GetEventTime |
eventtime |
WithWallTime / GetWallTime |
walltime |
WithMarketWorld / GetMarketWorld |
marketworld |
WithMarketUniverse / GetMarketUniverse |
marketuniverse |
WithPortfolioWorld / GetPortfolioWorld |
portfolioworld |
WithStrategyWorld / GetStrategyWorld |
strategyworld |
EnvelopeAttributes.Carried lists the attributes a derived event inherits.