Skip to content

Commit

Permalink
Add consumer partition reassignment strategy env var to optimize cons…
Browse files Browse the repository at this point in the history
…umer group rebalancing.
  • Loading branch information
dspeck1 committed Dec 18, 2024
1 parent c0f131f commit d8b7ea8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/activator/activator.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
fan_out_kafka_cluster = os.environ["FAN_OUT_KAFKA_CLUSTER"]
# Kafka group for next visit fan out messages.
fan_out_kafka_group_id = os.environ["FAN_OUT_KAFKA_GROUP_ID"]
# Kafka consumer partition reassignment strategy
fan_out_partition_assignment_strategy = os.environ["FAN_OUT_PARTITION_REASSIGNMENT_STRATEGY"]
# Kafka topic for next visit fan out messages.
fan_out_kafka_topic = os.environ["FAN_OUT_KAFKA_TOPIC"]
# Kafka topic offset for next visit fan out messages.
Expand Down Expand Up @@ -293,6 +295,7 @@ def keda_start():
fan_out_consumer_conf = {
"bootstrap.servers": fan_out_kafka_cluster,
"group.id": fan_out_kafka_group_id,
"partition.assignment.strategy": fan_out_partition_assignment_strategy,
"auto.offset.reset": fan_out_kafka_topic_offset,
"sasl.mechanism": fan_out_kafka_sasl_mechanism,
"security.protocol": fan_out_kafka_security_protocol,
Expand Down

0 comments on commit d8b7ea8

Please sign in to comment.