Show / Hide Table of Contents

    Interface IOutboundEnvelope

    Wraps the message that is being produced to an outbound endpoint.

    Inherited Members
    IBrokerEnvelope.IsTombstone
    IRawBrokerEnvelope.Headers
    IRawBrokerEnvelope.RawMessage
    IEnvelope.Message
    IEnvelope.MessageType
    Namespace: Silverback.Messaging.Messages
    Assembly: Silverback.Integration.dll
    Syntax
    public interface IOutboundEnvelope : IBrokerEnvelope, IRawBrokerEnvelope, IEnvelope

    Properties

    BrokerMessageIdentifier

    Gets the message identifier on the message broker (the Kafka offset or similar).

    Declaration
    IBrokerMessageIdentifier? BrokerMessageIdentifier { get; }
    Property Value
    Type Description
    IBrokerMessageIdentifier
    Remarks

    The identifier value will be set only after the message has been successfully published to the message broker.

    Context

    Gets the current ISilverbackContext.

    Declaration
    ISilverbackContext? Context { get; }
    Property Value
    Type Description
    ISilverbackContext

    EndpointConfiguration

    Gets the destination endpoint configuration.

    Declaration
    ProducerEndpointConfiguration EndpointConfiguration { get; }
    Property Value
    Type Description
    ProducerEndpointConfiguration

    Producer

    Gets the IProducer that will be or was used to produce this message.

    Declaration
    IProducer Producer { get; }
    Property Value
    Type Description
    IProducer

    Methods

    AddHeader(string, object)

    Adds a new header.

    Declaration
    IOutboundEnvelope AddHeader(string name, object value)
    Parameters
    Type Name Description
    string name

    The header name.

    object value

    The header value.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

    AddHeaderIfNotExists(string, object?)

    Adds a new header if no header with the same name is already set.

    Declaration
    IOutboundEnvelope AddHeaderIfNotExists(string name, object? newValue)
    Parameters
    Type Name Description
    string name

    The header name.

    object newValue

    The new header value.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

    AddOrReplaceHeader(string, object?)

    Adds a new header or replaces the header with the same name.

    Declaration
    IOutboundEnvelope AddOrReplaceHeader(string name, object? newValue)
    Parameters
    Type Name Description
    string name

    The header name.

    object newValue

    The new header value.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

    CloneReplacingMessage<TNewMessage>(TNewMessage)

    Clones the envelope and replaces the contained message with the specified one.

    Declaration
    IOutboundEnvelope<TNewMessage> CloneReplacingMessage<TNewMessage>(TNewMessage newMessage) where TNewMessage : class
    Parameters
    Type Name Description
    TNewMessage newMessage

    The new message to be set.

    Returns
    Type Description
    IOutboundEnvelope<TNewMessage>

    The new envelope.

    Type Parameters
    Name Description
    TNewMessage

    The type of the new message.

    Remarks

    The raw message will be cleared.

    CloneReplacingRawMessage(Stream?)

    Clones the envelope and replaces the raw message with the specified one.

    Declaration
    IOutboundEnvelope CloneReplacingRawMessage(Stream? newRawMessage)
    Parameters
    Type Name Description
    Stream newRawMessage

    The new raw message to be set.

    Returns
    Type Description
    IOutboundEnvelope

    The new envelope.

    GetEndpoint()

    Gets the destination endpoint for the specific message.

    Declaration
    ProducerEndpoint GetEndpoint()
    Returns
    Type Description
    ProducerEndpoint

    The endpoint.

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