[
https://issues.apache.org/jira/browse/CAMEL-27896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18153352#comment-18153352
]
Guillaume Nodet commented on CAMEL-27896:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Both bugs confirmed on main:
*Bug 1 (size sentinel):* In SedaEndpoint.getQueue() and registerQueueIfStale(),
the check `getSize() == Integer.MAX_VALUE || getSize() ==
SedaConstants.QUEUE_SIZE` (where QUEUE_SIZE=1000) causes these values to be
treated as "not set", defeating explicit size configuration for endpoints
created after context start.
*Bug 2 (concurrentConsumers with virtual threads):* In SedaEndpoint.doInit(),
the line `if (virtualThreadPerTask && concurrentConsumers == 1) {
concurrentConsumers = 0; }` unconditionally overrides an explicit
concurrentConsumers=1 setting, making 1 thread impossible with virtual threads
enabled.
Fix plan: track whether size/concurrentConsumers were explicitly set by the
user before applying defaults.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> camel-seda: size 1000 or Integer.MAX_VALUE is treated as not set for
> endpoints created after start, concurrentConsumers=1 is impossible with
> virtual threads
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27896
> URL: https://issues.apache.org/jira/browse/CAMEL-27896
> Project: Camel
> Issue Type: Bug
> Components: camel-seda
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-seda for CAMEL-23832
> (commit
> https://github.com/apache/camel/commit/75db9fd61fefdeccafd7be357062dd8e7ba31805,
> pull request https://github.com/apache/camel/pull/31159).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. size 1000 or Integer.MAX_VALUE is treated as not set
> {{SedaEndpoint.getQueue()}} and registerQueueIfStale() compare size with 1000
> and Integer.MAX_VALUE to see if it was set. For an endpoint created after the
> CamelContext started (for example by toD), size=1000 with a component
> queueSize=500 gets a queue of 500, and size=2147483647 does not give an
> unbounded queue.
> Proposed change: record whether size was set instead of comparing with magic
> values.
> h4. 2. concurrentConsumers=1 is impossible with virtualThreadPerTask
> {{SedaEndpoint.doInit()}} turns concurrentConsumers 1 into 0 (no limit) when
> virtualThreadPerTask is on, also when 1 was set on purpose.
> Proposed change: apply the 0 default only when the option was not set.
> h4. 3. failIfNoConsumers and discardIfNoConsumers are not checked
> The old docs said only one can be enabled, but nothing checks it;
> SedaProducer.addToQueue lets fail win.
> Proposed change: validate it in doInit, or keep the precedence (the new text
> describes it).
> h4. 4. queueFactory and stub
> queueFactory works per endpoint (SedaComponent.createEndpoint resolves it)
> but has no @UriParam, so it is missing from the catalog and the DSL while the
> doc page uses it. StubComponent.setProperties is a no-op, so stub ignores
> most seda options that stub.json still lists.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)