Class MqttProducerEndpoint
Represents a topic to produce to.
Inherited Members
Namespace: Silverback.Messaging
Assembly: Silverback.Integration.MQTT.dll
Syntax
public sealed class MqttProducerEndpoint : ProducerEndpoint, IProducerEndpoint, IEndpoint, IEquatable<MqttProducerEndpoint>
Constructors
| Improve this doc View sourceMqttProducerEndpoint(Func<IOutboundEnvelope, IServiceProvider, String>)
Initializes a new instance of the MqttProducerEndpoint class.
Declaration
public MqttProducerEndpoint(Func<IOutboundEnvelope, IServiceProvider, string> topicNameFunction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IOutboundEnvelope, System.IServiceProvider, System.String> | topicNameFunction | The function returning the topic name for the message being produced. If the function returns
|
MqttProducerEndpoint(Func<IOutboundEnvelope, String>)
Initializes a new instance of the MqttProducerEndpoint class.
Declaration
public MqttProducerEndpoint(Func<IOutboundEnvelope, string> topicNameFunction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IOutboundEnvelope, System.String> | topicNameFunction | The function returning the topic name for the message being produced. If the function returns
|
MqttProducerEndpoint(String)
Initializes a new instance of the MqttProducerEndpoint class.
Declaration
public MqttProducerEndpoint(string topicName)
Parameters
Type | Name | Description |
---|---|---|
System.String | topicName | The name of the topic. |
MqttProducerEndpoint(String, Func<IOutboundEnvelope, String[]>)
Initializes a new instance of the MqttProducerEndpoint class.
Declaration
public MqttProducerEndpoint(string topicNameFormatString, Func<IOutboundEnvelope, string[]> topicNameArgumentsFunction)
Parameters
Type | Name | Description |
---|---|---|
System.String | topicNameFormatString | The endpoint name format string that will be combined with the arguments returned by the
|
System.Func<IOutboundEnvelope, System.String[]> | topicNameArgumentsFunction | The function returning the arguments to be used to format the string. |
MqttProducerEndpoint(Type)
Initializes a new instance of the MqttProducerEndpoint class.
Declaration
public MqttProducerEndpoint(Type resolverType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | resolverType | The type of the IProducerEndpointNameResolver to be used to resolve the actual endpoint name. |
Properties
| Improve this doc View sourceConfiguration
Gets or sets the MQTT client configuration. This is actually a wrapper around the MQTTnet.Client.MqttClientOptions from the MQTTnet library.
Declaration
public MqttClientConfig Configuration { get; set; }
Property Value
Type | Description |
---|---|
MqttClientConfig |
MessageExpiryInterval
Gets or sets the message expiry interval in seconds. This interval defines the period of time that the broker stores the PUBLISH message for any matching subscribers that are not currently connected. When no message expiry interval is set, the broker must store the message for matching subscribers indefinitely.
Declaration
public uint MessageExpiryInterval { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
QualityOfServiceLevel
Gets or sets the quality of service level (at most once, at least once or exactly once).
Declaration
public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; }
Property Value
Type | Description |
---|---|
MQTTnet.Protocol.MqttQualityOfServiceLevel |
Retain
Gets or sets a value indicating whether the message have to be sent with the retain flag, causing them to be persisted on the broker.
Declaration
public bool Retain { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this doc View sourceEquals(MqttProducerEndpoint)
Declaration
public bool Equals(MqttProducerEndpoint other)
Parameters
Type | Name | Description |
---|---|---|
MqttProducerEndpoint | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Validate()
Declaration
public override void Validate()