davsclaus commented on code in PR #27681:
URL: https://github.com/apache/camel/pull/27681#discussion_r4246071162
##########
components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java:
##########
@@ -210,6 +211,18 @@ public int processBatch(Queue<Object> exchanges) throws
Exception {
if (exchange.getException() != null) {
// if we failed then throw exception
throw exchange.getException();
+ } else if (exchange.isRollbackOnly() ||
exchange.isRollbackOnlyLast()) {
+ // the route marked the exchange rollback only (there
is no exception): the entity is not
+ // consumed, so the next poll consumes it again
+ if (isTransacted()) {
+ // throw to roll back the whole batch
+ // (the exception must be created before the
exchange is released)
+ throw new RollbackExchangeException(
+ "Rollback transaction due exchange was
marked for rollback only", exchange);
+ }
Review Comment:
Thanks, applied in f0535750b32f: the message now reads "Rollback transaction
due to exchange being marked for rollback only".
_Claude Code on behalf of Claus Ibsen_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]