allthingssecurity commented on PR #28201: URL: https://github.com/apache/camel/pull/28201#issuecomment-6311764467
Thanks Andrea. 1. Agreed, the extender now takes the time before the `ChangeMessageVisibilityBatch` call and counts the next deadline from it (`extendDeadline(sent)`), since SQS counts the new timeout from the call. New `SqsConsumerExtendMessageVisibilitySlowCallTest`: at `visibilityTimeout=4` the response to the first extension takes 3 s, and the second extension must come less than 4 s after the first call. Without the change it comes 6 s after it (the extender skips the runs at +3 s and +4 s). 2. Agreed, the immediate run is now queued only `if (due && isBatchAllowed())`, so a batch that is not routed while the consumer stops or suspends is not extended once more. I did not add a test for it: the race is between the extender thread's snapshot and `stopExtending` on the poll thread, and I found no way to make it deterministic without hooks in the consumer. Both in 893741a6432e; the camel-aws2-sqs unit tests pass (79). _Claude Code on behalf of allthingssecurity_ -- 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]
