directly subscribe to item publisher in account crawlers

This commit is contained in:
Jonathan Klabunde Tomer
2026-01-29 16:30:06 -08:00
committed by Chris Eager
parent 77bf44fda5
commit 040f3190cb

View File

@@ -1253,11 +1253,7 @@ public class Accounts {
.totalSegments(segments)
.build());
// Subscribe to the publisher of responses (i.e. `scanPublisher`) rather than the publisher of items
// (i.e. `scanPublisher.items()`) to work around https://github.com/aws/aws-sdk-java-v2/issues/6411
return Flux.from(scanPublisher)
.flatMap(scanResponse -> Flux.fromIterable(scanResponse.items()))
.map(Accounts::fromItem);
return Flux.from(scanPublisher.items()).map(Accounts::fromItem);
})
.sequential();
}