docker.recipes

Memphis

intermediate

Modern message broker for developers.

Overview

Memphis is a next-generation message broker designed specifically for modern cloud-native applications and microservices architectures. Built on top of NATS JetStream, Memphis delivers enterprise-grade message streaming capabilities with a developer-first approach that emphasizes simplicity and reliability. Unlike traditional message brokers that require complex setup and maintenance, Memphis provides built-in features like schema validation, dead letter queues, and message observability out of the box. This deployment configuration establishes a complete Memphis messaging infrastructure with persistent data storage and comprehensive connectivity options. The setup exposes three critical service endpoints: port 6666 for high-performance client connections, port 7770 for REST API access, and port 9000 for the intuitive web-based management console. Memphis leverages NATS JetStream's proven clustering and replication capabilities while adding modern conveniences like automatic message routing, consumer lag monitoring, and built-in message transformation pipelines. Development teams building event-driven architectures, streaming data pipelines, or microservices communication layers will find Memphis particularly valuable for its comprehensive SDK support and operational visibility. The platform bridges the gap between simple pub/sub messaging and complex enterprise streaming platforms, making it ideal for organizations that need reliable message delivery without the operational overhead of managing Kafka clusters or the limitations of basic message queues.

Key Features

  • Built-in schema validation with automatic message serialization and deserialization
  • Dead letter queue functionality for handling failed message processing
  • Real-time message observability and consumer lag monitoring through web UI
  • Multi-protocol support including native Memphis protocol and REST API access
  • Automatic message routing with configurable retention policies and compaction
  • Producer and consumer SDK libraries for Node.js, Python, Go, .NET, and Java
  • NATS JetStream foundation providing clustering and geo-distributed replication
  • Message transformation pipelines with built-in data enrichment capabilities

Common Use Cases

  • 1Event-driven microservices architecture requiring reliable message delivery guarantees
  • 2Real-time data streaming pipelines for analytics and machine learning workflows
  • 3Decoupling legacy monolithic applications during modernization initiatives
  • 4IoT device telemetry collection and processing with high-throughput requirements
  • 5Financial trading systems requiring low-latency message processing and audit trails
  • 6E-commerce order processing and inventory management event streams
  • 7Development and testing environments requiring production-like messaging infrastructure

Prerequisites

  • Minimum 2GB RAM allocation for Memphis container and message buffering
  • Available ports 6666, 7770, and 9000 for client connections and web interface
  • ROOT_PASSWORD environment variable configured for administrative access
  • Basic understanding of message broker concepts and pub/sub patterns
  • Sufficient disk space for persistent message storage in /tmp/nats volume

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 memphis:
3 image: memphisos/memphis:latest
4 container_name: memphis
5 restart: unless-stopped
6 environment:
7 ROOT_PASSWORD: ${ROOT_PASSWORD}
8 ports:
9 - "6666:6666"
10 - "7770:7770"
11 - "9000:9000"
12 volumes:
13 - memphis_data:/tmp/nats
14
15volumes:
16 memphis_data:

.env Template

.env
1ROOT_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://docs.memphis.dev/
  2. 2Web UI at http://localhost:9000, login: root / ROOT_PASSWORD
  3. 3Client connections on port 6666, REST gateway on 7770
  4. 4Built on NATS JetStream - reliable message delivery
  5. 5Dead-letter queue and schema validation built-in
  6. 6SDKs for Node.js, Python, Go, .NET, Java

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 memphis:
5 image: memphisos/memphis:latest
6 container_name: memphis
7 restart: unless-stopped
8 environment:
9 ROOT_PASSWORD: ${ROOT_PASSWORD}
10 ports:
11 - "6666:6666"
12 - "7770:7770"
13 - "9000:9000"
14 volumes:
15 - memphis_data:/tmp/nats
16
17volumes:
18 memphis_data:
19EOF
20
21# 2. Create the .env file
22cat > .env << 'EOF'
23ROOT_PASSWORD=changeme
24EOF
25
26# 3. Start the services
27docker compose up -d
28
29# 4. View logs
30docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/memphis/run | bash

Troubleshooting

  • Connection refused on port 6666: Verify Memphis container is fully started and ROOT_PASSWORD environment variable is set correctly
  • Web UI shows 'Service Unavailable': Check that port 9000 is accessible and not blocked by firewall rules
  • Messages not persisting after container restart: Ensure memphis_data volume is properly mounted and has write permissions
  • High memory usage during message processing: Increase container memory limits or configure message retention policies to prevent unbounded growth
  • SDK connection timeouts: Verify network connectivity to port 6666 and check Memphis logs for authentication errors

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space