[
https://issues.apache.org/jira/browse/CAMEL-26477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adriano Machado updated CAMEL-26477:
------------------------------------
Description:
Found in CAMEL-25132. With virtual threads enabled, DefaultThreadPoolFactory
does not honor settings that the platform thread pools do.
The scheduled pool does not set the remove on cancel policy, so a cancelled
task stays queued until its delay expires. A split or multicast with a timeout
cancels a task that refers to its MulticastTask when it completes, so its
exchanges stay in memory for the whole timeout.
The scheduled pool has a core size of 0, so tasks run one at a time and
concurrentConsumers of a scheduled consumer has no effect.
The bounded pool returns before the check of the pool sizes, so an invalid size
is accepted.
_Claude Code on behalf of Adriano Machado (@ammachado)_
_This was generated by an AI agent and may contain inaccuracies. Please verify
before relying on it._
was:
Found in CAMEL\-25132. With virtual threads enabled, DefaultThreadPoolFactory
creates the scheduled thread pool without setRemoveOnCancelPolicy, which the
platform thread path does set.
A cancelled task therefore stays in the queue until its delay expires. A split
or multicast with a timeout schedules a task that refers to its MulticastTask,
and cancels it when the exchange completes, so each completed exchange stays in
memory for the whole timeout.
_Claude Code on behalf of Adriano Machado \(@ammachado\)_
_This was generated by an AI agent and may contain inaccuracies. Please verify
before relying on it._
Summary: camel-support - DefaultThreadPoolFactory: virtual thread pools
honor the remove on cancel policy and the pool size (was: camel-support -
DefaultThreadPoolFactory: remove a cancelled task from a virtual scheduled pool)
> camel-support - DefaultThreadPoolFactory: virtual thread pools honor the
> remove on cancel policy and the pool size
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26477
> URL: https://issues.apache.org/jira/browse/CAMEL-26477
> Project: Camel
> Issue Type: Sub-task
> Reporter: Adriano Machado
> Assignee: Adriano Machado
> Priority: Major
> Fix For: 4.24.0
>
>
> Found in CAMEL-25132. With virtual threads enabled, DefaultThreadPoolFactory
> does not honor settings that the platform thread pools do.
> The scheduled pool does not set the remove on cancel policy, so a cancelled
> task stays queued until its delay expires. A split or multicast with a
> timeout cancels a task that refers to its MulticastTask when it completes, so
> its exchanges stay in memory for the whole timeout.
> The scheduled pool has a core size of 0, so tasks run one at a time and
> concurrentConsumers of a scheduled consumer has no effect.
> The bounded pool returns before the check of the pool sizes, so an invalid
> size is accepted.
> _Claude Code on behalf of Adriano Machado (@ammachado)_
> _This was generated by an AI agent and may contain inaccuracies. Please
> verify before relying on it._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)