mirror of
https://github.com/hanzoai/amqp.git
synced 2026-10-30 14:57:07 +00:00
rescue/main-local
Co-authored-by: Hanzo Dev <[email protected]>
Hanzo AMQP
RabbitMQ wire protocol (AMQP 0-9-1) adapter for Hanzo PubSub (NATS JetStream). Accepts standard AMQP clients and translates requests to NATS underneath. Built for the Jube AML/fraud sidecar, which requires RabbitMQ but runs inside Hanzo infrastructure backed by NATS.
Architecture
Jube (C#) --AMQP 0-9-1--> hanzo-amqp --JetStream--> NATS
Jube connects to this proxy on port 5672 thinking it is RabbitMQ. The proxy translates AMQP publish/consume operations to NATS JetStream subjects.
Channel Mappings
| AMQP Name | Type | NATS Subject | NATS Stream |
|---|---|---|---|
| jubeInbound | queue | jube.inbound | jube-inbound |
| jubeOutbound | fanout | jube.outbound | jube-outbound |
| jubeActivations | fanout | jube.activations | jube-activations |
| jubeNotifications | queue | jube.notifications | jube-notifications |
Quick Start
go run . --pubsub-url nats://localhost:4222 --amqp-addr 0.0.0.0:5672
Kubernetes
In Hanzo infrastructure, this runs as a sidecar alongside Jube:
containers:
- name: jube
image: ghcr.io/hanzoai/jube:latest
env:
- name: AMQP_URL
value: "amqp://localhost:5672"
- name: amqp-proxy
image: ghcr.io/hanzoai/amqp:latest
args: ["--pubsub-url", "nats://pubsub.hanzo.svc:4222"]
ports:
- containerPort: 5672
Running Tests
go test -v ./...
Credits
Similar pattern to Hanzo Stream (Kafka wire protocol gateway).
License
MIT
Languages
Go
94.6%
ZAP
3%
Dockerfile
2.4%