Skip to content

1.51

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 30 Jun 11:08
· 15 commits to refs/heads/develop since this release
3660b0a

Summary

We're excited to announce the Kafka Consumer utility, which transparently handles message deserialization, provides an intuitive developer experience, and integrates seamlessly with the rest of the Powertools for AWS Lambda ecosystem.

Key features

  • Automatic deserialization of Kafka messages (JSON, Avro, and Protocol Buffers)
  • Simplified event record handling with intuitive interface
  • Support for key and value deserialization
  • Support for ESM with and without Schema Registry integration
  • Proper error handling for deserialization issues

Getting started

To get started, depending on the schema types you want to use, install the library and the corresponding libraries:

  • JSON schemas dotnet add package AWS.Lambda.Powertools.Kafka.Json
  • Avro schemas dotnet add package AWS.Lambda.Powertools.Kafka.Avro
  • Protocol Buffer schemas dotnet add package AWS.Lambda.Powertools.Kafka.Protobuf

Processing Kafka events

Docs

You can use Kafka consumer utility to transform raw Kafka events into an intuitive format for processing.

The Handler function can deserialize both keys and values independently based on your schema configuration. This flexibility allows you to work with different data formats in the same message.

Working with Avro:

image

Working with Protocol Buffers:

image

Working with JSON messages:

image

Error handling

Docs

You can handle errors when processing Kafka messages to ensure your application maintains resilience and provides clear diagnostic information.

The Kafka consumer utility integrates with standard C# exception handling patterns.

image

To learn more about the launch, read the blog post published alongside the release.

🌟New features and non-breaking changes

  • feat(kafka): add logic to handle protobuf deserialization (#909) by @hjgraca

📜 Documentation updates

🔧 Maintenance

This release was made possible by the following contributors:

@dependabot[bot], @hjgraca and dependabot[bot]