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

Claus Ibsen updated CAMEL-24196:
--------------------------------
    Fix Version/s: 4.22.0

> camel-aws2-sqs - QueueDoesNotExist swallowed, thread pool leak, and batch 
> chunking
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-24196
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24196
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>              Labels: review-2026-07
>             Fix For: 4.22.0
>
>
> Split from CAMEL-24157 (medium-severity findings, group 3).
> Three remaining SQS findings that require careful design work:
> *1. QueueDoesNotExistException silently swallowed when maxMessagesPerPoll > 
> 10*
> {{Sqs2Consumer:597,655-671}} — When {{maxMessagesPerPoll > 10}}, parallel 
> polling sends multiple requests. The first thread to catch 
> {{QueueDoesNotExistException}} calls {{firePollingError}} (registering 1 
> error), but remaining threads see {{isQueueMissing()}} and return empty 
> without firing errors. Error propagation at line 597 requires {{errorCount() 
> == numberOfRequestsPerPoll}}, which never matches (1 ≠ N). The missing-queue 
> error is silently swallowed and the consumer returns empty forever. Works 
> correctly when {{maxMessagesPerPoll <= 10}}.
> *2. Consumer stop/start cycle leaks PollingTask thread pool*
> {{Sqs2Consumer:302-363,578-587}} — {{doStart()}} unconditionally creates a 
> new {{PollingTask}} with a new {{ExecutorService}} thread pool. Cleanup only 
> happens in {{doShutdown()}}, not {{doStop()}}. Each route stop/start cycle 
> leaks the previous thread pool.
> *3. sendBatchMessage lacks 10-entry chunking*
> {{Sqs2Producer:119-174}} — All entries collected into a single 
> {{sendMessageBatch()}} call. SQS hard-limits batches to 10 entries; 11+ 
> throws {{TooManyEntriesInBatchRequestException}}. Empty iterables and 
> non-String elements are also unhandled.
> *Fix approach:*
> - #1: Propagate error when any parallel request gets QueueDoesNotExist, not 
> only when all fail
> - #2: Add {{doStop()}} override to shut down the PollingTask thread pool and 
> cancel the visibility extender
> - #3: Chunk entries into groups of 10 before calling {{sendMessageBatch()}}; 
> validate inputs



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to