I want to use AWS lambda to consumer kafka messages, but the events I received don't contain kafka headers, that are very critical. Is there a way to get messages with headers info?
2
-
Is that headers available in messages in kafka? or no headers in kafka also?nipuna– nipuna2021-05-26 15:49:52 +00:00Commented May 26, 2021 at 15:49
-
Is this solved? I see same behavior. The headers are there in kafka. Other consumers are able to receive headersVamsiKrishna– VamsiKrishna2021-06-26 04:54:11 +00:00Commented Jun 26, 2021 at 4:54
Add a comment
|
1 Answer
The Lambda Kafka integration did not support headers before, but they have (very recently, in the last few days) silently added support for headers. You can see this in the latest event example in the docs (or try it yourself): https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html
1 Comment
Eugene W.
but it came in encoded form:
"headerKey": [1,2,3,4..]. It is a list of integers, corresponding to each character an integer number. It is not clear how to compare lists, how to trigger lambda only on specific list taking into account the order of elements.