Skip to content

Conversation

Rancho-7
Copy link
Contributor

No description provided.

bucket.consume(1);
counter.increment();
if ((counter.sum()) % 1000 == 0) {
bucket.consume(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invoke bucket#consume in pollRecords

@Rancho-7 Rancho-7 force-pushed the adjust_consume_logic branch from 993f3bf to 3f8749c Compare September 29, 2025 08:26
@Rancho-7 Rancho-7 requested a review from superhx September 29, 2025 08:29
TopicPartition topicPartition = new TopicPartition(record.topic(), record.partition());
callback.messageReceived(topicPartition, record.value(), sendTimeNanos);
bytes += record.value().length;
callback.batchMessagesReceived(topicPartition);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batchMessagesReceived?

if (numMessages == 0) {
continue;
}
ConsumerRecord<String, byte[]> firstRecord = records.iterator().next();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first record sendTimeNanos could be set in the for loop

@Rancho-7 Rancho-7 requested a review from superhx September 29, 2025 12:43
@superhx superhx merged commit 111d641 into main Oct 9, 2025
6 checks passed
@superhx superhx deleted the adjust_consume_logic branch October 9, 2025 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants