From 9185cd186a5c92e0faee4f91890d7bd4c26ef585 Mon Sep 17 00:00:00 2001 From: Sebastian Dusza Date: Fri, 5 Apr 2019 19:43:53 +0200 Subject: [PATCH] Update messageDeletionPolicy section in README.md It wasn't up to date. --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 051fbf0..f5780b0 100644 --- a/README.md +++ b/README.md @@ -356,10 +356,17 @@ An XML variant may look like: ```` The `SqsMessageDrivenChannelAdapter` exposes all `SimpleMessageListenerContainer` attributes to configure and one an -important of them is `deleteMessageOnException`, which is `true` by default. Having that to `false`, it is a -responsibility of end-application to delete message or not on exceptions. E.g. in the error flow on the -`error-channel` of this channel adapter. For this purpose a `AwsHeaders.RECEIPT_HANDLE` message header must be used -for the message deletion: +important of them is `messageDeletionPolicy`, which is set to `NO_REDRIVE` by default. + +Possible values are: + +- `ALWAYS` - Always deletes message automatically. +- `NEVER` - Never deletes message automatically. +- `NO_REDRIVE` - Deletes message if no redrive policy is defined. +- `ON_SUCCESS` - Deletes message when successfully executed by the listener method (no exception is thrown). + + +Having that to `NEVER`, it is a responsibility of end-application to delete message. For this purpose a `AwsHeaders.RECEIPT_HANDLE` message header must be used for the message deletion: ````java MessageHeaders headers = message.getHeaders();