Add setting for autoCommitOnError

Fixes #542

- add option for `autoCommitOnError`
- make `autoCommitOnError` follow the state of `enableDlq` - no need to suppress commits if messages will be sent elsewhere
This commit is contained in:
Marius Bogoevici
2016-05-25 19:42:15 -04:00
committed by Gary Russell
parent 892797c0b0
commit e2f91417c3
4 changed files with 157 additions and 5 deletions

View File

@@ -1136,6 +1136,13 @@ autoCommitOffset::
If set to `false`, an `Acknowledgment` header will be available in the message headers for late acknowledgment.
+
Default: `true`.
autoCommitOnError::
Effective only if `autoCommitOffset` is set to `true`.
If set to `false` it suppresses auto-commits for messages that result in errors, and will commit only for successful messages, allows a stream to automatically replay from the last successfully processed message, in case of persistent failures.
If set to `true`, it will always auto-commit (if auto-commit is enabled).
If not set (default), it effectively has the same value as `enableDlq`, auto-committing erroneous messages if they are sent to a DLQ, and not committing them otherwise.
+
Default: not set.
resetOffsets::
Whether to reset offsets on the consumer to the value provided by `startOffset`.
+