Class MqttConnectionSettings
- Namespace
- Azure.Iot.Operations.Protocol.Connection
- Assembly
- Azure.Iot.Operations.Protocol.dll
public class MqttConnectionSettings
- Inheritance
-
MqttConnectionSettings
- Inherited Members
Constructors
MqttConnectionSettings(IDictionary<string, string>, bool, bool)
protected MqttConnectionSettings(IDictionary<string, string> connectionSettings, bool validateOptionalSettings, bool isSettingFromConnStr = false)
Parameters
connectionSettings
IDictionary<string, string>validateOptionalSettings
boolisSettingFromConnStr
bool
MqttConnectionSettings(string, string)
public MqttConnectionSettings(string hostname, string clientId)
Parameters
Properties
CaFile
public string? CaFile { get; set; }
Property Value
CertFile
public string? CertFile { get; set; }
Property Value
CleanStart
public bool CleanStart { get; set; }
Property Value
ClientCertificate
public X509Certificate2? ClientCertificate { get; set; }
Property Value
ClientId
public string ClientId { get; set; }
Property Value
HostName
public string HostName { get; set; }
Property Value
KeepAlive
public TimeSpan KeepAlive { get; set; }
Property Value
KeyFile
public string? KeyFile { get; set; }
Property Value
KeyPasswordFile
public string? KeyPasswordFile { get; set; }
Property Value
ModelId
public string? ModelId { get; set; }
Property Value
PasswordFile
public string? PasswordFile { get; set; }
Property Value
ReceiveMaximum
public ushort? ReceiveMaximum { get; set; }
Property Value
SatAuthFile
public string? SatAuthFile { get; set; }
Property Value
SessionExpiry
public TimeSpan SessionExpiry { get; set; }
Property Value
TcpPort
public int TcpPort { get; set; }
Property Value
TrustChain
public X509Certificate2Collection? TrustChain { get; set; }
Property Value
UseTls
public bool UseTls { get; set; }
Property Value
Username
public string? Username { get; set; }
Property Value
Methods
FromConnectionString(string)
public static MqttConnectionSettings FromConnectionString(string connectionString)
Parameters
connectionString
string
Returns
FromEnvVars()
public static MqttConnectionSettings FromEnvVars()
Returns
FromFileMount()
Construct an instance from the configuration files mounted by the Akri Operator.
public static MqttConnectionSettings FromFileMount()
Returns
Remarks
This method is only usable for connector applications deployed as a kubernetes pod.
GetBooleanValue(IDictionary<string, string>, string, bool)
protected static bool GetBooleanValue(IDictionary<string, string> dict, string propertyName, bool defaultValue = false)
Parameters
dict
IDictionary<string, string>propertyName
stringdefaultValue
bool
Returns
GetPositiveIntValueOrDefault(IDictionary<string, string>, string, int)
protected static int GetPositiveIntValueOrDefault(IDictionary<string, string> dict, string propertyName, int defaultValue = 0)
Parameters
dict
IDictionary<string, string>propertyName
stringdefaultValue
int
Returns
GetStringValue(IDictionary<string, string>, string)
protected static string? GetStringValue(IDictionary<string, string> dict, string propertyName)
Parameters
dict
IDictionary<string, string>propertyName
string
Returns
GetTimeSpanValue(IDictionary<string, string>, string, TimeSpan)
protected static TimeSpan GetTimeSpanValue(IDictionary<string, string> dict, string propertyName, TimeSpan defaultValue = default)
Parameters
dict
IDictionary<string, string>propertyName
stringdefaultValue
TimeSpan
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ValidateMqttSettings(bool)
protected void ValidateMqttSettings(bool validateOptionalSettings)
Parameters
validateOptionalSettings
bool