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 Guid.
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(int?)).
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 |
---|---|---|
string | clientId | The client identifier. |
string | messageId | The message identifier. |
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
Properties
| Improve this doc View sourceClientId
Gets the client identifier.
Declaration
public string ClientId { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
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 |
---|---|
string |
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
MessageId
Gets the client-side generated message identifier.
Declaration
public string MessageId { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
Value
Gets the identifier value.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
Methods
| Improve this doc View sourceEquals(IBrokerMessageIdentifier?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(IBrokerMessageIdentifier? other)
Parameters
Type | Name | Description |
---|---|---|
IBrokerMessageIdentifier | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Remarks
Generating the identifier client-side might prevent some Silverback features to work properly (e.g. MaxFailedAttempts(int?)).
ToLogString()
Gets a string that can be used to log the offset value.
Declaration
public string ToLogString()
Returns
Type | Description |
---|---|
string | A 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 |
---|---|
string | A string representing the offset value. |
Remarks
This string must include the endpoint name, if the identifier value isn't unique across different endpoints.