Add partition support to Kafka topic creation#56
Merged
Conversation
✅ Deploy Preview for orbital-nebula canceled.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds partition support to Kafka topic creation in the Nebula DSL framework. It implements explicit topic creation using Kafka AdminClient before starting producers to ensure proper partitioning configuration.
- Adds optional partitions parameter to producer DSL with default value of 1
- Implements topic creation using AdminClient with partition count handling for duplicate topics
- Updates data structures to include partition information
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| KafkaExecutor.kt | Adds AdminClient-based topic creation logic with partition support and error handling |
| KafkaDsl.kt | Updates producer DSL to include partitions parameter and modifies data structures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
nebula-dsl/src/main/kotlin/com/orbitalhq/nebula/kafka/KafkaExecutor.kt
Outdated
Show resolved
Hide resolved
nebula-dsl/src/main/kotlin/com/orbitalhq/nebula/kafka/KafkaExecutor.kt
Outdated
Show resolved
Hide resolved
- Add optional partitions parameter to producer DSL (defaults to 1) - Implement explicit topic creation using Kafka AdminClient - Handle multiple producers for same topic by using max partition count - Create topics before starting producers to ensure proper partitioning Closes #55 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
6855cf5 to
48d0c9b
Compare
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.
Closes #55
🤖 Generated with Claude Code