Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nisshi

> 数据库
Open source

Apache Kafka® compatible broker with S3, PostgreSQL, SQLite, Apache Iceberg and Delta Lake

1.8K stars0 likes2 views
WebsiteGitHub

About

Apache Kafka® compatible broker with S3, PostgreSQL, SQLite, Apache Iceberg and Delta Lake

What is Nisshi?

Nisshi (née Tansu) is a drop-in replacement for Apache Kafka with PostgreSQL, libSQL (SQLite), S3 or memory storage engines. Schema backed topics (Avro, JSON or Protocol buffers) can be written as Apache Iceberg or Delta Lake tables.

Features:

  • Apache Kafka API compatible
  • Available with PostgreSQL, libSQL, S3 or memory storage engines
  • Topics validated by JSON Schema, Apache Avro or Protocol buffers can be written as Apache Iceberg or Delta Lake tables

See examples using pyiceberg, examples using Apache Spark or examples using Delta Lake.

For data durability:

  • S3 is designed to exceed 99.999999999% (11 nines)
  • PostgreSQL with continuous archiving streaming transaction logs files to an archive
  • The memory storage engine is designed for ephemeral non-production environments

Nisshi is a single statically linked binary containing the following:

  • broker an Apache Kafka API compatible broker and schema registry
  • topic a CLI to create/delete Topics
  • cat a CLI to consume or produce Avro, JSON or Protobuf messages to a topic
  • proxy an Apache Kafka compatible proxy

broker

The broker subcommand is default if no other command is supplied.

…

A broker can be started by simply running nisshi, all options have defaults. Nisshi pickup any existing environment, loading any found in .env. An example.env is provided as part of the distribution and can be copied into .env for local modification. Sample schemas can be found in etc/schema, used in the examples.

If an Apache Avro, Protobuf or JSON schema has been assigned to a topic, the broker will reject any messages that are invalid. Schema backed topics are written as Apache Parquet when the -data-lake option is provided.

topic

The nisshi topic command has the following subcommands:

bash
Create or delete topics managed by the broker

Usage: nisshi topic <COMMAND>

Commands:
  create  Create a topic
  delete  Delete an existing topic
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

To create a topic use:

bash
nisshi topic create taxi

cat

The nisshi cat command, has the following subcommands:

bash
nisshi cat --help
Easily consume or produce Avro, JSON or Protobuf messages to a topic

Usage: nisshi cat <COMMAND>

Commands:
  produce  Produce Avro/JSON/Protobuf messages to a topic
  consume  Consume Avro/JSON/Protobuf messages from a topic
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

The produce subcommand reads JSON formatted messages encoding them into Apache Avro, Protobuf or JSON depending on the schema used by the topic.

For example, the taxi topic is backed by taxi.proto. Using trips.json containing a JSON array of objects, nisshi cat produce encodes each message into protobuf into the broker:

nisshi cat produce taxi etc/data/trips.json

Using duckdb we can read the Apache Parquet files created by the broker:

bash
duckdb :memory: "SELECT * FROM 'data/taxi/*/*.parquet'"

Results in the following output:

…

s3

The following will configure a S3 storage engine using the "nisshi" bucket (full context is in compose.yaml and example.env):

Copy example.env into .env so that you have a local working copy:

bash
cp example.env .env

Edit .env so that STORAGE_ENGINE is defined as:

bash
STORAGE_ENGINE="s3://nisshi/"

First time startup, you'll need to create a bucket, an access key and a secret in minio.

Just bring minio up, without nisshi:

bash
docker compose up -d minio

Create a minio local alias representing http://localhost:9000 with the default credentials of minioadmin:

bash
docker compose exec minio \
   /usr/bin/mc \
   alias \
   set \
   local \
   http://localhost:9000 \
   minioadmin \
   minioadmin

Create a nisshi bucket in minio using the local alias:

bash
docker compose exec minio \
   /usr/bin/mc mb local/nisshi

Once this is done, you can start nisshi with:

bash
docker compose up -d nisshi

Using the regular Apache Kafka CLI you can create topics, produce and consume messages with Nisshi:

bash
kafka-topics \
  --bootstrap-server localhost:9092 \
  --partitions=3 \
  --replication-factor=1 \
  --create --topic test

Describe the test topic:

bash
kafka-topics \
  --bootstrap-server localhost:9092 \
  --describe \
  --topic test

Note that node 111 is the leader and ISR for each topic partition. This node represents the broker handling your request. All brokers are node 111.

Producer:

bash
echo "hello world" | kafka-console-producer \
    --bootstrap-server localhost:9092 \
    --topic test

Group consumer using test-consumer-group:

bash
kafka-console-consumer \
  --bootstrap-server localhost:9092 \
  --group test-consumer-group \
  --topic test \
  --from-beginning \
  --property print.timestamp=true \
  --property print.key=true \
  --property print.offset=true \
  --property print.partition=true \
  --property print.headers=true \
  --property print.value=true

Describe the consumer test-consumer-group group:

bash
kafka-consumer-groups \
  --bootstrap-server localhost:9092 \
  --group test-consumer-group \
  --describe

PostgreSQL

To switch between the minio and PostgreSQL examples, firstly shutdown Nisshi:

bash
docker compose down nisshi

Switch to the PostgreSQL storage engine by updating .env:

env
# minio storage engine
# STORAGE_ENGINE="s3://nisshi/"

# PostgreSQL storage engine -- NB: @db and NOT @localhost :)
STORAGE_ENGINE="postgres://postgres:postgres@db"

Start PostgreSQL:

bash
docker compose up -d db

Bring Nisshi back up:

bash
docker compose up -d nisshi

Using the regular Apache Kafka CLI you can create topics, produce and consume messages with Nisshi:

bash
kafka-topics \
  --bootstrap-server localhost:9092 \
  --partitions=3 \
  --replication-factor=1 \
  --create --topic test

Producer:

bash
echo "hello world" | kafka-console-producer \
    --bootstrap-server localhost:9092 \
    --topic test

Consumer:

bash
kafka-console-consumer \
  --bootstrap-server localhost:9092 \
  --group test-consumer-group \
  --topic test \
  --from-beginning \
  --property print.timestamp=true \
  --property print.key=true \
  --property print.offset=true \
  --property print.partition=true \
  --property print.headers=true \
  --property print.value=true

Or using librdkafka to produce:

bash
echo "Lorem ipsum dolor..." | \
  ./examples/rdkafka_example -P \
  -t test -p 1 \
  -b localhost:9092 \
  -z gzip

Consumer:

bash
./examples/rdkafka_example \
  -C \
  -t test -p 1 \
  -b localhost:9092

Feedback

Please raise an issue if you encounter a problem.

License

Nisshi is licensed under Apache 2.0.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustapache-arrowapache-icebergapache-kafkabuilt-with-rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库