Show / Hide Table of Contents

    Class DefaultMessageHeaders

    Contains the constants with the names of the standard message headers used by Silverback.

    Inheritance
    object
    DefaultMessageHeaders
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Messages
    Assembly: Silverback.Integration.dll
    Syntax
    public static class DefaultMessageHeaders

    Fields

    ChunkIndex

    The message chunk index, used when chunking is enabled.

    Declaration
    public const string ChunkIndex = "x-chunk-index"
    Field Value
    Type Description
    string

    ChunkMessageId

    The message identifier used to uniquely identify the message each chunk belongs to.

    Declaration
    public const string ChunkMessageId = "x-message-id"
    Field Value
    Type Description
    string

    ChunksCount

    The total number of chunks the message was split into, used when chunking is enabled.

    Declaration
    public const string ChunksCount = "x-chunk-count"
    Field Value
    Type Description
    string

    ContentType

    The MIME type of the binary message. See IBinaryMessage.

    Declaration
    public const string ContentType = "content-type"
    Field Value
    Type Description
    string

    EncryptionKeyId

    The encryption key identifier.

    Declaration
    public const string EncryptionKeyId = "x-encryption-key-id"
    Field Value
    Type Description
    string
    Remarks

    The header is required for the key rotation feature. When rotating keys, it will be used on the consumer side to determine the correct key to be used to decrypt the message.

    FailedAttempts

    If an exception is thrown, the failed attempts will be incremented and stored as header. This is necessary for the error policies to work.

    Declaration
    public const string FailedAttempts = "x-failed-attempts"
    Field Value
    Type Description
    string

    FailureReason

    This will be set by the MoveMessageErrorPolicy and will contain the reason why the message failed to be processed.

    Declaration
    public const string FailureReason = "x-failure-reason"
    Field Value
    Type Description
    string

    IsLastChunk

    A boolean value indicating whether the message is the last one of a chunk sequence, used when chunking is enabled.

    Declaration
    public const string IsLastChunk = "x-chunk-last"
    Field Value
    Type Description
    string

    MessageType

    The assembly qualified name of the message type. Used by the default JsonMessageSerializer.

    Declaration
    public const string MessageType = "x-message-type"
    Field Value
    Type Description
    string

    TraceBaggage

    Used for distributed tracing. It corresponds to the string representation of the Activity.Baggage dictionary.

    Declaration
    public const string TraceBaggage = "tracebaggage"
    Field Value
    Type Description
    string
    Remarks

    This is not part of the w3c standard.

    TraceId

    Used for distributed tracing. It is set by the IProducer using the current Activity.Id. The IConsumer uses it's value to set the Activity.ParentId. Note that an Activity is automatically started by the default IProducer implementation.

    Declaration
    public const string TraceId = "traceparent"
    Field Value
    Type Description
    string
    Remarks

    The header is implemented according to the W3C Trace Context proposal (https://www.w3.org/TR/trace-context-1/#traceparent-header).

    TraceState

    Used for distributed tracing. It corresponds to the Activity.TraceStateString.

    Declaration
    public const string TraceState = "tracestate"
    Field Value
    Type Description
    string
    Remarks

    The header is implemented according to the W3C Trace Context proposal (https://www.w3.org/TR/trace-context-1/#tracestate-header).

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini