Lambda MSK Event Source Unexpected Retry Behaviour

0

Hi,

I have an MSK topic that is an event source for a C# lambda. According to the documentation over at https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html

Lambda reads the messages sequentially for each partition. After Lambda processes each batch, it commits the offsets of the messages in that batch. If your function returns an error for any of the messages in a batch, Lambda retries the whole batch of messages until processing succeeds or the messages expire.

However, this is different to the behaviour I'm seeing.

My lambda is currently throwing a timeout exception, and I can see from the logs that it's bubbling up to the lambda runtime as I intended. The lambda is re-invoked somewhere between 1 and 5 times, and then it isn't attempted again. I can see in CloudWatch a log like

START RequestId: 21b8cbda-8e66-4d1d-9812-9d2661985a73 Version: $LATEST

for each invocation - which is how I'm determining the number of times it's being retried.

I was expecting the lambda to be retried indefinitely until it succeeded. Have I misunderstood the documentation or is that how it should behave?

Also what is meant by "or the messages expire." - is that referring to the retention period for the topic (mine is currently 1 week)? Or is there some other message expiry mechanism specific to MSK?

Thank you!

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠