Show / Hide Table of Contents

    Class MqttEnvelopeExtensions

    Adds some convenience extension methods to the envelope interfaces.

    Inheritance
    object
    MqttEnvelopeExtensions
    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.MQTT.dll
    Syntax
    public static class MqttEnvelopeExtensions

    Methods

    GetMqttCorrelationData(IBrokerEnvelope)

    Gets the correlation data.

    Declaration
    public static byte[]? GetMqttCorrelationData(this IBrokerEnvelope envelope)
    Parameters
    Type Name Description
    IBrokerEnvelope envelope

    The envelope containing the message.

    Returns
    Type Description
    byte[]

    The correlation data.

    GetMqttCorrelationDataAsString(IBrokerEnvelope)

    Gets the correlation data as UTF-8 string.

    Declaration
    public static string? GetMqttCorrelationDataAsString(this IBrokerEnvelope envelope)
    Parameters
    Type Name Description
    IBrokerEnvelope envelope

    The envelope containing the message.

    Returns
    Type Description
    string

    The correlation data.

    GetMqttDestinationTopic(IOutboundEnvelope)

    Gets destination topic.

    Declaration
    public static string? GetMqttDestinationTopic(this IOutboundEnvelope envelope)
    Parameters
    Type Name Description
    IOutboundEnvelope envelope

    The envelope containing the message.

    Returns
    Type Description
    string

    The destination topic.

    GetMqttResponseTopic(IBrokerEnvelope)

    Gets response topic.

    Declaration
    public static string? GetMqttResponseTopic(this IBrokerEnvelope envelope)
    Parameters
    Type Name Description
    IBrokerEnvelope envelope

    The envelope containing the message.

    Returns
    Type Description
    string

    The response topic.

    SetMqttCorrelationData(IOutboundEnvelope, byte[]?)

    Sets the correlation data.

    Declaration
    public static IOutboundEnvelope SetMqttCorrelationData(this IOutboundEnvelope envelope, byte[]? correlationData)
    Parameters
    Type Name Description
    IOutboundEnvelope envelope

    The envelope containing the message.

    byte[] correlationData

    The correlation data.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

    SetMqttCorrelationData(IOutboundEnvelope, string?)

    Sets the correlation data.

    Declaration
    public static IOutboundEnvelope SetMqttCorrelationData(this IOutboundEnvelope envelope, string? correlationData)
    Parameters
    Type Name Description
    IOutboundEnvelope envelope

    The envelope containing the message.

    string correlationData

    The correlation data.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

    SetMqttDestinationTopic(IOutboundEnvelope, string)

    Sets the destination topic.

    Declaration
    public static IOutboundEnvelope SetMqttDestinationTopic(this IOutboundEnvelope envelope, string destinationTopic)
    Parameters
    Type Name Description
    IOutboundEnvelope envelope

    The envelope containing the message.

    string destinationTopic

    The destination topic.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

    SetMqttResponseTopic(IOutboundEnvelope, string)

    Sets the response topic.

    Declaration
    public static IOutboundEnvelope SetMqttResponseTopic(this IOutboundEnvelope envelope, string responseTopic)
    Parameters
    Type Name Description
    IOutboundEnvelope envelope

    The envelope containing the message.

    string responseTopic

    The response topic.

    Returns
    Type Description
    IOutboundEnvelope

    The IOutboundEnvelope so that additional calls can be chained.

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