The payload fails schema validation because a required field is missing
"The payload fails schema validation because a required field is missing" is correct. A malformed payload fails in the same way on every attempt. Retries only waste time and delay other messages.
The other failures are transient, which means temporary:
• "The database returned a connection timeout"
• "A downstream API responded with HTTP 503"
• "A deadlock was detected and the transaction was rolled back"
The same message usually succeeds a little later. So these deserve retries with backoff before you give up.
Read more
- Dead letter channel (https://www.enterpriseintegrationpatterns.com/patterns/messaging/DeadLetterChannel.html)enterpriseintegrationpatterns.com