picomq README

The project's README from github.com/PicoMQ/picomq. As one markdown file: README.md.

PicoMQ

PicoMQ is durable, real-time streams over HTTP and Kafka, built on S3-compatible object storage.

Documentation · Discord · Quick start

Install

cargo install --path picomq/pico-cli

This puts the pico binary in ~/.cargo/bin. Or run it in place with cargo run -p picomq-cli -- <args>. If another pico is first on PATH:

export PATH="$HOME/.cargo/bin:$PATH"

Run a node

# single node: SQLite metadata log, local object storage
pico serve \
    --meta-url sqlite:./data/meta.db \
    --storage=-2@file://./objects

Every flag has a PICO_* env equivalent. /health and /ready are on --admin-listen (default 127.0.0.1:9090). Auth is off by default, non-loopback binds need --auth required or --insecure-allow-remote.

Docker

Skips the install, everything runs in compose:

cd harness/aio
cp .env.example .env

docker compose up --build                          # Postgres + RustFS, 1 node
docker compose -f compose.cluster.yml up --build   # same stack, 2 nodes
docker compose -f compose.lite.yml up --build      # SQLite + file://, no deps
docker compose -f compose.lite.yml -f compose.connectors.yml up --build   # + connectors runtime

Pico: http://localhost:4437 (cluster also :4438). Dashboard: :9090. Connectors API: :8081. harness/byo is the same against an existing Postgres and object store, configured through .env.

Use it

pico create /streams/orders --content-type text/plain
seq 1 1000 | pico append /streams/orders --batch 100
pico read /streams/orders
pico tail /streams/orders -f
pico close /streams/orders && pico delete /streams/orders

pico --http2 bench -b 1024 -w 512 --connections 4 --streams 4 -d 60

Test

cargo test --workspace

# Postgres-backed tests, env-gated
PICOMQ_PG_URL=postgres://user:pass@localhost:5432/picomq \
    cargo test -p picomq-sql --test pg_contract --test pg_e2e

picomq (PicoMQ/picomq)

Searching Database…

373 ·GitHub
这是什么?PicoMQ 是一个持久化的实时流式系统,把数据存储在 S3 兼容的对象存储上而不是本地磁盘,同时支持原生 HTTP 协议和 Kafka 线路协议。
它是 Kafka 的克隆,还是架在 S3 前面的代理?它是一个独立的服务器,拥有自己的元数据层和协议前端(包括原生 Pico 协议和 Durable Streams 的 HTTP 前端,以及一个 Kafka 兼容前端),底层由名为 s3stream 的专用引擎驱动,由它真正把日志写入对象存储。
怎么把它跑起来?用 cargo 安装 pico CLI(pico 二进制文件会装到 ~/.cargo/bin),或用 'cargo run -p picomq-cli --' 直接运行;也可以完全跳过安装,用 Docker Compose 启动整套技术栈。
我需要自备 Postgres 和 S3 存储桶吗?自带的 Docker Compose 配置会为你准备好 Postgres 和对象存储,但 PicoMQ 也支持“自带依赖”模式,连接现有的 Postgres 数据库和对象存储,通过 .env 文件配置。
认证默认是开启的吗?不是,认证默认关闭。如果节点绑定的不是 loopback 地址,就必须显式传入 --auth required 或 --insecure-allow-remote。
Docker Compose 配置暴露了哪些端口?它暴露了 Pico 节点(集群模式还加上 :4438)、运行在 :9090 的网页仪表板,以及运行在 :8081 的 Connectors API。
怎么检查节点是否健康?每个节点都在其管理监听器上提供 /health 和 /ready 端点,默认地址是 127.0.0.1:9090。
可以只用环境变量来配置节点吗?可以,每个命令行标志都有对应的 PICO_ 环境变量,所以不用传任何标志也能配置节点。
What are similar projects?kafgres, redpanda, automq, celld, nsq, redis, hydradb, emqx
Creator
PicoMQ
Size
2.2 MB
Stars
373
Age
2mo
Commits · 90 Days