Optimize kafka consumer by merging identical consumers#363
Draft
Yashwanth-Ranjan-Singaravel wants to merge 8 commits intoopen-lambda:mainfrom
Draft
Optimize kafka consumer by merging identical consumers#363Yashwanth-Ranjan-Singaravel wants to merge 8 commits intoopen-lambda:mainfrom
Yashwanth-Ranjan-Singaravel wants to merge 8 commits intoopen-lambda:mainfrom
Conversation
Contributor
Author
|
Depends on the group removal pr at #362 |
tylerharter
approved these changes
Nov 13, 2025
| copy(topics, trigger.Topics) | ||
| sort.Strings(topics) | ||
|
|
||
| // Create canonical key: brokers|topics|offset_reset |
Member
There was a problem hiding this comment.
Ok to make it a TODO for now. But do we need to escape this? Could "|" be in the topic name?
| // ComputeTriggerKey creates a deterministic key from trigger config | ||
| func ComputeTriggerKey(trigger *common.KafkaTrigger) TriggerKey { | ||
| // Sort brokers and topics for consistency | ||
| brokers := make([]string, len(trigger.BootstrapServers)) |
Member
There was a problem hiding this comment.
Ok to make a TODO, but different functions could pick different bootstrap servers in the same Kafka cluster, so these would still be the same.
| "lambda_count", len(lambdaNames)) | ||
|
|
||
| // Invoke all lambdas in parallel | ||
| var wg sync.WaitGroup |
Member
There was a problem hiding this comment.
Let's not bother with a working group since we will batch soon
| "total_lambdas", consumer.getLambdaCount()) | ||
| } else { | ||
| // CREATE: New consumer needed | ||
| trigger.GroupId = string(triggerKey) // Use trigger key as group ID |
Member
There was a problem hiding this comment.
Not necessarily here, but we need some more general commenting about how we're multiplexing lambda-based consumer groups (that we create ourselves) on a single consumer group visible to Kafka.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.