Interface IMockedConfluentConsumer
- Namespace
- Silverback.Messaging.Broker.Kafka.Mocks
- Assembly
- Silverback.Integration.Kafka.Testing.dll
A mocked implementation of Confluent.Kafka.IConsumer<TKey, TValue> from Confluent.Kafka that consumes from an IInMemoryTopic.
public interface IMockedConfluentConsumer : IConsumer<byte[]?, byte[]?>, IClient, IDisposable
- 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[]>.MemberIdIConsumer<byte[], byte[]>.AssignmentIConsumer<byte[], byte[]>.SubscriptionIConsumer<byte[], byte[]>.ConsumerGroupMetadataIClient.HandleIClient.Name
Properties
Config
Gets the Confluent.Kafka.ConsumerConfig.
ConsumerConfig Config { get; }
Property Value
- ConsumerConfig
IsDisposed
Gets a value indicating whether this instance was disposed.
bool IsDisposed { get; }
Property Value
PartitionsAssigned
Gets a value indicating whether the partitions have been assigned to the consumer, either manually or via rebalance.
bool PartitionsAssigned { get; }
Property Value
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.
TopicPartitionOffset GetStoredOffset(TopicPartition topicPartition)
Parameters
topicPartitionTopicPartitionThe topic partition.
Returns
- 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.