Repository navigation
Conversation
…not commit an exchange marked rollback only An exchange marked rollback only (markRollbackOnly(), markRollbackOnlyLast()) has no exception, so the JPA consumer deleted the entity (or called @consumed) and committed the poll, and the transacted Hazelcast SEDA consumer committed its transaction, removing the message from the queue. The JPA consumer now does not consume such an entity: with transacted=true it throws a RollbackExchangeException so the whole poll is rolled back, with transacted=false it skips the entity and continues with the rest of the batch. The Hazelcast SEDA consumer rolls back its transaction. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 10 of 704 tested, 25 compile-only — current: 10 all testedMaveniverse Scalpel detected 10 affected modules (current approach: 10). Skip-tests mode would test 10 modules (4 direct + 8 downstream), skip tests for 25 (generated code, meta-modules) Modules Scalpel would test (10)
Modules with tests skipped (25)
All tested modules (37 modules, 4m 32s total)Total reactor time: 4m 32s
Top 20 slowest modules:
|
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.
When a route marks the exchange rollback only (
markRollbackOnly(),markRollbackOnlyLast()), there is no exception on the exchange, and these consumers treated it as a success:@Consumed) and committed the poll. Now the entity is not consumed. Withtransacted=trueaRollbackExchangeExceptionrolls back the whole poll, as a failed exchange does. Withtransacted=falsethe entity is skipped quietly (DEBUG log, no WARN for a deliberate rollback) and the rest of the batch is still consumed; the next poll consumes it again.transacted=true): the transaction was committed, so the message was removed from the queue. Now the transaction is rolled back.Same semantics as CAMEL-25511 (camel-jooq) and CAMEL-25527 (camel-mybatis / camel-sql, #27677).
Tests:
JpaConsumerRollbackOnlyTest(non-transacted, transacted,@Consumed; embedded Derby,poll()called directly) andHazelcastSedaTransactedRollbackOnlyTest(mocked transaction context); all fail without the fix. Docs: jpa component doc + 4.23 upgrade guide.Fixes CAMEL-25550
Claude Code on behalf of davsclaus
🤖 Generated with Claude Code