Kafka Consumer Event Signature Change (Breaking)
The original Kafka Consumer device events included types from the Confluent.Kafka library. This created a hard dependency on the Confluent.Kafka library and can lead to version mismatches and other unexpected behavior.
To remedy this, all dependencies on Confluent.Kafka have been removed.
The original signature of the KafkaMessageConsumedEventArgs
included
public ConsumeResult<Ignore, string> ConsumeResult { get; }
which has been replaced with
public IKafkaConsumeResult<string> KafkaConsumeResult { get; }
The IKafkaConsumeResult
has the following signature:
public interface IKafkaConsumeResult<TValue>
{
string Topic { get; }
int Partition { get; }
long Offset { get; }
TValue Value { get; }
DateTime UtcTimeStamp { get; }
IEnumerable<IKafkaHeader> Headers { get; }
bool IsPartitionEOF { get; }
}
public interface IKafkaHeader
{
string Key { get; }
byte[] ValueBytes { get; }
}
, multiple selections available,