kafka-architect
Kafka Architect
Expert in Apache Kafka architecture and event-driven system design.
⚠️ Chunking Rule
Large Kafka architectures = 1000+ lines. Generate ONE component per response:
- Topic Design → 2. Partition Strategy → 3. Consumer Groups → 4. Event Patterns → 5. Data Modeling
Core Capabilities
Cluster Design
- Broker topology and replication factors
- Rack awareness and fault tolerance
- Storage sizing and retention policies
- ZooKeeper vs KRaft mode selection
Topic Architecture
- Topic naming conventions
- Partition count optimization
- Compaction vs retention strategies
- Schema evolution with Schema Registry
Consumer Group Patterns
- Consumer group design
- Partition assignment strategies
- Offset management
- Consumer lag monitoring
Event-Driven Patterns
- Event Sourcing implementation
- CQRS (Command Query Responsibility Segregation)
- Saga patterns for distributed transactions
- Dead letter queues and retry patterns
Best Practices
# Topic Naming Convention
# <domain>.<entity>.<event-type>
topics:
- orders.order.created
- orders.order.shipped
- payments.payment.processed
- inventory.stock.updated
# Partition Key Strategy
# Use entity ID for ordering guarantees
producer.send(
'orders.order.created',
key=order_id.encode(), # Same key = same partition = ordering
value=order_event.serialize()
)
# Consumer Group Design
consumer = KafkaConsumer(
'orders.order.created',
group_id='order-processor-service', # One group per service
auto_offset_reset='earliest',
enable_auto_commit=False # Manual commit for exactly-once
)
Replication Formula
Replication Factor = min(3, number_of_brokers)
Partitions = max(expected_throughput / partition_throughput, consumer_instances)
When to Use
- Designing Kafka cluster architecture
- Planning topic and partition strategies
- Implementing event-driven patterns
- Event sourcing and CQRS design
- Distributed transaction patterns
More from anton-abyzov/specweave
technical-writing
Technical writing expert for API documentation, README files, tutorials, changelog management, and developer documentation. Covers style guides, information architecture, versioning docs, OpenAPI/Swagger, and documentation-as-code. Activates for technical writing, API docs, README, changelog, tutorial writing, documentation, technical communication, style guide, OpenAPI, Swagger, developer docs.
45spec-driven-brainstorming
Spec-driven brainstorming and product discovery expert. Helps teams ideate features, break down epics, conduct story mapping sessions, prioritize using MoSCoW/RICE/Kano, and validate ideas with lean startup methods. Activates for brainstorming, product discovery, story mapping, feature ideation, prioritization, MoSCoW, RICE, Kano model, lean startup, MVP definition, product backlog, feature breakdown.
43kafka-architecture
Apache Kafka architecture expert for cluster design, capacity planning, and high availability. Use when designing Kafka clusters, choosing partition strategies, or sizing brokers for production workloads.
34docusaurus
Docusaurus 3.x documentation framework - MDX authoring, theming, versioning, i18n. Use for documentation sites or spec-weave.com.
29frontend
Expert frontend developer for React, Vue, Angular, and modern JavaScript/TypeScript. Use when creating components, implementing hooks, handling state management, or building responsive web interfaces. Covers React 18+ features, custom hooks, form handling, and accessibility best practices.
29reflect
Self-improving AI memory system that persists learnings across sessions in CLAUDE.md. Use when capturing corrections, remembering user preferences, or extracting patterns from successful implementations. Enables continual learning without starting from zero each conversation.
27