Lightweight Kafka wrapper for keyed-message queuing, targeting IoT systems where messages for the same device must be processed in order and by the same consumer. Built on no-kafka (v2.x), it automatically retries connections and supports configurable key fields for partitioning. Version 1.0.4 is the current stable release; development appears to be minimal with no recent updates. Differentiators include a simplified consumer callback that handles commits automatically, and an optional explicit commit pattern.
npm install kafka-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects a producer and consumer to a Kafka broker, demonstrating basic enqueue and dequeue with keyed messages.
Monitor consumer connection health and re-create consumer on failure.
Always provide groupId explicitly to avoid confusion.
Migrate to a maintained Kafka client like kafka-node or kafkajs.
Set logLevel to 3 during development for visibility.
Always use message.handle directly; never construct it manually.
Call Q.producer.connect(callback) before Q.producer.send().
Verify broker address and port; ensure Kafka is started and accessible.
Pass groupId to consumer.connect() or set config.groupId.