- Newest
- Most votes
- Most comments
Based on the available information, it appears that AWS Lambda Event Source Mapping (ESM) for Kafka does not currently support Protobuf for event filtering. The documentation specifically mentions that self-managed Apache Kafka messages must be UTF-8 encoded strings, either plain strings or in JSON format, for Lambda to apply filter criteria effectively.
For messages that use encodings other than UTF-8, such as Protobuf, Lambda will only process metadata filters and not apply filtering to the message content itself. This means that while you can still consume events from Protobuf-serialized Kafka topics, the pre-filtering capability is limited to metadata properties only.
The current behavior for non-UTF-8 encoded strings (which would include Protobuf) is that Lambda filters only on the metadata properties based on the provided filter criteria, regardless of the filter pattern format specified.
Unfortunately, there is no specific information available about a timeline for adding support for Protobuf or other serialization formats for event filtering. AWS has not publicly announced plans or timelines for expanding the filtering capabilities to include Protobuf support.
If you need to use event filtering with Protobuf-serialized messages, you may need to consider alternative approaches, such as processing the filtering logic within your Lambda function after receiving the events, or transforming the data to a supported format before it reaches the Lambda ESM.
Sources
Using event filtering with a self-managed Apache Kafka event source - AWS Lambda
Relevant content
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 months ago