oscerd commented on issue #1730:
URL: 
https://github.com/apache/camel-kafka-connector/issues/1730#issuecomment-6632365669

   Thanks @bhayden53 for the analysis, and @RomanOttGmx for confirming it. We 
checked it against the 4.22.0 jars, and `main` has the same code. The 
`camel.source.pollingConsumer*` options are only added to the `seda:end` URI as 
generic polling-consumer options, which `SedaEndpoint` ignores. The hand-off 
queue therefore keeps SEDA's defaults (size 1000, `blockWhenFull=false`), and a 
burst fails with `IllegalStateException: Queue full`. Passing the values as 
SEDA's own `size` / `blockWhenFull` / `offerTimeout` options, as in your patch, 
fixes it. In the same check, `camel.component.seda.queueSize=<N>` was the only 
existing setting that had an effect: it raises the cap, but producers still 
don't block.
   
   @bhayden53, a PR against `main` (the 4.22.x line) would be very welcome. 
Things worth covering in it:
   - **Behaviour change for the release notes.** With the documented default 
`blockWhenFull=true`, the consumer thread now really blocks when the queue is 
full. An explicit size on the endpoint also wins over 
`camel.component.seda.queueSize`, so anyone using that as a workaround should 
move the value to `camel.source.pollingConsumerQueueSize`.
   - **The stop path.** A consumer thread blocked in `put()` keeps an exchange 
in flight, so stopping the task can wait up to Camel's shutdown timeout.
   - **Tests in `CamelSourceTaskTest`.** Assert the SEDA endpoint's size, 
`blockWhenFull` and `offerTimeout`, and add a back-pressure case, using 
Awaitility rather than `Thread.sleep`.
   
   ---
   _Claude Code on behalf of Andrea Cosentino_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to