[
https://issues.apache.org/jira/browse/CAMEL-27473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150809#comment-18150809
]
Federico Mariani commented on CAMEL-27473:
------------------------------------------
[~gnodet] https://github.com/apache/camel/pull/30739 (CAMEL-27515) is merged to
main for 4.24.0 (006d56f3d4d2), and covers the consumer part of this ticket:
the visibility extender survives an exception that is not an {{SdkException}}
and another {{Error}}, and a {{VirtualMachineError}} stops the consumer. Your
test from https://github.com/apache/camel/pull/30747 passes unchanged on it; I
can bring it in a small follow-up PR with you as co-author. If that covers what
you had in mind, this ticket can be resolved with fix version 4.24.0.
_Claude Code on behalf of Croway_
> camel-aws2-sqs - extendMessageVisibility: the visibility is no longer
> extended after one failure that is not an SdkException
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27473
> URL: https://issues.apache.org/jira/browse/CAMEL-27473
> Project: Camel
> Issue Type: Sub-task
> Components: camel-aws2-sqs
> Reporter: Federico Mariani
> Assignee: Guillaume Nodet
> Priority: Major
>
> With {{extendMessageVisibility=true}}, {{Sqs2Consumer}} extends the
> visibility of the messages in flight from a {{TimeoutExtender}} task
> ({{scheduleAtFixedRate}}), whose {{run()}} catches only {{SdkException}}. Any
> other {{RuntimeException}} (such as one of an {{ExecutionInterceptor}} of the
> client), or an Error, ends the task for good. The visibility of the messages
> in flight, and of all the messages the consumer receives after that, is no
> longer extended, so SQS makes them visible again and delivers them a second
> time while the route still processes them. Nothing is logged.
> Reproduced on main with an {{AmazonSQSClientMock}} whose first
> {{changeMessageVisibilityBatch}} throws an {{IllegalStateException}},
> {{visibilityTimeout=2}}, and a route that holds the message for 6 seconds:
> {noformat}
> changeMessageVisibilityBatch calls in 6 seconds: 1 (the extender runs every
> second)
> {noformat}
> Suggested fix: catch {{Exception}}, and an Error that is not a
> {{VirtualMachineError}}, inside {{run()}}, log it, and go on at the next run.
> _Claude Code on behalf of Croway_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)