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개 답변
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달 전

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

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

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

관련 콘텐츠