Skip to content

Microsoft.Azure.Functions.Worker.Extensions.Kafka 4.3.0

Choose a tag to compare

@TsuyoshiUshio TsuyoshiUshio released this 09 May 04:43
7097a85

Microsoft.Azure.Functions.Worker.Extensions.Kafka 4.3.0

Breaking Changes

  • Removed KafkaRecord.LeaderEpoch from the .NET isolated worker KafkaRecord type (#3401)
    • LeaderEpoch is consumer fetch/offset metadata, not stored Kafka record data.
    • Existing KafkaRecord properties remain: Topic, Partition, Offset, Key, Value, Timestamp, and Headers.

Fixes

Changes

  • Remove leader_epoch from KafkaRecordProto and reserve field number 8 and name leader_epoch (#3401)
  • Remove LeaderEpoch mapping from KafkaRecordConverter (#3401)
  • Remove the temporary KafkaRecordSample directory because it was not compatible with the release packaging process (#3403)

Usage

dotnet add package Microsoft.Azure.Functions.Worker.Extensions.Kafka --version 4.3.0
[Function("KafkaTrigger")]
public void Run(
    [KafkaTrigger("BrokerList", "my-topic",
     ConsumerGroup = "$Default")] KafkaRecord record)
{
    var topic = record.Topic;
    var partition = record.Partition;
    var offset = record.Offset;
    var key = record.Key;             // byte[] or null
    var value = record.Value;         // byte[] or null
    var timestamp = record.Timestamp; // UnixTimestampMs + Type (CreateTime/LogAppendTime)
    var headers = record.Headers;     // KafkaHeader[] (key + raw bytes value)
}

PRs Included

  • Remove LeaderEpoch from KafkaRecord and update host extension to 4.3.2 (#3401)
  • Remove KafkaRecord sample from Kafka extension (#3403)

Related

Full Changelog: kafka-extension-4.2.0...kafka-extension-4.3.0