Microsoft.Azure.Functions.Worker.Extensions.Kafka 4.3.0
Microsoft.Azure.Functions.Worker.Extensions.Kafka 4.3.0
Breaking Changes
- Removed
KafkaRecord.LeaderEpochfrom the .NET isolated workerKafkaRecordtype (#3401)LeaderEpochis consumer fetch/offset metadata, not stored Kafka record data.- Existing
KafkaRecordproperties remain:Topic,Partition,Offset,Key,Value,Timestamp, andHeaders.
Fixes
- Update
Microsoft.Azure.WebJobs.Extensions.Kafkadependency from 4.3.1 to 4.3.2 (#3401)- Includes the host-side
KafkaRecorddeferred-binding value type fix from Azure/azure-functions-kafka-extension#638. - Includes removal of
leader_epochfrom the host-sideKafkaRecordPrototransport schema from Azure/azure-functions-kafka-extension#640.
- Includes the host-side
Changes
- Remove
leader_epochfromKafkaRecordProtoand reserve field number8and nameleader_epoch(#3401) - Remove
LeaderEpochmapping fromKafkaRecordConverter(#3401) - Remove the temporary
KafkaRecordSampledirectory 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
- Azure/azure-functions-kafka-extension#639
- Azure/azure-functions-kafka-extension#638
- Azure/azure-functions-kafka-extension#640
Full Changelog: kafka-extension-4.2.0...kafka-extension-4.3.0