Show / Hide Table of Contents

    Interface IBrokerMessageIdentifier

    Represents the primary identifier used by the message broker to recognize the exact message.

    It can represent a Kafka offset, a RabbitMQ delivery tag or other similar constructs.

    The IBrokerMessageOffset interface should be implemented whenever possible to allow the exactly-one delivery using the OffsetStoreExactlyOnceStrategy.

    If the message broker doesn't provide any message identifier, a local one can be created (e.g. Guid.NewGuid()) but this will prevent some features to work properly.

    Inherited Members
    IEquatable<IBrokerMessageIdentifier>.Equals(IBrokerMessageIdentifier)
    Namespace: Silverback.Messaging.Broker
    Assembly: Silverback.Integration.dll
    Syntax
    public interface IBrokerMessageIdentifier : IEquatable<IBrokerMessageIdentifier>
    Remarks

    The classes implementing this interface should also implement a public constructor accepting key and value as string arguments.

    Properties

    | Improve this doc View source

    Key

    Gets the unique key of the queue, topic or partition the message was produced to or consumed from.

    Declaration
    string Key { get; }
    Property Value
    Type Description
    string
    Remarks

    The classes implementing this interface should also implement a public constructor accepting key and value as string arguments.

    | Improve this doc View source

    Value

    Gets the identifier value.

    Declaration
    string Value { get; }
    Property Value
    Type Description
    string
    Remarks

    The classes implementing this interface should also implement a public constructor accepting key and value as string arguments.

    Methods

    | Improve this doc View source

    ToLogString()

    Gets a string that can be used to log the offset value.

    Declaration
    string ToLogString()
    Returns
    Type Description
    string

    A string representing the offset value.

    Remarks

    This string should contain all identifiers except the endpoint name.

    | Improve this doc View source

    ToVerboseLogString()

    Gets a string that can be used to log the offset value.

    Declaration
    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.

    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini