Definition
Assembly: CloudNimble.SimpleMessageBus.Core.dll Namespace: CloudNimble.SimpleMessageBus.CoreSyntax
Summary
Defines a message that can track its parent for message lineage and correlation across the processing chain.Remarks
Message tracking enables building a complete audit trail of how messages flow through the system and which messages are related to each other. This is essential for debugging, monitoring, and understanding complex business processes that span multiple message types and handlers. The ParentId property creates a direct parent-child relationship, while CorrelationId groups all related messages in the same business transaction or workflow, regardless of their hierarchical relationship.Examples
Properties
CorrelationId Abstract
Gets or sets the correlation ID for tracking related messages across the entire processing chain.Syntax
Property Value
Type:System.Guid
A Guid that groups all messages belonging to the same business transaction or workflow.
All related messages should share the same correlation ID regardless of their parent-child relationships.
Examples
Remarks
The correlation ID provides a way to group all messages that are part of the same logical operation or business process. Unlike ParentId which shows direct parent-child relationships, CorrelationId creates a flat grouping that spans the entire workflow. This is particularly useful for distributed tracing, log correlation, and understanding the full scope of a business operation that may spawn many parallel or sequential message processing paths. For new workflows, generate a new correlation ID. For messages created in response to existing messages, inherit the correlation ID from the triggering message.ParentId Abstract
Gets or sets the ID of the parent message that triggered this message, enabling message lineage tracking.Syntax
Property Value
Type:System.Nullable<System.Guid>
A nullable Guid that identifies the immediate parent message. This value should be null
for root messages that start a new workflow, and set to the parent’s ID for derived or spawned messages.