[
https://issues.apache.org/jira/browse/CAMEL-24993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-24993 started by Claus Ibsen.
-------------------------------------------
> camel-core - toD, Routing Slip and producer cache: fix bugs found in a deep
> review
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-24993
> URL: https://issues.apache.org/jira/browse/CAMEL-24993
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
>
> A deep review of the dynamic routing EIPs (toD / SendDynamicProcessor,
> Routing Slip, Dynamic Router) and the producer cache they share found the
> bugs below. Each one was reproduced against 4.23.0-SNAPSHOT.
> # *toD sends the exchange after its pre-processor failed.* When the
> pre-processor of a SendDynamicAware component (the optimised toD for
> components such as http or kafka) threw an exception, SendDynamicProcessor
> set the exception and called the callback, but did not return. So it still
> sent the exchange to the endpoint, and the callback was called a second time
> when the send completed.
> # *A routing slip does not stop a prototype endpoint whose step completes
> asynchronously.* With cacheSize=-1 each recipient is a prototype endpoint
> that is stopped after use. The endpoint was only stopped when its step
> completed synchronously. When the first step completed asynchronously, its
> prototype endpoint was never stopped. This also applies to the Dynamic
> Router, which extends the Routing Slip.
> # *After purging a producer cache, the next send to the last used endpoint
> uses a stopped producer.* DefaultProducerCache.purge() (the JMX purge
> operation of a producer cache) stops and restarts the producer pool, but kept
> its reference to the last used producer. The next send to that endpoint
> reused the stopped producer.
> _Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)