Repository navigation
fix(cib7-embedded): align failed service task delivery with the other adapters - #176
Merged
emaarco merged 1 commit intoNov 26, 2026
Conversation
… adapters Call the termination handler with reason DELETE after a failed delivery and hand the configured retries to the engine on the first failure, as the Camunda 7, Operaton and CIB seven remote adapters do. Closes #175
emaarco
deleted the
emaarco/align-embedded-service-task-delivery-with-the-co
branch
November 26, 2026 13:16
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When a handler threw,
EmbeddedPullServiceTaskDeliveryonly deactivated the subscription of the task. The Camunda 7, Operaton and CIB seven remote adapters also call the termination handler with reasonDELETE, so state a subscriber keeps for the task is cleaned up. The embedded delivery also computed the retries handed to the engine differently from all other adapters.What
cleanupFailedDeliverydeactivates the subscription and calls its termination handler with reasonDELETE, within the handler's thread context class loader. An exception from the termination handler is logged asPROCESS-ENGINE-CIB7-EMBEDDED-047and does not escape the delivery.handleFailureare nowlockedTask.retries?.minus(1) ?: retries, as in the other adapters. A task without retries now gets the configured retries on its first failure instead of one less, so a worker withretries = 3gets four attempts instead of three.EmbeddedPullServiceTaskDeliveryThreadingTestgets a failing subscription and three tests: termination withDELETEand a failed task after a handler error, the configured retries on the first failure, and decremented retries on a repeated failure.Verification
./mvnw -pl engine-adapter/cib-seven-embedded-core,engine-adapter/cib-seven-embedded-spring-boot-starter -am verifysucceeded: 80 tests in core, 25 in the starter, all green.Out of scope / Follow-ups
EmbeddedPullUserTaskDeliveryhas the same gap: a failing handler only deactivates the subscription and never triggers termination.Closes #175