Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 9185cd1

Browse files
sebastianduszaartembilan
authored andcommitted
Update messageDeletionPolicy section in README.md
It wasn't up to date.
1 parent aefb5c2 commit 9185cd1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,17 @@ An XML variant may look like:
356356
````
357357

358358
The `SqsMessageDrivenChannelAdapter` exposes all `SimpleMessageListenerContainer` attributes to configure and one an
359-
important of them is `deleteMessageOnException`, which is `true` by default. Having that to `false`, it is a
360-
responsibility of end-application to delete message or not on exceptions. E.g. in the error flow on the
361-
`error-channel` of this channel adapter. For this purpose a `AwsHeaders.RECEIPT_HANDLE` message header must be used
362-
for the message deletion:
359+
important of them is `messageDeletionPolicy`, which is set to `NO_REDRIVE` by default.
360+
361+
Possible values are:
362+
363+
- `ALWAYS` - Always deletes message automatically.
364+
- `NEVER` - Never deletes message automatically.
365+
- `NO_REDRIVE` - Deletes message if no redrive policy is defined.
366+
- `ON_SUCCESS` - Deletes message when successfully executed by the listener method (no exception is thrown).
367+
368+
369+
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:
363370

364371
````java
365372
MessageHeaders headers = message.getHeaders();

0 commit comments

Comments
 (0)