Skip to content

Commit

Permalink
improve distribution of partitions across replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
QProgS committed Oct 26, 2022
1 parent a0e0b35 commit ca7817a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public Sink(

Properties consumerProperties = PropertiesUtil.ofScope(properties, Scopes.CONSUMER);
consumerProperties.put(ConsumerConfig.GROUP_ID_CONFIG, consumerGroupId);
String consumerId = Application.context().getInstanceId() + "-" + CONSUMER_CLIENT_ID_SEQUENCE.getAndIncrement();
String consumerId = CONSUMER_CLIENT_ID_SEQUENCE.getAndIncrement() + "-" + Application.context().getInstanceId();
consumerProperties.put(ConsumerConfig.CLIENT_ID_CONFIG, consumerId);
consumerProperties.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
consumerProperties.putIfAbsent(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, batchSize);
Expand Down

0 comments on commit ca7817a

Please sign in to comment.