Class MqttMessageIdentifier
The MQTT broker doesn't provide any message identifier, so the identifier is either the MessageId header value or a client-side generated System.Guid.
Inheritance
Inherited Members
Namespace: Silverback.Messaging.Broker
Assembly: Silverback.Integration.MQTT.dll
Syntax
public sealed class MqttMessageIdentifier : IBrokerMessageIdentifier, IEquatable<IBrokerMessageIdentifier>
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(Nullable<Int32>)).
Constructors
| Improve this doc View sourceMqttMessageIdentifier(String, String)
Initializes a new instance of the MqttMessageIdentifier class.
Declaration
public MqttMessageIdentifier(string clientId, string messageId)
Parameters
Type | Name | Description |
---|---|---|
System.String | clientId | The client identifier. |
System.String | messageId | The message identifier. |
Properties
| Improve this doc View sourceClientId
Gets the client identifier.
Declaration
public string ClientId { get; }
Property Value
Type | Description |
---|---|
System.String |
Key
Gets the unique key of the queue, topic or partition the message was produced to or consumed from.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
System.String |
MessageId
Gets the client-side generated message identifier.
Declaration
public string MessageId { get; }
Property Value
Type | Description |
---|---|
System.String |
Value
Gets the identifier value.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this doc View sourceEquals(IBrokerMessageIdentifier)
Declaration
public bool Equals(IBrokerMessageIdentifier other)
Parameters
Type | Name | Description |
---|---|---|
IBrokerMessageIdentifier | 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
ToLogString()
Gets a string that can be used to log the offset value.
Declaration
public string ToLogString()
Returns
Type | Description |
---|---|
System.String | A System.String representing the offset value. |
Remarks
This string should contain all identifiers except the endpoint name.
ToVerboseLogString()
Gets a string that can be used to log the offset value.
Declaration
public string ToVerboseLogString()
Returns
Type | Description |
---|---|
System.String | A System.String representing the offset value. |
Remarks
This string must include the endpoint name, if the identifier value isn't unique across different endpoints.