Custom ACKs

Retrying a Custom ACK

This expands on the example from the previous page by using the retry module to retry ack.send() if it fails. The retry.call() function is designed to stop the channel after the specified number of retries. if you wish to continue processing the next message you can use pcall() to catch the error and continue processing.

Both options are demonstrated (and commented) in this example:

You can get the Retry a Custom ACK code from our code repository.

Tip: To customize error handling use the errorfunc argument with an error function, see Customize the retry logic using an error function.

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.