Claus Ibsen created CAMEL-27714:
-----------------------------------
Summary: camel-aws-cloudtrail: default delay uses the LookupEvents
quota, doc claims Insights events
Key: CAMEL-27714
URL: https://issues.apache.org/jira/browse/CAMEL-27714
Project: Camel
Issue Type: Bug
Components: camel-aws
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while improving the option descriptions of camel-aws-cloudtrail for
CAMEL-23832 (commit
https://github.com/apache/camel/commit/e504b1b8fd04d643b3d3fbd20dad57c7f464254a).
These are separate problems of the component; the descriptions commit only
documents the current behavior.
h4. 1. The default poll delay uses the whole LookupEvents rate limit
{{CloudtrailConsumer.poll()}} sends at least one {{LookupEvents}} request on
every poll, and the endpoint keeps the default {{delay}} of 500 ms of
{{ScheduledPollConsumer}}. That is up to two requests per second, which is the
whole quota of {{LookupEvents}} (two requests per second per account and
Region). Every further page of new events, the late-event lookup
({{lookBackWindow}}), a second consumer or any other client of {{LookupEvents}}
in the same account and Region then goes above the quota, and AWS throttles the
requests. The doc page describes this, but a user who keeps the defaults runs
at the limit.
Proposed change: give the consumer a larger default {{delay}} (for example 5
seconds, CloudTrail typically delivers an event within 5 minutes anyway), and
mention it in the upgrade guide.
h4. 2. The doc page says that CloudTrail Insights events are consumed where
enabled
{{aws-cloudtrail-component.adoc}} says under "CloudTrail Events consumed" that
{{LookupEvents}} takes into account management events "and CloudTrail insight
events where enabled". {{CloudtrailConsumer.poll()}} and {{lookBackPage()}}
never set {{eventCategory}} on the {{LookupEventsRequest}}, and without
{{eventCategory=insight}} {{LookupEvents}} returns no Insights events. So the
consumer only receives management events.
Proposed change: correct the sentence, or add an option that sets the event
category to {{insight}}.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)