specweave 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +229 -1817
- package/README.md +68 -0
- package/bin/specweave.js +62 -6
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +287 -0
- package/dist/locales/en/errors.json +7 -0
- package/dist/locales/en/templates.json +6 -0
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +41 -0
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +108 -0
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +108 -0
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +108 -0
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +108 -0
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +269 -0
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +108 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +3 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
- package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +21 -0
- package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/hooks/update-ac-status.js +162 -0
- package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +65 -6
- package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +25 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +191 -0
- package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.d.ts +112 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.js +301 -0
- package/dist/plugins/specweave-github/lib/completion-calculator.js.map +1 -0
- package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +3 -3
- package/dist/plugins/specweave-github/lib/duplicate-detector.js +3 -3
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +70 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.js +258 -0
- package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +14 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +51 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +2 -2
- package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-epic-sync.js +20 -5
- package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +87 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync.js +412 -0
- package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +64 -13
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts +78 -0
- package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js +237 -0
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts +97 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.js +301 -0
- package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts +83 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +386 -0
- package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +28 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +156 -0
- package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts +57 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +248 -0
- package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.d.ts +82 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.js +13 -0
- package/dist/plugins/specweave-kafka/lib/cli/types.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts +49 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.js +316 -0
- package/dist/plugins/specweave-kafka/lib/mcp/detector.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts +70 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.js +23 -0
- package/dist/plugins/specweave-kafka/lib/mcp/types.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts +85 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.js +281 -0
- package/dist/plugins/specweave-kafka/lib/utils/partitioning.js.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts +75 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts.map +1 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.js +238 -0
- package/dist/plugins/specweave-kafka/lib/utils/sizing.js.map +1 -0
- package/dist/spec-parser.js +629 -0
- package/dist/src/cli/commands/import-docs.js +4 -4
- package/dist/src/cli/commands/import-docs.js.map +1 -1
- package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -1
- package/dist/src/cli/commands/init-multiproject.js +17 -18
- package/dist/src/cli/commands/init-multiproject.js.map +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +107 -3
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -1
- package/dist/src/cli/commands/migrate-to-multiproject.js +8 -4
- package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
- package/dist/src/cli/commands/switch-project.d.ts.map +1 -1
- package/dist/src/cli/commands/switch-project.js +9 -26
- package/dist/src/cli/commands/switch-project.js.map +1 -1
- package/dist/src/cli/commands/sync-spec-content.js +3 -0
- package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
- package/dist/src/core/deduplication/command-deduplicator.d.ts +166 -0
- package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -0
- package/dist/src/core/deduplication/command-deduplicator.js +254 -0
- package/dist/src/core/deduplication/command-deduplicator.js.map +1 -0
- package/dist/src/core/increment/active-increment-manager.d.ts +42 -15
- package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -1
- package/dist/src/core/increment/active-increment-manager.js +113 -46
- package/dist/src/core/increment/active-increment-manager.js.map +1 -1
- package/dist/src/core/increment/conflict-resolver.d.ts +40 -0
- package/dist/src/core/increment/conflict-resolver.d.ts.map +1 -0
- package/dist/src/core/increment/conflict-resolver.js +219 -0
- package/dist/src/core/increment/conflict-resolver.js.map +1 -0
- package/dist/src/core/increment/discipline-checker.d.ts.map +1 -1
- package/dist/src/core/increment/discipline-checker.js +7 -1
- package/dist/src/core/increment/discipline-checker.js.map +1 -1
- package/dist/src/core/increment/duplicate-detector.d.ts +52 -0
- package/dist/src/core/increment/duplicate-detector.d.ts.map +1 -0
- package/dist/src/core/increment/duplicate-detector.js +276 -0
- package/dist/src/core/increment/duplicate-detector.js.map +1 -0
- package/dist/src/core/increment/increment-archiver.d.ts +90 -0
- package/dist/src/core/increment/increment-archiver.d.ts.map +1 -0
- package/dist/src/core/increment/increment-archiver.js +368 -0
- package/dist/src/core/increment/increment-archiver.js.map +1 -0
- package/dist/src/core/increment/increment-reopener.d.ts +165 -0
- package/dist/src/core/increment/increment-reopener.d.ts.map +1 -0
- package/dist/src/core/increment/increment-reopener.js +390 -0
- package/dist/src/core/increment/increment-reopener.js.map +1 -0
- package/dist/src/core/increment/metadata-manager.d.ts +26 -1
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +143 -5
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/increment/recent-work-scanner.d.ts +121 -0
- package/dist/src/core/increment/recent-work-scanner.d.ts.map +1 -0
- package/dist/src/core/increment/recent-work-scanner.js +303 -0
- package/dist/src/core/increment/recent-work-scanner.js.map +1 -0
- package/dist/src/core/increment/types.d.ts +1 -0
- package/dist/src/core/increment/types.d.ts.map +1 -1
- package/dist/src/core/increment-utils.d.ts +112 -0
- package/dist/src/core/increment-utils.d.ts.map +1 -0
- package/dist/src/core/increment-utils.js +210 -0
- package/dist/src/core/increment-utils.js.map +1 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.d.ts +65 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.js +175 -0
- package/dist/src/core/living-docs/ac-project-specific-generator.js.map +1 -0
- package/dist/src/core/living-docs/feature-archiver.d.ts +130 -0
- package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -0
- package/dist/src/core/living-docs/feature-archiver.js +549 -0
- package/dist/src/core/living-docs/feature-archiver.js.map +1 -0
- package/dist/src/core/living-docs/feature-id-manager.d.ts +81 -0
- package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -0
- package/dist/src/core/living-docs/feature-id-manager.js +339 -0
- package/dist/src/core/living-docs/feature-id-manager.js.map +1 -0
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts +144 -83
- package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js +488 -270
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
- package/dist/src/core/living-docs/index.d.ts +6 -0
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +6 -0
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/project-detector.d.ts +6 -0
- package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
- package/dist/src/core/living-docs/project-detector.js +35 -1
- package/dist/src/core/living-docs/project-detector.js.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.d.ts +100 -26
- package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -1
- package/dist/src/core/living-docs/spec-distributor.js +1275 -258
- package/dist/src/core/living-docs/spec-distributor.js.map +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts +109 -0
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/task-project-specific-generator.js +221 -0
- package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -0
- package/dist/src/core/living-docs/types.d.ts +143 -0
- package/dist/src/core/living-docs/types.d.ts.map +1 -1
- package/dist/src/core/project-manager.d.ts +2 -17
- package/dist/src/core/project-manager.d.ts.map +1 -1
- package/dist/src/core/project-manager.js +68 -48
- package/dist/src/core/project-manager.js.map +1 -1
- package/dist/src/core/spec-content-sync.d.ts +1 -1
- package/dist/src/core/spec-content-sync.d.ts.map +1 -1
- package/dist/src/core/sync/enhanced-content-builder.d.ts +32 -54
- package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
- package/dist/src/core/sync/enhanced-content-builder.js +142 -138
- package/dist/src/core/sync/enhanced-content-builder.js.map +1 -1
- package/dist/src/core/sync/performance-optimizer.d.ts +153 -0
- package/dist/src/core/sync/performance-optimizer.d.ts.map +1 -0
- package/dist/src/core/sync/performance-optimizer.js +220 -0
- package/dist/src/core/sync/performance-optimizer.js.map +1 -0
- package/dist/src/core/sync/retry-handler.d.ts +98 -0
- package/dist/src/core/sync/retry-handler.d.ts.map +1 -0
- package/dist/src/core/sync/retry-handler.js +196 -0
- package/dist/src/core/sync/retry-handler.js.map +1 -0
- package/dist/src/core/sync/spec-content-sync.d.ts +88 -0
- package/dist/src/core/sync/spec-content-sync.d.ts.map +1 -0
- package/dist/src/core/sync/spec-content-sync.js +5 -0
- package/dist/src/core/sync/spec-content-sync.js.map +1 -0
- package/dist/src/core/sync/types.d.ts +52 -0
- package/dist/src/core/sync/types.d.ts.map +1 -0
- package/dist/src/core/sync/types.js +5 -0
- package/dist/src/core/sync/types.js.map +1 -0
- package/dist/src/core/types/config.d.ts +125 -0
- package/dist/src/core/types/config.d.ts.map +1 -1
- package/dist/src/core/types/config.js +25 -0
- package/dist/src/core/types/config.js.map +1 -1
- package/dist/src/core/types/increment-metadata.d.ts +10 -0
- package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
- package/dist/src/core/types/increment-metadata.js +10 -1
- package/dist/src/core/types/increment-metadata.js.map +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-incremental-mapper.js +4 -8
- package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
- package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-mapper.js +4 -8
- package/dist/src/integrations/jira/jira-mapper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/plugins/specweave/COMMANDS.md +13 -4
- package/plugins/specweave/agents/pm/AGENT.md +159 -12
- package/plugins/specweave/commands/specweave-abandon.md +22 -20
- package/plugins/specweave/commands/specweave-archive-features.md +121 -0
- package/plugins/specweave/commands/specweave-archive-increments.md +82 -0
- package/plugins/specweave/commands/specweave-archive.md +363 -0
- package/plugins/specweave/commands/specweave-backlog.md +211 -0
- package/plugins/specweave/commands/specweave-fix-duplicates.md +517 -0
- package/plugins/specweave/commands/specweave-increment.md +4 -3
- package/plugins/specweave/commands/specweave-progress.md +176 -27
- package/plugins/specweave/commands/specweave-reopen.md +391 -0
- package/plugins/specweave/commands/specweave-restore-feature.md +90 -0
- package/plugins/specweave/commands/specweave-restore.md +309 -0
- package/plugins/specweave/commands/specweave-resume.md +51 -23
- package/plugins/specweave/commands/specweave-status.md +41 -7
- package/plugins/specweave/commands/specweave-sync-specs.md +425 -0
- package/plugins/specweave/commands/specweave.md +70 -405
- package/plugins/specweave/hooks/hooks.json +4 -0
- package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
- package/plugins/specweave/hooks/post-increment-planning.sh +26 -2
- package/plugins/specweave/hooks/post-task-completion.sh +39 -0
- package/plugins/specweave/hooks/pre-command-deduplication.sh +83 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.js +2 -0
- package/plugins/specweave/lib/hooks/sync-living-docs.ts +4 -0
- package/plugins/specweave/lib/hooks/update-ac-status.js +102 -0
- package/plugins/specweave/lib/hooks/update-ac-status.ts +192 -0
- package/plugins/specweave/skills/archive-increments/SKILL.md +198 -0
- package/plugins/specweave/skills/increment-planner/scripts/feature-utils.js +14 -0
- package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +244 -0
- package/plugins/specweave-ado/lib/ado-spec-content-sync.js +49 -5
- package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +72 -6
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-confluent/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-confluent/README.md +375 -0
- package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +306 -0
- package/plugins/specweave-confluent/skills/confluent-kafka-connect/SKILL.md +453 -0
- package/plugins/specweave-confluent/skills/confluent-ksqldb/SKILL.md +470 -0
- package/plugins/specweave-confluent/skills/confluent-schema-registry/SKILL.md +316 -0
- package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +2 -2
- package/plugins/specweave-github/agents/user-story-updater/AGENT.md +148 -0
- package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +1 -1
- package/plugins/specweave-github/commands/specweave-github-update-user-story.md +156 -0
- package/plugins/specweave-github/hooks/post-task-completion.sh +42 -9
- package/plugins/specweave-github/lib/completion-calculator.js +262 -0
- package/plugins/specweave-github/lib/completion-calculator.ts +434 -0
- package/plugins/specweave-github/lib/duplicate-detector.js +3 -3
- package/plugins/specweave-github/lib/duplicate-detector.ts +4 -4
- package/plugins/specweave-github/lib/epic-content-builder.js +265 -0
- package/plugins/specweave-github/lib/epic-content-builder.ts +376 -0
- package/plugins/specweave-github/lib/github-client-v2.js +49 -0
- package/plugins/specweave-github/lib/github-client-v2.ts +59 -0
- package/plugins/specweave-github/lib/github-epic-sync.js +23 -24
- package/plugins/specweave-github/lib/github-epic-sync.ts +30 -5
- package/plugins/specweave-github/lib/github-feature-sync.js +381 -0
- package/plugins/specweave-github/lib/github-feature-sync.ts +568 -0
- package/plugins/specweave-github/lib/github-spec-content-sync.js +40 -10
- package/plugins/specweave-github/lib/github-spec-content-sync.ts +82 -14
- package/plugins/specweave-github/lib/progress-comment-builder.js +229 -0
- package/plugins/specweave-github/lib/progress-comment-builder.ts +324 -0
- package/plugins/specweave-github/lib/user-story-content-builder.js +299 -0
- package/plugins/specweave-github/lib/user-story-content-builder.ts +413 -0
- package/plugins/specweave-github/lib/user-story-issue-builder.js +344 -0
- package/plugins/specweave-github/lib/user-story-issue-builder.ts +543 -0
- package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +189 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +134 -0
- package/plugins/specweave-jira/lib/{enhanced-jira-sync.ts.disabled → enhanced-jira-sync.ts} +26 -52
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +26 -0
- package/plugins/specweave-kafka/IMPLEMENTATION-COMPLETE.md +483 -0
- package/plugins/specweave-kafka/README.md +242 -0
- package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +235 -0
- package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +209 -0
- package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +266 -0
- package/plugins/specweave-kafka/commands/deploy.md +99 -0
- package/plugins/specweave-kafka/commands/dev-env.md +176 -0
- package/plugins/specweave-kafka/commands/mcp-configure.md +101 -0
- package/plugins/specweave-kafka/commands/monitor-setup.md +96 -0
- package/plugins/specweave-kafka/docker/kafka-local/docker-compose.yml +187 -0
- package/plugins/specweave-kafka/docker/redpanda/docker-compose.yml +199 -0
- package/plugins/specweave-kafka/docker/templates/consumer-nodejs.js +225 -0
- package/plugins/specweave-kafka/docker/templates/consumer-python.py +220 -0
- package/plugins/specweave-kafka/docker/templates/producer-nodejs.js +168 -0
- package/plugins/specweave-kafka/docker/templates/producer-python.py +167 -0
- package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.js +438 -0
- package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.ts +541 -0
- package/plugins/specweave-kafka/lib/adapters/platform-adapter.js +47 -0
- package/plugins/specweave-kafka/lib/adapters/platform-adapter.ts +343 -0
- package/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +258 -0
- package/plugins/specweave-kafka/lib/cli/kcat-wrapper.ts +298 -0
- package/plugins/specweave-kafka/lib/cli/types.js +10 -0
- package/plugins/specweave-kafka/lib/cli/types.ts +92 -0
- package/plugins/specweave-kafka/lib/connectors/connector-catalog.js +305 -0
- package/plugins/specweave-kafka/lib/connectors/connector-catalog.ts +528 -0
- package/plugins/specweave-kafka/lib/documentation/diagram-generator.js +114 -0
- package/plugins/specweave-kafka/lib/documentation/diagram-generator.ts +195 -0
- package/plugins/specweave-kafka/lib/documentation/exporter.js +210 -0
- package/plugins/specweave-kafka/lib/documentation/exporter.ts +338 -0
- package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.js +60 -0
- package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.ts +130 -0
- package/plugins/specweave-kafka/lib/documentation/topology-generator.js +143 -0
- package/plugins/specweave-kafka/lib/documentation/topology-generator.ts +290 -0
- package/plugins/specweave-kafka/lib/mcp/detector.js +298 -0
- package/plugins/specweave-kafka/lib/mcp/detector.ts +352 -0
- package/plugins/specweave-kafka/lib/mcp/types.js +21 -0
- package/plugins/specweave-kafka/lib/mcp/types.ts +77 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.js +193 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.ts +362 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.js +188 -0
- package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.ts +359 -0
- package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.js +195 -0
- package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.ts +380 -0
- package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.js +209 -0
- package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.ts +358 -0
- package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.js +354 -0
- package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.ts +563 -0
- package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.js +259 -0
- package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.ts +516 -0
- package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.js +233 -0
- package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.ts +423 -0
- package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.js +266 -0
- package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.ts +445 -0
- package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.js +312 -0
- package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.ts +561 -0
- package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.js +289 -0
- package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.ts +607 -0
- package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.js +264 -0
- package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.ts +498 -0
- package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.js +263 -0
- package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.ts +549 -0
- package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.js +205 -0
- package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.ts +399 -0
- package/plugins/specweave-kafka/lib/performance/performance-optimizer.js +249 -0
- package/plugins/specweave-kafka/lib/performance/performance-optimizer.ts +427 -0
- package/plugins/specweave-kafka/lib/security/kafka-security.js +252 -0
- package/plugins/specweave-kafka/lib/security/kafka-security.ts +494 -0
- package/plugins/specweave-kafka/lib/utils/capacity-planner.js +203 -0
- package/plugins/specweave-kafka/lib/utils/capacity-planner.ts +469 -0
- package/plugins/specweave-kafka/lib/utils/config-validator.js +419 -0
- package/plugins/specweave-kafka/lib/utils/config-validator.ts +564 -0
- package/plugins/specweave-kafka/lib/utils/partitioning.js +329 -0
- package/plugins/specweave-kafka/lib/utils/partitioning.ts +473 -0
- package/plugins/specweave-kafka/lib/utils/sizing.js +221 -0
- package/plugins/specweave-kafka/lib/utils/sizing.ts +374 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-broker-metrics.json +628 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-cluster-overview.json +564 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-consumer-lag.json +509 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-jvm-metrics.json +674 -0
- package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-topic-metrics.json +578 -0
- package/plugins/specweave-kafka/monitoring/grafana/provisioning/dashboards/kafka.yml +17 -0
- package/plugins/specweave-kafka/monitoring/grafana/provisioning/datasources/prometheus.yml +17 -0
- package/plugins/specweave-kafka/monitoring/prometheus/kafka-alerts.yml +415 -0
- package/plugins/specweave-kafka/monitoring/prometheus/kafka-jmx-exporter.yml +256 -0
- package/plugins/specweave-kafka/package.json +41 -0
- package/plugins/specweave-kafka/skills/kafka-architecture/SKILL.md +647 -0
- package/plugins/specweave-kafka/skills/kafka-cli-tools/SKILL.md +433 -0
- package/plugins/specweave-kafka/skills/kafka-iac-deployment/SKILL.md +449 -0
- package/plugins/specweave-kafka/skills/kafka-kubernetes/SKILL.md +667 -0
- package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +273 -0
- package/plugins/specweave-kafka/skills/kafka-observability/SKILL.md +576 -0
- package/plugins/specweave-kafka/templates/config/broker-production.properties +254 -0
- package/plugins/specweave-kafka/templates/config/consumer-low-latency.properties +112 -0
- package/plugins/specweave-kafka/templates/config/producer-high-throughput.properties +120 -0
- package/plugins/specweave-kafka/templates/migration/mirrormaker2-config.properties +234 -0
- package/plugins/specweave-kafka/templates/monitoring/grafana/multi-cluster-dashboard.json +686 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/main.tf +347 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/outputs.tf +107 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/templates/kafka-broker-init.sh.tpl +216 -0
- package/plugins/specweave-kafka/terraform/apache-kafka/variables.tf +156 -0
- package/plugins/specweave-kafka/terraform/aws-msk/main.tf +362 -0
- package/plugins/specweave-kafka/terraform/aws-msk/outputs.tf +93 -0
- package/plugins/specweave-kafka/terraform/aws-msk/templates/server.properties.tpl +32 -0
- package/plugins/specweave-kafka/terraform/aws-msk/variables.tf +235 -0
- package/plugins/specweave-kafka/terraform/azure-event-hubs/main.tf +281 -0
- package/plugins/specweave-kafka/terraform/azure-event-hubs/outputs.tf +118 -0
- package/plugins/specweave-kafka/terraform/azure-event-hubs/variables.tf +148 -0
- package/plugins/specweave-kafka/tsconfig.json +21 -0
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-kafka-streams/README.md +310 -0
- package/plugins/specweave-kafka-streams/skills/kafka-streams-topology/SKILL.md +539 -0
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-n8n/README.md +354 -0
- package/plugins/specweave-n8n/skills/n8n-kafka-workflows/SKILL.md +504 -0
- package/plugins/specweave-release/commands/specweave-release-platform.md +1 -1
- package/plugins/specweave-release/hooks/post-task-completion.sh +2 -2
- package/src/templates/AGENTS.md.template +601 -7
- package/src/templates/CLAUDE.md.template +188 -88
- package/plugins/specweave-ado/commands/specweave-ado-sync-spec.md +0 -255
- package/plugins/specweave-github/commands/specweave-github-sync-epic.md +0 -248
- package/plugins/specweave-github/commands/specweave-github-sync-from.md +0 -147
- package/plugins/specweave-github/commands/specweave-github-sync-spec.md +0 -208
- package/plugins/specweave-github/commands/specweave-github-sync-tasks.md +0 -530
- package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +0 -267
- package/plugins/specweave-jira/commands/specweave-jira-sync-spec.md +0 -240
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# specweave-kafka
|
|
2
|
+
|
|
3
|
+
**Apache Kafka Event Streaming Integration Plugin for SpecWeave**
|
|
4
|
+
|
|
5
|
+
Comprehensive plugin providing MCP server integration, CLI tools (kcat), Terraform infrastructure modules, and full observability stack (Prometheus/Grafana/OpenTelemetry) for Apache Kafka.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
### 🚀 Core Capabilities
|
|
10
|
+
|
|
11
|
+
- **MCP Server Integration**: Auto-detect and configure 4 MCP servers (kanapuli, tuannvm, Joel-hanson, Confluent)
|
|
12
|
+
- **CLI Tool Wrappers**: Type-safe TypeScript wrappers for kcat, kcli, kaf, kafkactl
|
|
13
|
+
- **Multi-Platform Support**: Apache Kafka, Confluent Cloud, Redpanda, AWS MSK, Azure Event Hubs
|
|
14
|
+
- **Infrastructure as Code**: Terraform modules for all major platforms
|
|
15
|
+
- **Local Development**: Docker Compose templates (Kafka KRaft, Redpanda)
|
|
16
|
+
- **Observability**: Prometheus, Grafana dashboards, OpenTelemetry instrumentation
|
|
17
|
+
|
|
18
|
+
### 📚 Skills (6)
|
|
19
|
+
|
|
20
|
+
**Organized for Maximum Efficiency**: Skills are separated by concern for better activation and productivity.
|
|
21
|
+
|
|
22
|
+
- `kafka-architecture` - Event-driven patterns, CQRS, saga patterns, data modeling, capacity planning
|
|
23
|
+
- `kafka-mcp-integration` - MCP server configuration and operations
|
|
24
|
+
- `kafka-cli-tools` - kcat, kcli, kaf, kafkactl usage patterns
|
|
25
|
+
- `kafka-iac-deployment` - Terraform modules, multi-cloud infrastructure deployment (AWS MSK, Azure Event Hubs, Apache Kafka)
|
|
26
|
+
- `kafka-kubernetes` - Strimzi Operator, Confluent Operator, Bitnami Helm chart deployment patterns
|
|
27
|
+
- `kafka-observability` - Prometheus + Grafana setup, JMX exporter, 5 dashboards, 14 alerting rules, SLO definitions
|
|
28
|
+
|
|
29
|
+
### 🤖 Agents (3)
|
|
30
|
+
|
|
31
|
+
- `kafka-architect` - Architecture decisions, capacity planning, design patterns
|
|
32
|
+
- `kafka-devops` - Deployment, configuration management, troubleshooting
|
|
33
|
+
- `kafka-observability` - Monitoring setup, dashboarding, alerting
|
|
34
|
+
|
|
35
|
+
### ⚡ Commands (4)
|
|
36
|
+
|
|
37
|
+
- `/specweave-kafka:deploy` - Deploy Kafka cluster via Terraform (AWS MSK, Azure Event Hubs, Apache Kafka)
|
|
38
|
+
- `/specweave-kafka:monitor-setup` - Setup Prometheus/Grafana monitoring stack with 5 dashboards and 14 alerts
|
|
39
|
+
- `/specweave-kafka:mcp-configure` - Configure MCP server integration (auto-detects kanapuli, tuannvm, Joel-hanson, Confluent)
|
|
40
|
+
- `/specweave-kafka:dev-env` - Setup local development environment (Docker Compose: Kafka KRaft or Redpanda)
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
### Prerequisites
|
|
45
|
+
|
|
46
|
+
- Node.js 18+
|
|
47
|
+
- Docker 20+ (for local development)
|
|
48
|
+
- Terraform 1.5+ (for infrastructure deployment)
|
|
49
|
+
- Claude Code (SpecWeave runtime)
|
|
50
|
+
|
|
51
|
+
### Install Plugin
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Via SpecWeave marketplace
|
|
55
|
+
specweave plugin install specweave-kafka
|
|
56
|
+
|
|
57
|
+
# Or via Claude Code plugin system
|
|
58
|
+
/plugin install specweave-kafka
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
### 1. Start Local Kafka Cluster
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
/specweave-kafka:dev-env start
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This starts a Kafka cluster (KRaft mode) with Schema Registry and Kafka UI on your local machine.
|
|
70
|
+
|
|
71
|
+
### 2. Configure MCP Server
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
/specweave-kafka:mcp-configure
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Auto-detects available MCP servers and generates configuration.
|
|
78
|
+
|
|
79
|
+
### 3. Produce/Consume Messages
|
|
80
|
+
|
|
81
|
+
Use the provided code templates:
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
// Producer example (plugins/specweave-kafka/templates/examples/nodejs-producer.js)
|
|
85
|
+
const { Kafka } = require('kafkajs');
|
|
86
|
+
|
|
87
|
+
const kafka = new Kafka({
|
|
88
|
+
clientId: 'my-producer',
|
|
89
|
+
brokers: ['localhost:9092']
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const producer = kafka.producer();
|
|
93
|
+
await producer.connect();
|
|
94
|
+
await producer.send({
|
|
95
|
+
topic: 'test-topic',
|
|
96
|
+
messages: [{ value: 'Hello Kafka!' }]
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 4. Setup Monitoring
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
/specweave-kafka:monitor-setup
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Deploys Prometheus, Grafana, and pre-built dashboards for Kafka monitoring.
|
|
107
|
+
|
|
108
|
+
## Architecture
|
|
109
|
+
|
|
110
|
+
### Skill Coordination
|
|
111
|
+
|
|
112
|
+
Skills work together in coordinated workflows:
|
|
113
|
+
|
|
114
|
+
**Deployment Workflow** (`/specweave-kafka:deploy`):
|
|
115
|
+
1. `kafka-architect` → Cluster sizing and partitioning strategy
|
|
116
|
+
2. `kafka-iac-deployment` → Generate Terraform modules
|
|
117
|
+
3. `kafka-kubernetes` → Kubernetes manifests (if K8s deployment)
|
|
118
|
+
4. `kafka-observability` → Monitoring stack configuration
|
|
119
|
+
|
|
120
|
+
**Monitoring Workflow** (`/specweave-kafka:monitor-setup`):
|
|
121
|
+
1. `kafka-observability` → JMX exporter configuration
|
|
122
|
+
2. `kafka-observability` → Prometheus scraping setup
|
|
123
|
+
3. `kafka-observability` → Grafana dashboard provisioning (5 dashboards)
|
|
124
|
+
4. `kafka-observability` → Alerting rules deployment (14 critical/high/warning alerts)
|
|
125
|
+
|
|
126
|
+
**Local Development** (`/specweave-kafka:dev-env`):
|
|
127
|
+
1. `kafka-cli-tools` → Docker Compose stack selection (Kafka or Redpanda)
|
|
128
|
+
2. `kafka-observability` → Monitoring integration
|
|
129
|
+
3. `kafka-mcp-integration` → Configure MCP server for local cluster
|
|
130
|
+
|
|
131
|
+
### Supported Platforms
|
|
132
|
+
|
|
133
|
+
| Platform | Auth Methods | Features |
|
|
134
|
+
|----------|-------------|----------|
|
|
135
|
+
| **Apache Kafka** | SASL/SCRAM, mTLS, PLAINTEXT | Full control, KRaft mode support |
|
|
136
|
+
| **Confluent Cloud** | API Keys | Managed, eCKUs, Schema Registry, ksqlDB |
|
|
137
|
+
| **Redpanda** | SASL/SCRAM | Kafka-compatible, faster startup, no JVM |
|
|
138
|
+
| **AWS MSK** | IAM, SASL | AWS integration, CloudWatch metrics |
|
|
139
|
+
| **Azure Event Hubs** | Azure AD | Azure integration, Kafka protocol |
|
|
140
|
+
|
|
141
|
+
### Terraform Modules
|
|
142
|
+
|
|
143
|
+
- `apache-kafka/` - Self-hosted Kafka on Kubernetes (Strimzi)
|
|
144
|
+
- `aws-msk/` - AWS MSK cluster provisioning
|
|
145
|
+
- `azure-event-hubs/` - Azure Event Hubs namespace
|
|
146
|
+
- `monitoring/` - Prometheus + Grafana stack
|
|
147
|
+
|
|
148
|
+
### MCP Servers
|
|
149
|
+
|
|
150
|
+
| Server | Language | Auth Support | Special Features |
|
|
151
|
+
|--------|----------|--------------|------------------|
|
|
152
|
+
| **kanapuli/mcp-kafka** | Node.js | SASL_PLAINTEXT | Basic operations |
|
|
153
|
+
| **tuannvm/kafka-mcp-server** | Go | SCRAM-SHA-256/512 | Advanced SASL |
|
|
154
|
+
| **Joel-hanson/kafka-mcp-server** | Python | Standard | Claude Desktop integration |
|
|
155
|
+
| **Confluent MCP** | Official | OAuth | Natural language, Flink SQL |
|
|
156
|
+
|
|
157
|
+
## Usage Examples
|
|
158
|
+
|
|
159
|
+
### Deploy to AWS MSK
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
/specweave-kafka:deploy aws-msk
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Interactive prompts guide you through:
|
|
166
|
+
- Instance type selection
|
|
167
|
+
- Storage configuration
|
|
168
|
+
- Authentication setup
|
|
169
|
+
- VPC configuration
|
|
170
|
+
|
|
171
|
+
### Setup Security (SASL/SCRAM)
|
|
172
|
+
|
|
173
|
+
Use the provided configuration templates:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
cp plugins/specweave-kafka/templates/security/sasl-scram-config.properties ./kafka-config.properties
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Edit and apply:
|
|
180
|
+
- Broker configuration
|
|
181
|
+
- Client configuration
|
|
182
|
+
- User credentials (use secrets manager)
|
|
183
|
+
|
|
184
|
+
### Monitor Multiple Clusters
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
/specweave-kafka:monitor-setup --multi-cluster
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Creates unified Grafana dashboard with cluster selector.
|
|
191
|
+
|
|
192
|
+
## Testing
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Unit tests
|
|
196
|
+
npm test
|
|
197
|
+
|
|
198
|
+
# Integration tests (requires Docker)
|
|
199
|
+
npm run test:integration
|
|
200
|
+
|
|
201
|
+
# E2E tests (requires Kafka cluster)
|
|
202
|
+
npm run test:e2e
|
|
203
|
+
|
|
204
|
+
# Coverage report
|
|
205
|
+
npm run test:coverage
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Coverage Target**: 85-90%
|
|
209
|
+
|
|
210
|
+
## Documentation
|
|
211
|
+
|
|
212
|
+
- **Getting Started**: `.specweave/docs/public/guides/kafka-getting-started.md`
|
|
213
|
+
- **Advanced Usage**: `.specweave/docs/public/guides/kafka-advanced-usage.md`
|
|
214
|
+
- **Terraform Guide**: `.specweave/docs/public/guides/kafka-terraform.md`
|
|
215
|
+
- **Troubleshooting**: `.specweave/docs/public/guides/kafka-troubleshooting.md`
|
|
216
|
+
- **API Reference**: Generated via TypeDoc
|
|
217
|
+
|
|
218
|
+
## Contributing
|
|
219
|
+
|
|
220
|
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for development setup and guidelines.
|
|
221
|
+
|
|
222
|
+
## Related Plugins
|
|
223
|
+
|
|
224
|
+
- **specweave-confluent** - Confluent Cloud specific features
|
|
225
|
+
- **specweave-kafka-streams** - Kafka Streams + Red Hat AMQ Streams
|
|
226
|
+
- **specweave-n8n** - n8n workflow automation with Kafka
|
|
227
|
+
|
|
228
|
+
## License
|
|
229
|
+
|
|
230
|
+
MIT License - see [LICENSE](../../LICENSE)
|
|
231
|
+
|
|
232
|
+
## Support
|
|
233
|
+
|
|
234
|
+
- **Documentation**: https://spec-weave.com/docs/plugins/kafka
|
|
235
|
+
- **Issues**: https://github.com/anton-abyzov/specweave/issues
|
|
236
|
+
- **Discussions**: https://github.com/anton-abyzov/specweave/discussions
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
**Version**: 1.0.0
|
|
241
|
+
**Last Updated**: 2025-11-15
|
|
242
|
+
**Status**: ✅ Production Ready
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kafka-architect
|
|
3
|
+
description: Kafka architecture and design specialist. Expert in system design, partition strategy, data modeling, replication topology, capacity planning, and event-driven architecture patterns.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kafka Architect Agent
|
|
7
|
+
|
|
8
|
+
I'm a specialized architecture agent with deep expertise in designing scalable, reliable, and performant Apache Kafka systems.
|
|
9
|
+
|
|
10
|
+
## My Expertise
|
|
11
|
+
|
|
12
|
+
### System Design
|
|
13
|
+
- **Event-Driven Architecture**: Event sourcing, CQRS, saga patterns
|
|
14
|
+
- **Microservices Integration**: Service-to-service messaging, API composition
|
|
15
|
+
- **Data Pipelines**: Stream processing, ETL, real-time analytics
|
|
16
|
+
- **Multi-DC Replication**: Disaster recovery, active-active, active-passive
|
|
17
|
+
|
|
18
|
+
### Partition Strategy
|
|
19
|
+
- **Partition Count**: Sizing based on throughput and parallelism
|
|
20
|
+
- **Key Selection**: Avoid hotspots, ensure even distribution
|
|
21
|
+
- **Compaction**: Log-compacted topics for state synchronization
|
|
22
|
+
- **Ordering Guarantees**: Partition-level vs cross-partition ordering
|
|
23
|
+
|
|
24
|
+
### Topic Design
|
|
25
|
+
- **Naming Conventions**: Hierarchical namespaces, domain events
|
|
26
|
+
- **Schema Evolution**: Avro/Protobuf/JSON Schema versioning
|
|
27
|
+
- **Retention Policies**: Time vs size-based, compaction strategies
|
|
28
|
+
- **Replication Factor**: Balancing durability and cost
|
|
29
|
+
|
|
30
|
+
### Capacity Planning
|
|
31
|
+
- **Cluster Sizing**: Broker count, instance types, storage estimation
|
|
32
|
+
- **Growth Projection**: Handle 2-5x current throughput
|
|
33
|
+
- **Cost Optimization**: Right-sizing, tiered storage, compression
|
|
34
|
+
|
|
35
|
+
## When to Invoke Me
|
|
36
|
+
|
|
37
|
+
I activate for:
|
|
38
|
+
- **Architecture questions**: "Design event-driven system", "Kafka for microservices communication"
|
|
39
|
+
- **Partition strategy**: "How many partitions?", "avoid hotspots", "partition key selection"
|
|
40
|
+
- **Topic design**: "Schema evolution strategy", "retention policy", "compaction vs deletion"
|
|
41
|
+
- **Capacity planning**: "How many brokers?", "storage requirements", "throughput estimation"
|
|
42
|
+
- **Performance optimization**: "Reduce latency", "increase throughput", "eliminate bottlenecks"
|
|
43
|
+
- **Data modeling**: "Event structure", "CDC patterns", "domain events"
|
|
44
|
+
|
|
45
|
+
## My Tools
|
|
46
|
+
|
|
47
|
+
**Utilities**:
|
|
48
|
+
- **ClusterSizingCalculator**: Estimate broker count, storage, network bandwidth
|
|
49
|
+
- **PartitioningStrategyAnalyzer**: Detect hotspots, analyze key distribution
|
|
50
|
+
- **ConfigValidator**: Validate broker/producer/consumer configs for performance and durability
|
|
51
|
+
|
|
52
|
+
## Example Workflows
|
|
53
|
+
|
|
54
|
+
### Workflow 1: Design Event-Driven Microservices Architecture
|
|
55
|
+
```
|
|
56
|
+
User: "Design Kafka architecture for e-commerce platform with Order, Payment, Inventory services"
|
|
57
|
+
|
|
58
|
+
Me:
|
|
59
|
+
1. Domain Event Modeling:
|
|
60
|
+
- order-events (created, updated, cancelled, fulfilled)
|
|
61
|
+
- payment-events (authorized, captured, refunded)
|
|
62
|
+
- inventory-events (reserved, allocated, released)
|
|
63
|
+
|
|
64
|
+
2. Topic Design:
|
|
65
|
+
- orders.commands (12 partitions, RF=3, key=orderId)
|
|
66
|
+
- orders.events (12 partitions, RF=3, key=orderId, compacted)
|
|
67
|
+
- payments.events (6 partitions, RF=3, key=paymentId)
|
|
68
|
+
- inventory.events (12 partitions, RF=3, key=productId)
|
|
69
|
+
|
|
70
|
+
3. Consumer Groups:
|
|
71
|
+
- payment-service (consumes orders.events, produces payments.events)
|
|
72
|
+
- inventory-service (consumes orders.events, produces inventory.events)
|
|
73
|
+
- notification-service (consumes orders.events, payments.events)
|
|
74
|
+
|
|
75
|
+
4. Ordering Guarantees:
|
|
76
|
+
- Per-order ordering: Use orderId as partition key
|
|
77
|
+
- Cross-order ordering: Not guaranteed (by design)
|
|
78
|
+
|
|
79
|
+
5. Failure Handling:
|
|
80
|
+
- Idempotent consumers (enable.idempotence=true)
|
|
81
|
+
- Dead Letter Queue for poison messages
|
|
82
|
+
- Retry topics with exponential backoff
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Workflow 2: Partition Strategy for High-Throughput Topic
|
|
86
|
+
```
|
|
87
|
+
User: "I have 10,000 msg/sec, how many partitions?"
|
|
88
|
+
|
|
89
|
+
Me:
|
|
90
|
+
1. Throughput Analysis:
|
|
91
|
+
- Target: 10,000 msg/sec × 1KB avg = 10 MB/sec
|
|
92
|
+
- Producer throughput: ~10 MB/sec per partition (typical)
|
|
93
|
+
- Consumer throughput: ~10 MB/sec per partition (typical)
|
|
94
|
+
|
|
95
|
+
2. Partition Count Calculation:
|
|
96
|
+
- Minimum: ceil(10 MB/sec / 10 MB/sec) = 1 partition (NOT recommended)
|
|
97
|
+
- Recommended: 12 partitions (growth factor 2.5x)
|
|
98
|
+
- Allows scaling to 25,000 msg/sec
|
|
99
|
+
- Supports up to 12 parallel consumers
|
|
100
|
+
- Room for hotspot mitigation
|
|
101
|
+
|
|
102
|
+
3. Partition Key Selection:
|
|
103
|
+
- Good key: userId (if users are evenly distributed)
|
|
104
|
+
- Avoid: timestamp (creates sequential hotspots)
|
|
105
|
+
- Avoid: constant (all messages to partition 0)
|
|
106
|
+
|
|
107
|
+
4. Validation:
|
|
108
|
+
- Use PartitioningStrategyAnalyzer to test key distribution
|
|
109
|
+
- Sample 10,000 keys, check if distribution is uniform
|
|
110
|
+
- Aim for <10% deviation across partitions
|
|
111
|
+
|
|
112
|
+
5. Hotspot Mitigation:
|
|
113
|
+
- If hotspot detected: Use compound keys (userId + random)
|
|
114
|
+
- Example: key = `${userId}-${timestamp % 10}`
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Workflow 3: Capacity Planning for Production Cluster
|
|
118
|
+
```
|
|
119
|
+
User: "Design Kafka cluster for 50,000 msg/sec, 7-day retention"
|
|
120
|
+
|
|
121
|
+
Me:
|
|
122
|
+
1. Throughput Requirements:
|
|
123
|
+
- Peak: 50,000 msg/sec × 1KB avg = 50 MB/sec write
|
|
124
|
+
- Read: Assume 3x write = 150 MB/sec (3 consumer groups)
|
|
125
|
+
|
|
126
|
+
2. Storage Requirements (7-day retention):
|
|
127
|
+
- Daily write: 50 MB/sec × 86,400 sec = 4.32 TB/day
|
|
128
|
+
- 7-day retention: 4.32 TB × 7 × replication factor 3 = 90.7 TB
|
|
129
|
+
- With overhead (30%): ~120 TB total
|
|
130
|
+
|
|
131
|
+
3. Broker Count:
|
|
132
|
+
- Network throughput: 50 MB/sec write + 150 MB/sec read = 200 MB/sec
|
|
133
|
+
- m5.2xlarge: 2.5 Gbps = 312 MB/sec (network)
|
|
134
|
+
- Minimum brokers: ceil(200 / 312) = 1 (NOT enough for HA)
|
|
135
|
+
- Recommended: 5 brokers (40 MB/sec per broker, 40% utilization)
|
|
136
|
+
|
|
137
|
+
4. Storage per Broker:
|
|
138
|
+
- Total: 120 TB / 5 brokers = 24 TB per broker
|
|
139
|
+
- Recommended: 3x 10TB GP3 volumes per broker (30 TB total)
|
|
140
|
+
|
|
141
|
+
5. Instance Selection:
|
|
142
|
+
- m5.2xlarge (8 vCPU, 32 GB RAM)
|
|
143
|
+
- JVM heap: 16 GB (50% of RAM)
|
|
144
|
+
- Page cache: 14 GB (for fast reads)
|
|
145
|
+
|
|
146
|
+
6. Partition Count:
|
|
147
|
+
- Topics: 20 topics × 24 partitions = 480 total partitions
|
|
148
|
+
- Per broker: 480 / 5 = 96 partitions (within recommended <1000 per broker)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Architecture Patterns I Use
|
|
152
|
+
|
|
153
|
+
### Event Sourcing
|
|
154
|
+
- Store all state changes as immutable events
|
|
155
|
+
- Replay events to rebuild state
|
|
156
|
+
- Use log-compacted topics for snapshots
|
|
157
|
+
|
|
158
|
+
### CQRS (Command Query Responsibility Segregation)
|
|
159
|
+
- Separate write (command) and read (query) models
|
|
160
|
+
- Commands → Kafka → Event handlers → Read models
|
|
161
|
+
- Optimized read models per query pattern
|
|
162
|
+
|
|
163
|
+
### Saga Pattern (Distributed Transactions)
|
|
164
|
+
- Choreography-based: Services react to events
|
|
165
|
+
- Orchestration-based: Coordinator service drives workflow
|
|
166
|
+
- Compensation events for rollback
|
|
167
|
+
|
|
168
|
+
### Change Data Capture (CDC)
|
|
169
|
+
- Capture database changes (Debezium, Maxwell)
|
|
170
|
+
- Stream to Kafka
|
|
171
|
+
- Keep Kafka as single source of truth
|
|
172
|
+
|
|
173
|
+
## Best Practices I Enforce
|
|
174
|
+
|
|
175
|
+
### Topic Design
|
|
176
|
+
- ✅ Use hierarchical namespaces: `domain.entity.event-type` (e.g., `ecommerce.orders.created`)
|
|
177
|
+
- ✅ Choose partition count as multiple of broker count (for even distribution)
|
|
178
|
+
- ✅ Set retention based on downstream SLAs (not arbitrary)
|
|
179
|
+
- ✅ Use Avro/Protobuf for schema evolution
|
|
180
|
+
- ✅ Enable log compaction for state topics
|
|
181
|
+
|
|
182
|
+
### Partition Strategy
|
|
183
|
+
- ✅ Key selection: Entity ID (orderId, userId, deviceId)
|
|
184
|
+
- ✅ Avoid sequential keys (timestamp, auto-increment ID)
|
|
185
|
+
- ✅ Target partition count: 2-3x current consumer parallelism
|
|
186
|
+
- ✅ Validate distribution with sample keys (use PartitioningStrategyAnalyzer)
|
|
187
|
+
|
|
188
|
+
### Replication
|
|
189
|
+
- ✅ Replication factor = 3 (standard for production)
|
|
190
|
+
- ✅ min.insync.replicas = 2 (balance durability and availability)
|
|
191
|
+
- ✅ Unclean leader election = false (prevent data loss)
|
|
192
|
+
- ✅ Monitor under-replicated partitions (should be 0)
|
|
193
|
+
|
|
194
|
+
### Producer Configuration
|
|
195
|
+
- ✅ acks=all (wait for all replicas)
|
|
196
|
+
- ✅ enable.idempotence=true (exactly-once semantics)
|
|
197
|
+
- ✅ compression.type=lz4 (balance speed and ratio)
|
|
198
|
+
- ✅ batch.size=65536 (64KB batching for throughput)
|
|
199
|
+
|
|
200
|
+
### Consumer Configuration
|
|
201
|
+
- ✅ enable.auto.commit=false (manual offset management)
|
|
202
|
+
- ✅ max.poll.records=100-500 (avoid session timeout)
|
|
203
|
+
- ✅ isolation.level=read_committed (for transactional producers)
|
|
204
|
+
|
|
205
|
+
## Anti-Patterns I Warn Against
|
|
206
|
+
|
|
207
|
+
- ❌ **Single partition topics**: No parallelism, no scalability
|
|
208
|
+
- ❌ **Too many partitions**: High broker overhead, slow rebalancing
|
|
209
|
+
- ❌ **Weak partition keys**: Sequential keys, null keys, constant keys
|
|
210
|
+
- ❌ **Auto-create topics**: Uncontrolled partition count
|
|
211
|
+
- ❌ **Unclean leader election**: Data loss risk
|
|
212
|
+
- ❌ **Insufficient replication**: Single point of failure
|
|
213
|
+
- ❌ **Ignoring consumer lag**: Backpressure builds up
|
|
214
|
+
- ❌ **Schema evolution without planning**: Breaking changes to consumers
|
|
215
|
+
|
|
216
|
+
## Performance Optimization Techniques
|
|
217
|
+
|
|
218
|
+
1. **Batching**: Increase `batch.size` and `linger.ms` for throughput
|
|
219
|
+
2. **Compression**: Use lz4 or zstd (not gzip)
|
|
220
|
+
3. **Zero-copy**: Enable `sendfile()` for broker-to-consumer transfers
|
|
221
|
+
4. **Page cache**: Leave 50% RAM for OS page cache
|
|
222
|
+
5. **Partition count**: Right-size for parallelism without overhead
|
|
223
|
+
6. **Consumer groups**: Scale consumers = partition count
|
|
224
|
+
7. **Replica placement**: Spread across racks/AZs
|
|
225
|
+
8. **Network tuning**: Increase socket buffers, TCP window
|
|
226
|
+
|
|
227
|
+
## References
|
|
228
|
+
|
|
229
|
+
- Apache Kafka Design Patterns: https://www.confluent.io/blog/
|
|
230
|
+
- Event-Driven Microservices: https://www.oreilly.com/library/view/designing-event-driven-systems/
|
|
231
|
+
- Kafka The Definitive Guide: https://www.confluent.io/resources/kafka-the-definitive-guide/
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
**Invoke me when you need architecture and design expertise for Kafka systems!**
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kafka-devops
|
|
3
|
+
description: Kafka DevOps and SRE specialist. Expert in infrastructure deployment, CI/CD, monitoring, incident response, capacity planning, and operational best practices for Apache Kafka.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kafka DevOps Agent
|
|
7
|
+
|
|
8
|
+
I'm a specialized DevOps/SRE agent with deep expertise in Apache Kafka operations, deployment automation, and production reliability.
|
|
9
|
+
|
|
10
|
+
## My Expertise
|
|
11
|
+
|
|
12
|
+
### Infrastructure & Deployment
|
|
13
|
+
- **Terraform**: Deploy Kafka on AWS (EC2, MSK), Azure (Event Hubs), GCP
|
|
14
|
+
- **Kubernetes**: Strimzi Operator, Confluent Operator, Helm charts
|
|
15
|
+
- **Docker**: Compose stacks for local dev and testing
|
|
16
|
+
- **CI/CD**: GitOps workflows, automated deployments, blue-green upgrades
|
|
17
|
+
|
|
18
|
+
### Monitoring & Observability
|
|
19
|
+
- **Prometheus + Grafana**: JMX exporter configuration, custom dashboards
|
|
20
|
+
- **Alerting**: Critical metrics, SLO/SLI definition, on-call runbooks
|
|
21
|
+
- **Distributed Tracing**: OpenTelemetry integration for producers/consumers
|
|
22
|
+
- **Log Aggregation**: ELK stack, Datadog, CloudWatch integration
|
|
23
|
+
|
|
24
|
+
### Operational Excellence
|
|
25
|
+
- **Capacity Planning**: Cluster sizing, throughput estimation, growth projections
|
|
26
|
+
- **Performance Tuning**: Broker config, OS tuning, JVM optimization
|
|
27
|
+
- **Disaster Recovery**: Backup strategies, MirrorMaker 2, multi-DC replication
|
|
28
|
+
- **Security**: TLS/SSL, SASL authentication, ACLs, encryption at rest
|
|
29
|
+
|
|
30
|
+
### Incident Response
|
|
31
|
+
- **On-Call Runbooks**: Under-replicated partitions, broker failures, disk full
|
|
32
|
+
- **Troubleshooting**: High latency, consumer lag, rebalancing issues
|
|
33
|
+
- **Root Cause Analysis**: Post-mortems, blameless retrospectives
|
|
34
|
+
- **Remediation**: Quick fixes, long-term improvements
|
|
35
|
+
|
|
36
|
+
## When to Invoke Me
|
|
37
|
+
|
|
38
|
+
I activate for:
|
|
39
|
+
- **Infrastructure questions**: "How to deploy Kafka on Kubernetes?", "Terraform module for AWS MSK"
|
|
40
|
+
- **Operational issues**: "Broker down", "under-replicated partitions", "high consumer lag"
|
|
41
|
+
- **Deployment automation**: "CI/CD pipeline for Kafka upgrades", "GitOps workflow"
|
|
42
|
+
- **Monitoring setup**: "Configure Prometheus for Kafka", "create Grafana dashboards"
|
|
43
|
+
- **Capacity planning**: "How many brokers do I need?", "partition count for 10K msg/sec"
|
|
44
|
+
- **Performance tuning**: "Optimize Kafka for low latency", "reduce GC pauses"
|
|
45
|
+
|
|
46
|
+
## My Tools & References
|
|
47
|
+
|
|
48
|
+
**Scripts & Configs**:
|
|
49
|
+
- Terraform modules: `plugins/specweave-kafka/terraform/`
|
|
50
|
+
- Docker Compose: `plugins/specweave-kafka/docker/`
|
|
51
|
+
- Monitoring configs: `plugins/specweave-kafka/monitoring/`
|
|
52
|
+
- Sample code: `plugins/specweave-kafka/docker/templates/`
|
|
53
|
+
|
|
54
|
+
**Utilities**:
|
|
55
|
+
- MCPServerDetector: Auto-detect MCP servers
|
|
56
|
+
- KcatWrapper: CLI tool integration
|
|
57
|
+
- ClusterSizingCalculator: Broker count and storage estimation
|
|
58
|
+
- ConfigValidator: Validate broker/producer/consumer configs
|
|
59
|
+
|
|
60
|
+
## Example Workflows
|
|
61
|
+
|
|
62
|
+
### Workflow 1: Deploy Production Kafka on AWS
|
|
63
|
+
```
|
|
64
|
+
User: "I need to deploy a production Kafka cluster on AWS for 5000 msg/sec"
|
|
65
|
+
|
|
66
|
+
Me:
|
|
67
|
+
1. Sizing calculation:
|
|
68
|
+
- Expected throughput: 5000 msg/sec × 1KB avg = 5 MB/sec
|
|
69
|
+
- Recommended: 3 brokers (m5.xlarge)
|
|
70
|
+
- Storage: 500GB GP3 per broker
|
|
71
|
+
- Replication factor: 3, min.insync.replicas: 2
|
|
72
|
+
|
|
73
|
+
2. Platform recommendation:
|
|
74
|
+
- AWS MSK for managed operations
|
|
75
|
+
- OR Apache Kafka on EC2 for full control
|
|
76
|
+
|
|
77
|
+
3. Terraform deployment:
|
|
78
|
+
- Use aws-msk module OR apache-kafka module
|
|
79
|
+
- Generate terraform configuration
|
|
80
|
+
- Execute: terraform init && terraform apply
|
|
81
|
+
|
|
82
|
+
4. Post-deployment:
|
|
83
|
+
- Configure monitoring (JMX exporter + Prometheus)
|
|
84
|
+
- Set up alerting (14 critical/high/warning alerts)
|
|
85
|
+
- Create test topics and verify connectivity
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Workflow 2: Troubleshoot Under-Replicated Partitions
|
|
89
|
+
```
|
|
90
|
+
User: "We have 50 under-replicated partitions, what's wrong?"
|
|
91
|
+
|
|
92
|
+
Me:
|
|
93
|
+
1. Immediate checks:
|
|
94
|
+
- `kafka-topics.sh --describe --under-replicated-partitions`
|
|
95
|
+
- Check broker status: All brokers up?
|
|
96
|
+
- Check network: Latency between brokers?
|
|
97
|
+
|
|
98
|
+
2. Common causes:
|
|
99
|
+
- Broker failure or restart
|
|
100
|
+
- Network issues
|
|
101
|
+
- Slow disk I/O (check `iostat -x 1`)
|
|
102
|
+
- High producer throughput exceeding replication capacity
|
|
103
|
+
|
|
104
|
+
3. Investigation:
|
|
105
|
+
- Check broker logs for errors
|
|
106
|
+
- Review JMX metrics: ISR shrinks rate, replica lag
|
|
107
|
+
- Check disk usage and IOPS
|
|
108
|
+
|
|
109
|
+
4. Remediation:
|
|
110
|
+
- If broker down: Restart it
|
|
111
|
+
- If network issues: Fix routing/firewall
|
|
112
|
+
- If slow disk: Increase IOPS (use GP3 or io2)
|
|
113
|
+
- If throughput: Scale horizontally (add brokers)
|
|
114
|
+
|
|
115
|
+
5. Prevention:
|
|
116
|
+
- Monitor ISR shrinks rate (alert if > 5/sec)
|
|
117
|
+
- Set up disk I/O monitoring
|
|
118
|
+
- Regular capacity planning reviews
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Workflow 3: Set Up Complete Monitoring Stack
|
|
122
|
+
```
|
|
123
|
+
User: "Set up monitoring for our Kafka cluster"
|
|
124
|
+
|
|
125
|
+
Me:
|
|
126
|
+
1. JMX Exporter setup:
|
|
127
|
+
- Download jmx_prometheus_javaagent JAR
|
|
128
|
+
- Copy kafka-jmx-exporter.yml config
|
|
129
|
+
- Add to KAFKA_OPTS: -javaagent:/opt/jmx_prometheus_javaagent.jar=7071:/opt/kafka-jmx-exporter.yml
|
|
130
|
+
- Restart brokers
|
|
131
|
+
|
|
132
|
+
2. Prometheus configuration:
|
|
133
|
+
- Add Kafka scrape config (job: kafka, port: 7071)
|
|
134
|
+
- Reload Prometheus: kill -HUP $(pidof prometheus)
|
|
135
|
+
|
|
136
|
+
3. Grafana dashboards:
|
|
137
|
+
- Install 5 dashboards (cluster, broker, consumer lag, topics, JVM)
|
|
138
|
+
- Configure Prometheus datasource
|
|
139
|
+
|
|
140
|
+
4. Alerting rules:
|
|
141
|
+
- Create 14 alerts (critical/high/warning)
|
|
142
|
+
- Configure notification channels (Slack, PagerDuty)
|
|
143
|
+
- Write runbooks for critical alerts
|
|
144
|
+
|
|
145
|
+
5. Verification:
|
|
146
|
+
- Test metrics scraping
|
|
147
|
+
- Open dashboards
|
|
148
|
+
- Trigger test alert (stop a broker)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Best Practices I Enforce
|
|
152
|
+
|
|
153
|
+
### Deployment
|
|
154
|
+
- ✅ Use KRaft mode (no ZooKeeper dependency)
|
|
155
|
+
- ✅ Multi-AZ deployment (spread brokers across 3+ AZs)
|
|
156
|
+
- ✅ Replication factor = 3, min.insync.replicas = 2
|
|
157
|
+
- ✅ Disable unclean.leader.election.enable (prevent data loss)
|
|
158
|
+
- ✅ Set auto.create.topics.enable = false (explicit topic creation)
|
|
159
|
+
|
|
160
|
+
### Monitoring
|
|
161
|
+
- ✅ Monitor under-replicated partitions (should be 0)
|
|
162
|
+
- ✅ Monitor offline partitions (should be 0)
|
|
163
|
+
- ✅ Monitor active controller count (should be exactly 1)
|
|
164
|
+
- ✅ Track consumer lag per group
|
|
165
|
+
- ✅ Alert on ISR shrinks rate (>5/sec = issue)
|
|
166
|
+
|
|
167
|
+
### Performance
|
|
168
|
+
- ✅ Use SSD storage (GP3 or better)
|
|
169
|
+
- ✅ Tune JVM heap (50% of RAM, max 32GB)
|
|
170
|
+
- ✅ Use G1GC for garbage collection
|
|
171
|
+
- ✅ Increase num.network.threads and num.io.threads
|
|
172
|
+
- ✅ Enable compression (lz4 for balance of speed and ratio)
|
|
173
|
+
|
|
174
|
+
### Security
|
|
175
|
+
- ✅ Enable TLS/SSL encryption in transit
|
|
176
|
+
- ✅ Use SASL authentication (SCRAM-SHA-512)
|
|
177
|
+
- ✅ Implement ACLs for topic/group access
|
|
178
|
+
- ✅ Rotate credentials regularly
|
|
179
|
+
- ✅ Enable encryption at rest (for sensitive data)
|
|
180
|
+
|
|
181
|
+
## Common Incidents I Handle
|
|
182
|
+
|
|
183
|
+
1. **Under-Replicated Partitions** → Check broker health, network, disk I/O
|
|
184
|
+
2. **High Consumer Lag** → Scale consumers, optimize processing logic
|
|
185
|
+
3. **Broker Out of Disk** → Reduce retention, expand volumes
|
|
186
|
+
4. **High GC Time** → Increase heap, tune GC parameters
|
|
187
|
+
5. **Connection Refused** → Check security groups, SASL config, TLS certificates
|
|
188
|
+
6. **Leader Election Storm** → Disable auto leader rebalancing, check network stability
|
|
189
|
+
7. **Offline Partitions** → Identify failed brokers, restart safely
|
|
190
|
+
8. **ISR Shrinks** → Investigate replication lag, disk I/O, network latency
|
|
191
|
+
|
|
192
|
+
## Runbooks
|
|
193
|
+
|
|
194
|
+
For critical alerts, I reference these runbooks:
|
|
195
|
+
- Under-Replicated Partitions: `monitoring/prometheus/kafka-alerts.yml` (Alert 1)
|
|
196
|
+
- Offline Partitions: `monitoring/prometheus/kafka-alerts.yml` (Alert 2)
|
|
197
|
+
- No Active Controller: `monitoring/prometheus/kafka-alerts.yml` (Alert 3)
|
|
198
|
+
- High Consumer Lag: `monitoring/prometheus/kafka-alerts.yml` (Alert 6)
|
|
199
|
+
|
|
200
|
+
## References
|
|
201
|
+
|
|
202
|
+
- Apache Kafka Documentation: https://kafka.apache.org/documentation/
|
|
203
|
+
- Confluent Best Practices: https://docs.confluent.io/platform/current/
|
|
204
|
+
- Strimzi Docs: https://strimzi.io/docs/
|
|
205
|
+
- Prometheus JMX Exporter: https://github.com/prometheus/jmx_exporter
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
**Invoke me when you need DevOps/SRE expertise for Kafka deployment, monitoring, or incident response!**
|