You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQSEventResponse (that was introduced in #410 and is based on batchItemFailures) does not work as expected.
Specifically, the SQS messages do not end up being marked as failed, when you add the corresponding record ids to BatchItemFailures in SQSEventResponse.
My example code looks similar to the block below. I would expect all messages in a batch to fail in this example.
Returning error results in failing the whole batch. But events.SQSEventResponse seems to be ignored completely, and the batch is treated as successful every time. The expected behavior is that the messages with ids in BatchItemFailures should be be marked as failed, whereas the rest of the batch should marked as successfully processed.
Returning just events.SQSEventResponse instead of (events.SQSEventResponse, error) results in handler returns a single value, but it does not implement error error.
@lyoung-confluent Does it work for you? Sorry to bother you, but you are most likely the most knowledgable person, since you contributed it.
The text was updated successfully, but these errors were encountered:
yerke
changed the title
SQSEventResponse with non-empty BatchItemFailures get ignored
SQSEventResponse with non-empty BatchItemFailures gets ignored
Mar 4, 2022
Turns out that terraform didn't apply function_response_types = ["ReportBatchItemFailures"] change. After I reran Terraform with that change and made sure that it's been picked up, I see the correct behavior.
SQSEventResponse
(that was introduced in #410 and is based onbatchItemFailures
) does not work as expected.Specifically, the SQS messages do not end up being marked as failed, when you add the corresponding record ids to
BatchItemFailures
inSQSEventResponse
.My example code looks similar to the block below. I would expect all messages in a batch to fail in this example.
Returning error results in failing the whole batch. But
events.SQSEventResponse
seems to be ignored completely, and the batch is treated as successful every time. The expected behavior is that the messages with ids inBatchItemFailures
should be be marked as failed, whereas the rest of the batch should marked as successfully processed.Returning just
events.SQSEventResponse
instead of(events.SQSEventResponse, error)
results inhandler returns a single value, but it does not implement error
error.Part of my
go.mod
:Am I doing something wrong?
@lyoung-confluent Does it work for you? Sorry to bother you, but you are most likely the most knowledgable person, since you contributed it.
The text was updated successfully, but these errors were encountered: