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 Risposte
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
con risposta 2 anni fa
  • 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
con risposta 6 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande