Interface IMockedConfluentConsumer
A mocked implementation of Confluent.Kafka.IConsumer<TKey, TValue> from Confluent.Kafka that consumes from an IInMemoryTopic.
Inherited Members
IConsumer<byte[], byte[]>.Unsubscribe()
IConsumer<byte[], byte[]>.Assign(TopicPartition)
IConsumer<byte[], byte[]>.Assign(TopicPartitionOffset)
IConsumer<byte[], byte[]>.Unassign()
IConsumer<byte[], byte[]>.StoreOffset(ConsumeResult<byte[], byte[]>)
IConsumer<byte[], byte[]>.StoreOffset(TopicPartitionOffset)
IConsumer<byte[], byte[]>.Commit()
IConsumer<byte[], byte[]>.Commit(ConsumeResult<byte[], byte[]>)
IConsumer<byte[], byte[]>.Seek(TopicPartitionOffset)
IConsumer<byte[], byte[]>.Position(TopicPartition)
IConsumer<byte[], byte[]>.GetWatermarkOffsets(TopicPartition)
IConsumer<byte[], byte[]>.Close()
IConsumer<byte[], byte[]>.MemberId
IConsumer<byte[], byte[]>.Assignment
IConsumer<byte[], byte[]>.Subscription
IConsumer<byte[], byte[]>.ConsumerGroupMetadata
IClient.Handle
IClient.Name
Namespace: Silverback.Messaging.Broker.Kafka.Mocks
Assembly: Silverback.Integration.Kafka.Testing.dll
Syntax
public interface IMockedConfluentConsumer : IConsumer<byte[]?, byte[]?>, IClient, IDisposable
Properties
Config
Gets the Confluent.Kafka.ConsumerConfig.
Declaration
ConsumerConfig Config { get; }
Property Value
| Type | Description |
|---|---|
| ConsumerConfig |
IsDisposed
Gets a value indicating whether this instance was disposed.
Declaration
bool IsDisposed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
PartitionsAssigned
Gets a value indicating whether the partitions have been assigned to the consumer, either manually or via rebalance.
Declaration
bool PartitionsAssigned { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
This value indicates that the rebalance process is over. It could be that no partition has actually been assigned.
Methods
GetStoredOffset(TopicPartition)
Gets the stored offset for the specified topic partition.
Declaration
TopicPartitionOffset GetStoredOffset(TopicPartition topicPartition)
Parameters
| Type | Name | Description |
|---|---|---|
| TopicPartition | topicPartition | The topic partition. |
Returns
| Type | Description |
|---|---|
| TopicPartitionOffset | The Confluent.Kafka.TopicPartitionOffset representing the offset, or Confluent.Kafka.Offset.Unset if the specified topic partition isn't currently assigned to the consumer or no offset has been stored so far. |