Table of Contents

Class MqttEnvelopeExtensions

Namespace
Silverback.Messaging.Messages
Assembly
Silverback.Integration.MQTT.dll

Adds some convenience extension methods to the envelope interfaces.

public static class MqttEnvelopeExtensions
Inheritance
MqttEnvelopeExtensions
Inherited Members

Methods

GetMqttCorrelationData(IBrokerEnvelope)

Gets the correlation data.

public static byte[]? GetMqttCorrelationData(this IBrokerEnvelope envelope)

Parameters

envelope IBrokerEnvelope

The envelope containing the message.

Returns

byte[]

The correlation data.

GetMqttCorrelationDataAsString(IBrokerEnvelope)

Gets the correlation data as UTF-8 string.

public static string? GetMqttCorrelationDataAsString(this IBrokerEnvelope envelope)

Parameters

envelope IBrokerEnvelope

The envelope containing the message.

Returns

string

The correlation data.

GetMqttDestinationTopic(IOutboundEnvelope)

Gets destination topic.

public static string? GetMqttDestinationTopic(this IOutboundEnvelope envelope)

Parameters

envelope IOutboundEnvelope

The envelope containing the message.

Returns

string

The destination topic.

GetMqttResponseTopic(IBrokerEnvelope)

Gets response topic.

public static string? GetMqttResponseTopic(this IBrokerEnvelope envelope)

Parameters

envelope IBrokerEnvelope

The envelope containing the message.

Returns

string

The response topic.

SetMqttCorrelationData(IOutboundEnvelope, byte[]?)

Sets the correlation data.

public static IOutboundEnvelope SetMqttCorrelationData(this IOutboundEnvelope envelope, byte[]? correlationData)

Parameters

envelope IOutboundEnvelope

The envelope containing the message.

correlationData byte[]

The correlation data.

Returns

IOutboundEnvelope

The IOutboundEnvelope so that additional calls can be chained.

SetMqttCorrelationData(IOutboundEnvelope, string?)

Sets the correlation data.

public static IOutboundEnvelope SetMqttCorrelationData(this IOutboundEnvelope envelope, string? correlationData)

Parameters

envelope IOutboundEnvelope

The envelope containing the message.

correlationData string

The correlation data.

Returns

IOutboundEnvelope

The IOutboundEnvelope so that additional calls can be chained.

SetMqttDestinationTopic(IOutboundEnvelope, string)

Sets the destination topic.

public static IOutboundEnvelope SetMqttDestinationTopic(this IOutboundEnvelope envelope, string destinationTopic)

Parameters

envelope IOutboundEnvelope

The envelope containing the message.

destinationTopic string

The destination topic.

Returns

IOutboundEnvelope

The IOutboundEnvelope so that additional calls can be chained.

SetMqttResponseTopic(IOutboundEnvelope, string)

Sets the response topic.

public static IOutboundEnvelope SetMqttResponseTopic(this IOutboundEnvelope envelope, string responseTopic)

Parameters

envelope IOutboundEnvelope

The envelope containing the message.

responseTopic string

The response topic.

Returns

IOutboundEnvelope

The IOutboundEnvelope so that additional calls can be chained.