forked from spring-projects/spring-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INT-3442
RedisQMDE
Delay stop
Until Last Read
JIRA: https://jira.spring.io/browse/INT-3442 Previously `RedisQueueMessageDrivenEndpoint.stop()` returned immediately. It caused an issue when one more `message` might be read and processed to stopped app. * Introduce `AbstractEndpoint#lifecycleCondition` and wait on it from `RedisQueueMessageDrivenEndpoint.doStop()` and `signal()` it from `ListenerTask`. * Since everything is done around `lifecycleLock` the `RedisQueueMessageDrivenEndpoint.stop()` waits for the proper 'last' message process. * Add tiny `Thread.sleep(1)` to the `popMessageAndSend` cycle to free `lifecycleLock` for other Threads, e.g. `stop()` INT-3442: Get rid of `lock` from listener cycle * Introduce `stopTimeout` to minimize the `stop` thread blocking * If the message is returned after that timeout it moved back to Redis List using `RPUSH` INT-3442: Addressing PR comments
- Loading branch information
1 parent
f4bd034
commit 4b1eed2
Showing
3 changed files
with
97 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters