RabbitMQ Event Source Basic nack and Reject

1

Once we receive message from the RabbitMQ Amazon MQ Event Source to the Lambda. How can I reject message and how to restrict the maxRetry in case of exception in the lambda.

已提問 2 年前檢視次數 658 次
2 個答案
0

Please see the Amazon MQ for Rabbit MQ and Lambda documentation here - https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html

If by rejecting a message, you mean you don't want to process it, then all you need to do is consume the message in your lambda function and not process it. 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. (see the documentation link above). Your lambda function will need to consider this as part of the consumer processing design.

AWS
已回答 2 年前
  • In case of rejecting message is fine I won't process the message.

    But in case when I am using the dead letter exchange and dead letter key for the queue. I have to acknowledge negative for the message so that rabbit mq remove the message from the current queue and forward the message to the dead letter exchange. Since I am not able to negative acknowledge the message retry mechanism is not possible.

    How can I resolve this issue?

0

We are facing same issue, seems it’s impossible to do that with as is Amazon mq implementation for rabbitmq broker :(

Max
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南