psolomin commented on code in PR #23540:
URL: https://github.com/apache/beam/pull/23540#discussion_r992758305
##########
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/ShardReadersPool.java:
##########
@@ -129,8 +129,43 @@ void startReadingShards(Iterable<ShardRecordsIterator>
shardRecordsIterators, St
getShardIdsFromRecordsIterators(shardRecordsIterators));
for (final ShardRecordsIterator recordsIterator : shardRecordsIterators) {
numberOfRecordsInAQueueByShard.put(recordsIterator.getShardId(), new
AtomicInteger());
- RateLimitPolicy policy =
read.getRateLimitPolicyFactory().getRateLimitPolicy();
- executorService.submit(() -> readLoop(recordsIterator, policy));
+
+ if (recordsIterator.hasConsumer()) {
+ LOG.info(
+ "Subscribing to shard {} via consumer {}",
+ recordsIterator.getShardId(),
+ recordsIterator.getConsumerInfo());
+ executorService.submit(() -> subscribeLoop(recordsIterator));
Review Comment:
> use a ShardSubscribersPool instead as "entry point"
Exactly my feeling, yes. And this is actually the direction of my next
iteration. Let's see how it goes.
--
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]