/guicedee-kafka:guicedee-kafkafrom guicedee-kafka
Configures annotation-driven Kafka messaging with Guiced, covering topics, consumers, publishers, connections, offsets, and partition lifecycle via Vert.x Kafka client.
Ships in guicedee-kafka. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Annotation-driven Apache Kafka integration for Guiced using the Vert.x Kafka client.
Declare connections, topics, consumers, and publishers with annotations — everything is discovered at startup via ClassGraph, wired through Guice, and managed by the Vert.x Kafka client.
guiced.net:kafka dependency.package-info.java (preferred) or any class:
@KafkaConnectionOptions(
value = "my-connection",
bootstrapServers = "localhost:9092",
groupId = "my-group"
)
@KafkaTopicCreate(value = "order-events", partitions = 3, replicationFactor = 1)
package com.example.messaging;
@KafkaTopicDefinition(
value = "order-events",
options = @KafkaTopicOptions(worker = true)
)
public class OrderConsumer implements KafkaTopicConsumer<String, String> {
@Override
public void consume(KafkaConsumerRecord<String, String> record) {
System.out.println("Received: " + record.value());
}
}
public class OrderService {
@Inject @Named("order-events")
private KafkaTopicPublisher orderPublisher;
public Future<RecordMetadata> placeOrder(String orderJson) {
return orderPublisher.send("order-key", orderJson);
}
}
module-info.java:
module my.app {
requires com.guicedee.kafka;
opens my.app.messaging to com.google.guice, com.guicedee.kafka;
}
@KafkaConnectionOptionsConnection configuration: bootstrap servers, group id, serializers/deserializers, acks, retries, timeouts, batch size, buffer memory. Targets TYPE and PACKAGE.
@KafkaTopicDefinitionTopic declaration: name, consumer options. Targets TYPE, FIELD, and PACKAGE.
@KafkaTopicOptionsConsumer tuning: auto-commit, worker threads, consumer count, partition assignment, max poll interval, pause on start.
@KafkaTopicCreate (Repeatable)Admin client topic creation at startup: topic name, partitions, replication factor, ignore-if-exists. Targets TYPE and PACKAGE.
| Binding | Key | Description |
|---|---|---|
KafkaTopicPublisher | @Named("topic-name") | Publisher for a specific topic |
KafkaTopicConsumer | @Named("topic-name") | Consumer for a specific topic |
KafkaProducer<String,String> | @Named("connection-name") | Raw Vert.x Kafka producer per connection |
KafkaConsumer<String,String> | @Named("connection-name") | Raw Vert.x Kafka consumer per connection |
KafkaAdminClient | @Named("connection-name") | Vert.x Kafka admin client per connection |
Every annotation attribute can be overridden via system properties or environment variables at runtime, scoped by connection/topic name:
KAFKA_{NORMALIZED_NAME}_{PROPERTY} — name-specific overrideKAFKA_{PROPERTY} — global fallbackIGuiceContext.instance().inject()
└─ KafkaPreStartup (annotation scanning)
├─ Discovers @KafkaConnectionOptions (classes and package-info.java)
├─ Discovers @KafkaTopicCreate annotations
├─ Discovers @KafkaTopicDefinition consumers
└─ Registers metadata for binding
└─ KafkaModule (Guice bindings)
├─ Creates KafkaProducer per connection
├─ Creates KafkaConsumer per connection
├─ Creates KafkaAdminClient per connection
├─ Binds KafkaTopicConsumer as singletons
└─ Binds KafkaTopicPublisher as @Named("topic-name")
└─ KafkaPostStartup (runtime initialization)
├─ Creates declared topics via admin client
├─ Creates per-topic consumers
├─ Registers partition assigned/revoked handlers
├─ Subscribes to topics or assigns partitions
└─ Starts consuming with call-scoped message handling
└─ KafkaPreDestroy (shutdown)
├─ Closes all topic consumers
├─ Closes all package consumers
├─ Closes all producers
└─ Closes all admin clients
KafkaTopicPublisher.send returns io.vertx.core.Future<io.vertx.kafka.client.producer.RecordMetadata>. Propagate that future when the caller needs broker send success/failure. Consumer auto-commit and completion of downstream business work are separate; check the configured offset policy before promising delivery guarantees.
requires com.guicedee.kafka;.opens to com.google.guice and com.guicedee.kafka.opens to tools.jackson.databind.module-info.java + META-INF/services/).@KafkaConnectionOptions can be placed on package-info.java (preferred) or any class.@KafkaTopicCreate can be placed on package-info.java (preferred) or any class. It is repeatable.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub guicedee/ai-rules --plugin guicedee-kafka