npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-kafka-extended

v0.3.0

Published

n8n community node for Kafka with Snappy, LZ4, and ZSTD compression support

Readme

n8n-nodes-kafka-extended

This is an n8n community node. It lets you use Apache Kafka in your n8n workflows with support for Snappy, LZ4, and ZSTD compression codecs — in addition to the built-in GZIP.

Apache Kafka is a distributed event streaming platform used for building real-time data pipelines and streaming applications.

n8n is a fair-code licensed workflow automation platform.

Installation Operations Credentials Compatibility Usage Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

Nodes

This package includes two nodes:

Kafka Extended Trigger (Consumer)

Consumes messages from a Kafka topic and triggers workflow executions. Automatically decompresses messages encoded with GZIP, Snappy, LZ4, or ZSTD.

Parameters:

| Parameter | Type | Required | Description | | ------------------ | ------- | -------- | ------------------------------------------ | | Topic | string | Yes | Kafka topic to consume from | | Group ID | string | Yes | Consumer group ID | | From Beginning | boolean | No | Read from earliest offset on first connect | | JSON Parse Message | boolean | No | Automatically parse message value as JSON |

Additional options: Auto Commit Interval, Auto Commit Threshold, Batch Size, Fetch Max Bytes, Heartbeat Interval, Max In-Flight Requests, Return Headers, Session Timeout, Allow Auto Topic Creation.

Output data shape:

{
	"topic": "my-topic",
	"partition": 0,
	"offset": "42",
	"timestamp": "1672531200000",
	"key": "my-key",
	"value": "message content or parsed JSON object",
	"headers": { "headerKey": "headerValue" }
}

Kafka Extended (Producer)

Sends messages to a Kafka topic with selectable compression codec.

Parameters:

| Parameter | Type | Required | Description | | ----------- | ------- | -------- | ------------------------------------------------- | | Topic | string | Yes | Kafka topic to produce to | | Message | string | Yes | Message value (supports n8n expressions) | | Key | string | No | Message key for partitioning | | Compression | options | No | None / GZIP / Snappy / LZ4 / ZSTD (default: None) |

Additional options: Acks (None / Leader / All ISR), Headers (key-value pairs), Timeout, Schema Registry for producing, Schema Subject Strategy (topic, record, topicrecord) and Schema Record Name when required.

Output data shape:

{
	"topic": "my-topic",
	"partition": 0,
	"offset": "123",
	"timestamp": "1672531200000",
	"compression": "Snappy",
	"schemaRegistry": true,
	"schemaSubjectStrategy": "topicrecord"
}

When producing with Schema Registry enabled, the node supports these subject naming strategies:

  • topic: resolves subjects like <topic>-value
  • record: resolves subjects from the configured record name
  • topicrecord: resolves subjects like <topic>-<recordName>

For record and topicrecord, set Schema Record Name to the schema record name registered in Schema Registry, typically the fully qualified name.

Credentials

This node uses the Kafka Extended credential type. Configure the following fields:

| Field | Description | Default | | --------- | ---------------------------------------------- | -------------- | | Brokers | Comma-separated list of Kafka broker addresses | localhost:9092 | | Client ID | Client identifier for the Kafka connection | n8n |

Authentication is plaintext only. SASL/SSL is not currently supported.

The credential includes a connection test that verifies connectivity by connecting an admin client to the broker.

Compression Codecs

| Codec | Library | Type | Notes | | ------ | ---------------- | ---------------- | --------------------------------------- | | GZIP | Built-in (zlib) | Always available | Native to Node.js | | Snappy | kafkajs-snappy | Pure JavaScript | Always available, no native compilation | | LZ4 | kafkajs-lz4 | Native bindings | Requires native compilation | | ZSTD | @kafkajs/zstd | Native bindings | Requires native compilation |

Codec registration is handled automatically at runtime. If LZ4 or ZSTD native bindings fail to compile in the target environment, those codecs will be unavailable but will not affect the other codecs. Snappy and GZIP are always available.

Compatibility

  • Tested with n8n v1.x
  • Requires Node.js v22 or higher
  • Uses KafkaJS v2.x

Usage

Consuming messages

  1. Add the Kafka Extended Trigger node to your workflow.
  2. Configure the Kafka Extended credential with your broker addresses.
  3. Set the Topic and Group ID.
  4. Enable JSON Parse Message if your messages contain JSON payloads.
  5. Activate the workflow. Messages will trigger workflow executions as they arrive.

Producing messages

  1. Add the Kafka Extended node to your workflow.
  2. Configure the Kafka Extended credential.
  3. Set the Topic and Message (supports n8n expressions like {{ $json.data }}).
  4. Optionally set a Key for partition routing and select a Compression codec.
  5. If you enable Use Schema Registry for Producing, choose the Schema Subject Strategy that matches your Kafka serializer setup.
  6. For record or topicrecord, set Schema Record Name to the subject's record name in Schema Registry.

Using as an AI tool

Both nodes have usableAsTool enabled, meaning they can be used as tools by AI Agent nodes in n8n.

Development

# Install dependencies
npm install

# Start n8n with the nodes loaded (hot reload)
npm run dev

# Lint
npm run lint

# Build for production
npm run build

Resources

License

MIT