[ 
https://issues.apache.org/jira/browse/CAMEL-27896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27896:
--------------------------------
    Description: 
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_

  was:
Found while improving the option descriptions of camel-seda for CAMEL-23832 
(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_


> 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)

Reply via email to