{"id":35850153,"url":"https://github.com/hectorifc/malachimq","last_synced_at":"2026-02-01T09:01:13.293Z","repository":{"id":274695180,"uuid":"277690659","full_name":"HectorIFC/malachimq","owner":"HectorIFC","description":"MalachiMQ High-performance message queue system built with Elixir/OTP.","archived":false,"fork":false,"pushed_at":"2026-01-23T22:19:12.000Z","size":206,"stargazers_count":1,"open_issues_count":48,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T23:01:11.406Z","etag":null,"topics":["beam","broker","elixir","elixir-lang","elixir-language","elixir-programming-language","erlang","erlang-distribution","erlang-otp","message-queue","queue"],"latest_commit_sha":null,"homepage":"https://hectorifc.github.io/malachimq/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HectorIFC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"HectorIFC"}},"created_at":"2020-07-07T01:53:45.000Z","updated_at":"2026-01-23T06:02:44.000Z","dependencies_parsed_at":"2026-02-01T03:08:59.227Z","dependency_job_id":null,"html_url":"https://github.com/HectorIFC/malachimq","commit_stats":null,"previous_names":["hectorifc/bank_api","hectorifc/malachimq"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/HectorIFC/malachimq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorIFC%2Fmalachimq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorIFC%2Fmalachimq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorIFC%2Fmalachimq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorIFC%2Fmalachimq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HectorIFC","download_url":"https://codeload.github.com/HectorIFC/malachimq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HectorIFC%2Fmalachimq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beam","broker","elixir","elixir-lang","elixir-language","elixir-programming-language","erlang","erlang-distribution","erlang-otp","message-queue","queue"],"created_at":"2026-01-08T07:16:42.754Z","updated_at":"2026-02-01T09:01:13.289Z","avatar_url":"https://github.com/HectorIFC.png","language":"Elixir","funding_links":["https://github.com/sponsors/HectorIFC"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/logo.jpeg\" alt=\"MalachiMQ Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n# MalachiMQ\n\nHigh-performance message queue system built with Elixir/OTP.\n\n[![CI](https://github.com/HectorIFC/malachimq/actions/workflows/ci.yml/badge.svg)](https://github.com/HectorIFC/malachimq/actions/workflows/ci.yml)\n[![Release](https://github.com/HectorIFC/malachimq/actions/workflows/release.yml/badge.svg)](https://github.com/HectorIFC/malachimq/actions/workflows/release.yml)\n[![Docker Image](https://img.shields.io/docker/v/hectorcardoso/malachimq?label=Docker%20Hub)](https://hub.docker.com/r/hectorcardoso/malachimq)\n[![Docker Pulls](https://img.shields.io/docker/pulls/hectorcardoso/malachimq.svg)](https://hub.docker.com/r/hectorcardoso/malachimq)\n[![Sponsor](https://img.shields.io/badge/sponsor-❤-ff69b4)](https://github.com/sponsors/HectorIFC)\n\n## 💖 Sponsors\n\nBecome a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://github.com/sponsors/HectorIFC)]\n\n\u003c!-- sponsors --\u003e\n\u003c!-- Add sponsor logos here as they join --\u003e\n\u003c!-- Example: \u003ca href=\"https://sponsor-site.com\"\u003e\u003cimg src=\"https://sponsor-logo.png\" width=\"64\"\u003e\u003c/a\u003e --\u003e\n\u003c!-- sponsors --\u003e\n\n### Backers\n\nSupport us with a monthly donation and help us continue our activities. [[Become a backer](https://github.com/sponsors/HectorIFC)]\n\n\u003c!-- backers --\u003e\n\u003c!-- Add backer avatars here as they join --\u003e\n\u003c!-- backers --\u003e\n\n---\n\n## Demo\n\nWatch MalachiMQ in action:\n\n[![MalachiMQ Demo](https://img.youtube.com/vi/hn26zgRoOUI/0.jpg)](https://www.youtube.com/watch?v=hn26zgRoOUI)\n\n## 🚀 Quick Start with Docker\n\n**Multi-Architecture Support**: Works on AMD64 (Intel/AMD) and ARM64 (Apple Silicon, AWS Graviton)\n\n### Pull and Run\n\n```bash\ndocker pull hectorcardoso/malachimq:latest\n\ndocker run \\\n  --name malachimq \\\n  -p 4040:4040 \\\n  -p 4041:4041 \\\n  -e MALACHIMQ_ADMIN_PASS=your_secure_password \\\n  hectorcardoso/malachimq:latest\n```\n\n### Using Docker Compose\n\n```bash\ngit clone https://github.com/HectorIFC/malachimq.git\ncd malachimq\ndocker-compose up -d\n```\n\nAccess the dashboard at: http://localhost:4041\n\n### Build Locally (All Platforms)\n\n```bash\n# Build for your current architecture\nmake docker-build\n\n# Build for multiple architectures (requires Docker Buildx)\nmake docker-buildx-setup\nmake docker-buildx\n\n# Build and push to Docker Hub (multi-arch)\nmake docker-buildx-push\n```\n\nSee [Multi-Architecture Build Guide](docs/MULTI_ARCH_BUILD.md) for detailed instructions.\n\n## 📦 Ports\n\n| Port | Description |\n|------|-------------|\n| 4040 | TCP Message Queue |\n| 4041 | Web Dashboard |\n\n## 🔐 Authentication\n\nMalachiMQ requires authentication for all producers and consumers.\n\n### Default Users\n\n| Username | Password | Permissions |\n|----------|----------|-------------|\n| admin | admin123 | Full access |\n| producer | producer123 | Produce only |\n| consumer | consumer123 | Consume only |\n| app | app123 | Produce \u0026 Consume |\n\n\u003e ⚠️ **Important**: Change default passwords in production!\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MALACHIMQ_TCP_PORT` | 4040 | TCP server port |\n| `MALACHIMQ_DASHBOARD_PORT` | 4041 | Dashboard port |\n| `MALACHIMQ_LOCALE` | en_US | Language (en_US, pt_BR) |\n| `MALACHIMQ_ADMIN_PASS` | admin123 | Admin password |\n| `MALACHIMQ_PRODUCER_PASS` | producer123 | Producer password |\n| `MALACHIMQ_CONSUMER_PASS` | consumer123 | Consumer password |\n| `MALACHIMQ_APP_PASS` | app123 | App password |\n| `MALACHIMQ_SESSION_TIMEOUT_MS` | 3600000 | Session timeout (1h) |\n| `MALACHIMQ_ENABLE_TLS` | false | Enable TLS encryption |\n| `MALACHIMQ_TLS_CERTFILE` | - | TLS certificate file path |\n| `MALACHIMQ_TLS_KEYFILE` | - | TLS private key file path |\n| `MALACHIMQ_TLS_CACERTFILE` | - | TLS CA certificate (optional) |\n\n### Custom Users\n\n```bash\ndocker run \\\n  -e MALACHIMQ_DEFAULT_USERS=\"user1:pass1:produce,consume;user2:pass2:admin\" \\\n  hectorcardoso/malachimq:latest\n```\n\nFormat: `username:password:permission1,permission2;...`\n\nPermissions: `admin`, `produce`, `consume`\n\n## 🔒 TLS/SSL Encryption\n\n**⚠️ IMPORTANT**: For production deployments, always enable TLS to encrypt credentials and messages.\n\n### Quick Start with TLS\n\n#### 1. Generate Development Certificates\n\n```bash\n./scripts/generate-dev-certs.sh\n```\n\n#### 2. Run with TLS Enabled\n\n```bash\ndocker run \\\n  -p 4040:4040 \\\n  -v $(pwd)/priv/cert:/certs \\\n  -e MALACHIMQ_ENABLE_TLS=true \\\n  -e MALACHIMQ_TLS_CERTFILE=/certs/server.crt \\\n  -e MALACHIMQ_TLS_KEYFILE=/certs/server.key \\\n  hectorcardoso/malachimq:latest\n```\n\n#### 3. Connect with TLS Client (Node.js)\n\n```javascript\nconst tls = require('tls');\n\nconst client = tls.connect({\n  host: 'localhost',\n  port: 4040,\n  rejectUnauthorized: false  // For self-signed certs (dev only)\n}, () =\u003e {\n  console.log('TLS connected');\n  client.write(JSON.stringify({\n    action: 'auth',\n    username: 'producer',\n    password: 'producer123'\n  }) + '\\n');\n});\n```\n\n### Production TLS Setup\n\nFor production, use certificates from:\n- **Let's Encrypt** (free, automated)\n- **DigiCert**, **GlobalSign** (commercial CAs)\n- **Internal PKI** (corporate environments)\n\nSee [TLS Security Advisory](docs/SECURITY_ADVISORY_TLS.md) for complete documentation.\n\n### TLS Features\n\n- ✅ TLS 1.2 and 1.3 support\n- ✅ Strong cipher suites (ECDHE, AES-GCM)\n- ✅ Perfect Forward Secrecy\n- ✅ Mutual TLS (mTLS) support\n- ✅ Backward compatible (TLS is optional)\n\n## 📡 Client Example (Node.js)\n\n```javascript\nconst net = require('net');\n\nconst client = net.createConnection(4040, 'localhost', () =\u003e {\n  client.write(JSON.stringify({\n    action: 'auth',\n    username: 'producer',\n    password: 'producer123'\n  }) + '\\n');\n});\n\nclient.on('data', (data) =\u003e {\n  const response = JSON.parse(data.toString().trim());\n  \n  if (response.token) {\n    // Publish to queue\n    client.write(JSON.stringify({\n      action: 'publish',\n      queue_name: 'my-queue',\n      payload: { hello: 'world' },\n      headers: {}\n    }) + '\\n');\n    \n    // Or publish to channel (best-effort, no buffering)\n    client.write(JSON.stringify({\n      action: 'channel_publish',\n      channel_name: 'news',\n      payload: { breaking: 'news!' },\n      headers: {}\n    }) + '\\n');\n  }\n});\n```\n\n#### Channel Subscribe\n\n```javascript\n// Subscribe to channel\nclient.write(JSON.stringify({\n  action: 'channel_subscribe',\n  channel_name: 'news'\n}) + '\\n');\n\n// Response: {\"s\":\"ok\"}\n\n// Receive messages\nclient.on('data', (data) =\u003e {\n  const msg = JSON.parse(data.toString().trim());\n  \n  if (msg.channel_message) {\n    console.log('Channel message:', msg.channel_message);\n    // {\n    //   payload: {...},\n    //   headers: {...},\n    //   timestamp: 1234567890,\n    //   channel: \"news\"\n    // }\n  }\n  \n  if (msg.kicked_from_channel) {\n    console.log('Kicked from:', msg.kicked_from_channel);\n  }\n});\n```\n\n### Using the Node.js Scripts\n\nThe `scripts/` directory contains Node.js clients for testing and development.\n\n```bash\ncd scripts\nnpm install\n```\n\n#### Producer Script\n\nSend messages to a queue:\n\n```bash\n# Send 10 messages (default)\nnode producer.js\n\n# Send 100 messages\nnode producer.js 100\n\n# Send messages continuously (1/second)\nnode producer.js --continuous\n\n# Send 1000 messages in parallel (fast mode)\nnode producer.js 1000 --fast\n\n# Show help\nnode producer.js --help\n```\n\n#### Consumer Script\n\nReceive messages from a queue:\n\n```bash\n# Consume from 'test' queue (default)\nnode consumer.js\n\n# Consume from a specific queue\nnode consumer.js orders\n\n# Verbose mode (show full payload and headers)\nnode consumer.js --verbose\n\n# Combine options\nnode consumer.js orders --verbose\n\n# Show help\nnode consumer.js --help\n```\n\n#### Environment Variables (Scripts)\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MALACHIMQ_HOST` | localhost | Server host |\n| `MALACHIMQ_PORT` | 4040 | Server port |\n| `MALACHIMQ_QUEUE` | test | Default queue name |\n| `MALACHIMQ_USER` | producer/consumer | Username |\n| `MALACHIMQ_PASS` | producer123/consumer123 | Password |\n| `MALACHIMQ_LOCALE` | pt_BR | Locale (pt_BR, en_US) |\n\n#### Example: Producer + Consumer\n\n**Terminal 1** - Start the consumer:\n```bash\nnode consumer.js --verbose\n```\n\n**Terminal 2** - Send messages:\n```bash\nnode producer.js 10\n```\n\n### Channel Pub/Sub\n\nMalachiMQ supports Pub/Sub channels with best-effort delivery. Messages are broadcast to all active subscribers without persistence.\n\n#### Channel Publisher Script\n\nPublish messages to channels:\n\n```bash\n# Publish 10 messages to 'news' channel (default)\nnode channel-publisher.js\n\n# Publish to a specific channel\nnode channel-publisher.js sports 20\n\n# Publish continuously (1 msg/second)\nnode channel-publisher.js alerts --continuous\n\n# Show help\nnode channel-publisher.js --help\n```\n\n#### Channel Subscriber Script\n\nSubscribe to channels and receive messages in real-time:\n\n```bash\n# Subscribe to 'news' channel (default)\nnode channel-subscriber.js\n\n# Subscribe to a specific channel\nnode channel-subscriber.js sports\n\n# Subscribe to multiple channels\nnode channel-subscriber.js news sports alerts\n\n# Verbose mode (show full payloads)\nnode channel-subscriber.js --verbose\n\n# Show help\nnode channel-subscriber.js --help\n```\n\n#### Channel Behavior\n\n- **Best-effort delivery**: Messages are only delivered to active subscribers\n- **No buffering**: Messages are dropped if no subscribers are connected\n- **Broadcast**: All subscribers receive every message\n- **Real-time**: Messages delivered immediately to connected clients\n\n#### Example: Channel Pub/Sub\n\n**Terminal 1** - Start subscriber:\n```bash\nnode channel-subscriber.js news\n```\n\n**Terminal 2** - Publish messages:\n```bash\nnode channel-publisher.js news 10\n```\n\n**Terminal 3** - Add another subscriber:\n```bash\nnode channel-subscriber.js news sports\n```\n\n**Note**: Subscribers only receive messages published *after* they subscribe. Messages published before subscription are lost (no buffering).\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Elixir 1.19+\n- Erlang/OTP 28+\n\n**Note**: While MalachiMQ is optimized for Elixir 1.19+ and OTP 28+, it may work with earlier versions (1.16+/OTP 26+) but is not officially tested or supported.\n\n### Run Locally\n\n```bash\nmix deps.get\nmix run --no-halt\n```\n\n### Run Tests\n\n```bash\nmix test\n```\n\n### Build Docker Image Locally\n\n```bash\nmake docker-build\nmake docker-run\n```\n\n### Available Make Commands\n\n```bash\nmake build          # Install deps and compile\nmake run            # Run locally\nmake test           # Run tests\nmake release        # Build production release\nmake docker-build   # Build Docker image\nmake docker-run     # Run Docker container\nmake docker-stop    # Stop Docker container\nmake docker-push    # Push to Docker Hub\nmake compose-up     # Start with docker-compose\nmake compose-down   # Stop docker-compose\nmake clean          # Clean build artifacts\n```\n\n### Code Quality Checks\n\n```bash\n# Format code\nmix format\n\n# Check formatting\nmix format --check-formatted\n\n# Run static analysis\nmix credo --strict\n\n# Check for security issues\nmix deps.audit\n\n# Check for unused dependencies\nmix deps.unlock --check-unused\n```\n\n### CI/CD\n\nThe project uses GitHub Actions for continuous integration:\n\n- ✅ **Automated Tests** - Run on every commit\n- ✅ **Multiple Elixir/OTP Versions** - Tested on 3 versions\n- ✅ **Code Quality** - Credo, formatting, security checks\n- ✅ **Docker Build** - Verified on every PR\n- ✅ **Automatic Releases** - On merge to main\n\nSee [CI/CD Documentation](docs/CI_CD.md) for details.\nmake docker-push    # Push to Docker Hub\nmake compose-up     # Start with docker-compose\nmake compose-down   # Stop docker-compose\nmake clean          # Clean build artifacts\n```\n\n## 🌍 Internationalization (i18n)\n\nMalachiMQ supports **Brazilian Portuguese (pt_BR)** and **American English (en_US)**.\n\n### Configuration\n\n```elixir\nconfig :malachimq, locale: \"pt_BR\"\n```\n\n### Runtime Change\n\n```elixir\nMalachiMQ.I18n.set_locale(\"en_US\")\nMalachiMQ.I18n.locale()\n```\n\n## 📊 User Management (Elixir)\n\n```elixir\nMalachiMQ.Auth.list_users()\nMalachiMQ.Auth.add_user(\"myuser\", \"mypass\", [:produce, :consume])\nMalachiMQ.Auth.remove_user(\"myuser\")\nMalachiMQ.Auth.change_password(\"myuser\", \"newpass\")\n```\n\n## 🏗️ Architecture\n\n- **ETS Tables**: In-memory storage for maximum performance\n- **GenServer**: OTP processes for reliability\n- **TCP Server**: Custom protocol for low latency\n- **Partitioning**: Automatic load distribution across CPU cores\n\n## 📄 License\n\nMIT License\n\n## 🤝 Contributing\n\nWe welcome contributions! Please follow these guidelines:\n\n### Before You Start\n\n1. Check existing issues and PRs\n2. Discuss major changes in an issue first\n3. Read [CI/CD Documentation](docs/CI_CD.md)\n\n### Development Process\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feat/amazing-feature`)\n3. **Make** your changes with tests\n4. **Run** quality checks:\n   ```bash\n   mix format\n   mix test\n   mix credo --strict\n   ```\n5. **Commit** using [Conventional Commits](https://www.conventionalcommits.org/):\n   ```bash\n   git commit -m \"feat: add amazing feature\"\n   ```\n6. **Push** to your fork (`git push origin feat/amazing-feature`)\n7. **Open** a Pull Request\n\n### PR Requirements\n\n- ✅ **Tests** - All new features must include tests\n- ✅ **Documentation** - Update relevant docs\n- ✅ **CI Passing** - All checks must pass\n- ✅ **Conventional Commits** - Follow commit format\n- ✅ **Code Review** - Address review feedback\n\n### Commit Message Format\n\n```\n\u003ctype\u003e: \u003cdescription\u003e\n\nExamples:\n- feat: add TLS support\n- fix: resolve authentication bug\n- docs: update README\n- test: add unit tests for Auth module\n- chore: update dependencies\n```\n\n**Types:**\n- `feat:` - New feature (→ minor version)\n- `fix:` - Bug fix (→ patch version)\n- `docs:` - Documentation\n- `test:` - Tests\n- `refactor:` - Code refactoring\n- `chore:` - Maintenance\n\n**Breaking Changes:**\n- Add `[major]` to title or `BREAKING CHANGE:` in body\n\n## 🔖 Versioning\n\nThis project uses [SEMVER](https://semver.org/) with automated releases.\n\n- **Patch**: Bug fixes → Add `patch` label or default\n- **Minor**: New features → Add `minor` label or use `feat:` prefix\n- **Major**: Breaking changes → Add `major` label or use `[major]` in title\n\nSee [VERSIONING.md](docs/VERSIONING.md) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectorifc%2Fmalachimq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhectorifc%2Fmalachimq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhectorifc%2Fmalachimq/lists"}