This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 66233fb72277 CAMEL-23686: Fix clock reset on wrong exchange in
PooledProcessorExchangeFactory (#23770)
66233fb72277 is described below
commit 66233fb72277c14d6a5060c3a4e4a18b34146f6f
Author: Guillaume Nodet <[email protected]>
AuthorDate: Thu Jun 4 20:41:29 2026 +0200
CAMEL-23686: Fix clock reset on wrong exchange in
PooledProcessorExchangeFactory (#23770)
createCopy() and createCorrelatedCopy() were resetting the ORIGINAL
exchange's clock instead of the COPY's clock. This meant the copy
carried the original's creation timestamp while the original's clock
was incorrectly reset.
Co-authored-by: Claude Opus 4.6 <[email protected]>
---
.../apache/camel/impl/engine/PooledProcessorExchangeFactory.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledProcessorExchangeFactory.java
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledProcessorExchangeFactory.java
index 5faa371bb804..212acf625015 100644
---
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledProcessorExchangeFactory.java
+++
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledProcessorExchangeFactory.java
@@ -72,8 +72,8 @@ public class PooledProcessorExchangeFactory extends
PrototypeProcessorExchangeFa
}
}
- // reset exchange for reuse
- ((ResetableClock) exchange.getClock()).reset();
+ // reset the copy's clock for reuse
+ ((ResetableClock) answer.getClock()).reset();
ExchangeHelper.copyResults(answer, exchange);
return answer;
}
@@ -96,8 +96,8 @@ public class PooledProcessorExchangeFactory extends
PrototypeProcessorExchangeFa
}
}
- // reset exchange for reuse
- ((ResetableClock) exchange.getClock()).reset();
+ // reset the copy's clock for reuse
+ ((ResetableClock) answer.getClock()).reset();
ExchangeHelper.copyResults(answer, exchange);
// do not reuse message id on copy