Skip to content

[backport camel-4.18.x] CAMEL-24357: camel-aws2-s3-vectors - consumer returns no results (topK=0), ignores delay, loses vectors - #25377

Merged
davsclaus merged 1 commit into
apache:camel-4.18.xfrom
oscerd:fix/CAMEL-24357-4.18.x
Aug 6, 2026
Merged

[backport camel-4.18.x] CAMEL-24357: camel-aws2-s3-vectors - consumer returns no results (topK=0), ignores delay, loses vectors#25377
davsclaus merged 1 commit into
apache:camel-4.18.xfrom
oscerd:fix/CAMEL-24357-4.18.x

Conversation

@oscerd

@oscerd oscerd commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Backport of #25369 to camel-4.18.x.

The aws2-s3-vectors consumer sent topK(0) on every poll (the base maxMessagesPerPoll was never wired, so Math.min(0, topK) = 0) and delivered nothing; the delay option was a dead shadow field; and vectors were marked processed before routing, so a failed exchange was skipped forever. The consumer now wires maxMessagesPerPoll, sends a valid topK (>= 1), propagates delay to the scheduler, and only marks a vector processed on success (dropping it on failure for retry).

Adds AWS2S3VectorsConsumerTest; s3-vectors tests green on this branch.

Claude Code on behalf of oscerd

…ors delay, and no longer loses vectors on failure

The aws2-s3-vectors consumer had several defects rooted in consumer options that
shadow the base scheduled-poll options:

- poll() sent topK(Math.min(getMaxMessagesPerPoll(), topK)) where the base
  maxMessagesPerPoll field was never wired (default 0), so topK(0) was sent and
  AWS returned nothing. maxMessagesPerPoll is now wired from the configuration in
  createConsumer and topK treats a non-positive cap as "unlimited".
- the delay option bound to a configuration field the consumer never read; it is
  now propagated to the consumer's scheduler.
- vectors were marked processed before routing, so a failed exchange was skipped
  forever; the de-dup set is now only populated when deleteAfterRead=false and an
  id is dropped again on failure so the vector can be retried on a later poll.

Adds AWS2S3VectorsConsumerTest covering the topK and delay fixes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd
oscerd requested review from Croway and davsclaus August 6, 2026 08:03
@oscerd oscerd added the bug Something isn't working label Aug 6, 2026
@oscerd oscerd added this to the 4.18.4 milestone Aug 6, 2026
@davsclaus
davsclaus merged commit 1ed1f74 into apache:camel-4.18.x Aug 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants