Show / Hide Table of Contents

    Interface IInMemoryPartition

    A mocked topic partition where the messages are just stored in memory.

    Namespace: Silverback.Messaging.Broker.Kafka.Mocks
    Assembly: Silverback.Integration.Kafka.Testing.dll
    Syntax
    public interface IInMemoryPartition

    Properties

    | Improve this doc View source

    FirstOffset

    Gets the Confluent.Kafka.Offset of the first message in the partition.

    Declaration
    Offset FirstOffset { get; }
    Property Value
    Type Description
    Offset
    | Improve this doc View source

    LastOffset

    Gets the Confluent.Kafka.Offset of the latest message in the partition.

    Declaration
    Offset LastOffset { get; }
    Property Value
    Type Description
    Offset
    | Improve this doc View source

    Partition

    Gets the Partition (index).

    Declaration
    Partition Partition { get; }
    Property Value
    Type Description
    Partition
    | Improve this doc View source

    TotalMessagesCount

    Gets the total number of messages written to the partition.

    Declaration
    int TotalMessagesCount { get; }
    Property Value
    Type Description
    int

    Methods

    | Improve this doc View source

    GetAllMessages()

    Gets all messages currently stored in the partition.

    Declaration
    IReadOnlyCollection<Message<byte[]?, byte[]?>> GetAllMessages()
    Returns
    Type Description
    IReadOnlyCollection<Message<byte[], byte[]>>

    The messages.

    | Improve this doc View source

    TryPull(Offset, out ConsumeResult<byte[]?, byte[]?>?)

    Pulls the next message from the partition, if available.

    Declaration
    bool TryPull(Offset offset, out ConsumeResult<byte[]?, byte[]?>? result)
    Parameters
    Type Name Description
    Offset offset

    The offset of the next message to be pulled.

    ConsumeResult<byte[], byte[]> result

    The Confluent.Kafka.ConsumeResult<TKey, TValue> wrapping the pulled message.

    Returns
    Type Description
    bool

    A value indicating whether a message was available for pulling.

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