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
envelopeIBrokerEnvelopeThe 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
envelopeIBrokerEnvelopeThe envelope containing the message.
Returns
- string
The correlation data.
GetMqttDestinationTopic(IOutboundEnvelope)
Gets destination topic.
public static string? GetMqttDestinationTopic(this IOutboundEnvelope envelope)
Parameters
envelopeIOutboundEnvelopeThe envelope containing the message.
Returns
- string
The destination topic.
GetMqttResponseTopic(IBrokerEnvelope)
Gets response topic.
public static string? GetMqttResponseTopic(this IBrokerEnvelope envelope)
Parameters
envelopeIBrokerEnvelopeThe 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
envelopeIOutboundEnvelopeThe envelope containing the message.
correlationDatabyte[]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
envelopeIOutboundEnvelopeThe envelope containing the message.
correlationDatastringThe 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
envelopeIOutboundEnvelopeThe envelope containing the message.
destinationTopicstringThe 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
envelopeIOutboundEnvelopeThe envelope containing the message.
responseTopicstringThe response topic.
Returns
- IOutboundEnvelope
The IOutboundEnvelope so that additional calls can be chained.