{"id":34691660,"url":"https://github.com/cloudresty/go-rabbitmq","last_synced_at":"2026-02-05T13:03:05.675Z","repository":{"id":302984609,"uuid":"1013676406","full_name":"cloudresty/go-rabbitmq","owner":"cloudresty","description":"A modern, production-ready Go package for RabbitMQ operations with environment-first configuration, ULID message IDs, and comprehensive production features.","archived":false,"fork":false,"pushed_at":"2025-11-21T19:34:51.000Z","size":4193,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-21T20:33:19.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cloudresty.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudresty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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}},"created_at":"2025-07-04T09:31:07.000Z","updated_at":"2025-11-21T19:34:55.000Z","dependencies_parsed_at":"2025-07-05T03:14:30.238Z","dependency_job_id":"572917f6-32e0-4a7d-9210-7e89af9169d2","html_url":"https://github.com/cloudresty/go-rabbitmq","commit_stats":null,"previous_names":["cloudresty/go-rabbitmq"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/cloudresty/go-rabbitmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudresty%2Fgo-rabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudresty%2Fgo-rabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudresty%2Fgo-rabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudresty%2Fgo-rabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudresty","download_url":"https://codeload.github.com/cloudresty/go-rabbitmq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudresty%2Fgo-rabbitmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28010295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-12-24T22:00:01.741Z","updated_at":"2026-02-05T13:03:05.654Z","avatar_url":"https://github.com/cloudresty.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go RabbitMQ\n\n[Home](README.md) \u0026nbsp;/\n\n\u0026nbsp;\n\n**A modular, production-ready Go library for RabbitMQ with pluggable architecture.** Built on the **contract-implementation pattern**, where core interfaces live in the root package and concrete implementations are provided by specialized sub-packages. This design enables maximum flexibility, testability, and extensibility for enterprise messaging solutions.\n\n\u0026nbsp;\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/cloudresty/go-rabbitmq.svg)](https://pkg.go.dev/github.com/cloudresty/go-rabbitmq)\n[![Go Tests](https://github.com/cloudresty/go-rabbitmq/actions/workflows/ci.yaml/badge.svg)](https://github.com/cloudresty/go-rabbitmq/actions/workflows/ci.yaml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/cloudresty/go-rabbitmq)](https://goreportcard.com/report/github.com/cloudresty/go-rabbitmq)\n[![GitHub Tag](https://img.shields.io/github/v/tag/cloudresty/go-rabbitmq?label=Version)](https://github.com/cloudresty/go-rabbitmq/tags)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n\u0026nbsp;\n\n## Table of Contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Pluggable Sub-Packages](#pluggable-sub-packages)\n- [Key Features](#key-features)\n- [Simple Queue Configuration](#simple-queue-configuration)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [Security](#security)\n- [License](#license)\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Requirements\n\n- Go 1.24+ (recommended)\n- RabbitMQ 4.0+ (recommended)\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Installation\n\n```bash\ngo get github.com/cloudresty/go-rabbitmq\n```\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Pluggable Sub-Packages\n\nEach sub-package implements core interfaces defined in the root package, enabling you to mix and match features as needed:\n\n| Package | Purpose | Key Features |\n| :--- | :--- | :--- |\n| **[compression/](compression/)** | Message compression | Gzip, Zlib with configurable thresholds |\n| **[encryption/](encryption/)** | Message encryption | AES-256-GCM with secure key management |\n| **[pool/](pool/)** | Connection pooling | Round-robin, health monitoring, auto-repair |\n| **[performance/](performance/)** | Metrics \u0026 monitoring | Latency tracking, rate monitoring, statistics |\n| **[saga/](saga/)** | Distributed transactions | Orchestration engine, compensation, atomic state |\n| **[streams/](streams/)** | RabbitMQ Streams | High-throughput, durable, ordered messaging |\n| **[shutdown/](shutdown/)** | Graceful shutdown | Signal handling, resource cleanup, timeouts |\n| **[protobuf/](protobuf/)** | Protocol Buffers | Type-safe serialization, message routing |\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Key Features\n\n### Contract-Implementation Architecture\n\n- **Core Interfaces**: All contracts defined in the root package\n- **Pluggable Implementations**: Concrete implementations in specialized sub-packages\n- **Mix \u0026 Match**: Combine any features - encryption + compression + pooling + streams\n- **Testing**: Easy mocking of interfaces for comprehensive unit testing\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n### Production-Ready Features\n\n- **Delivery Assurance**: Built-in publisher confirms with asynchronous callbacks for reliable message delivery\n- **Publisher Retry**: Automatic re-publishing of nacked messages with configurable backoff and max attempts\n- **Consumer Retry**: Header-based retry tracking that works across distributed consumers (supports both Quorum and Classic queues)\n- **Topology Auto-Healing**: Automatic topology validation and recreation enabled by default\n- **Connection Pooling**: Distribute load across multiple connections with health monitoring\n- **Message Encryption**: AES-256-GCM encryption with secure key management\n- **Compression**: Gzip/Zlib compression with configurable thresholds\n- **Saga Pattern**: Distributed transaction orchestration with automatic compensation\n- **Streams Support**: High-throughput RabbitMQ Streams for event sourcing\n- **Performance Monitoring**: Latency tracking, rate monitoring, comprehensive metrics\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n### Developer Experience\n\n- **ULID Message IDs**: 6x faster than UUIDs, database-optimized, lexicographically sortable\n- **Auto-Reconnection**: Intelligent retry with configurable exponential backoff\n- **Graceful Shutdown**: Signal handling with proper resource cleanup and timeouts\n- **Comprehensive Documentation**: Each sub-package has detailed README with examples\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Simple Queue Configuration\n\nThis library provides a straightforward approach to queue configuration with user control over topology:\n\n\u0026nbsp;\n\n### Quorum Queues by Default\n\n- **High Availability**: Built-in replication across cluster nodes\n- **Data Safety**: No message loss during node failures\n- **Poison Message Protection**: Automatic delivery limits prevent infinite redelivery loops\n- **Better Performance**: Optimized for throughput in clustered environments\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n### Dead Letter Configuration\n\n- **Manual Configuration**: Full control over dead letter exchange and routing configuration\n- **Flexible Setup**: Configure dead letter handling exactly as needed for your topology\n- **Error Handling**: Failed messages routed according to your dead letter configuration\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n### Topology Auto-Healing (Enabled by Default)\n\n- **Automatic Validation**: Every publish/consume operation validates topology exists\n- **Auto-Recreation**: Missing exchanges, queues, and bindings are automatically recreated\n- **Background Monitoring**: Periodic validation every 30 seconds (default, customizable)\n- **Zero Configuration**: Works out of the box - no setup required\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n### Easy Customization\n\n```go\n// Default: Auto-healing quorum queue (production-ready!)\nclient, _ := rabbitmq.NewClient(rabbitmq.FromEnv())\nadmin := client.Admin()\nqueue, _ := admin.DeclareQueue(ctx, \"orders\")  // Automatically tracked \u0026 protected\n\n// Custom quorum settings\nqueue, _ := admin.DeclareQueue(ctx, \"payments\",\n    rabbitmq.WithQuorumGroupSize(5),       // Custom cluster size\n    rabbitmq.WithDeliveryLimit(3),         // Max retry attempts\n)\n\n// With dead letter configuration\nqueue, _ := admin.DeclareQueue(ctx, \"processing\",\n    rabbitmq.WithDeadLetter(\"errors.dlx\", \"failed\"), // Manual DLX setup\n)\n\n// Advanced users can opt-out if needed\nclient, _ := rabbitmq.NewClient(\n    rabbitmq.FromEnv(),\n    rabbitmq.WithoutTopologyValidation(),            // Disable auto-healing\n    rabbitmq.WithoutTopologyAutoRecreation(),        // Keep validation, disable auto-recreation\n    rabbitmq.WithoutTopologyBackgroundValidation(),  // Disable background monitoring only\n)\n\n// Or customize the background validation interval\nclient, _ := rabbitmq.NewClient(\n    rabbitmq.FromEnv(),\n    rabbitmq.WithTopologyValidationInterval(10*time.Second), // Custom interval\n)\n\n// Legacy compatibility (opt-in)\nqueue, _ := admin.DeclareQueue(ctx, \"legacy\",\n    rabbitmq.WithClassicQueue(),           // Classic queue type\n)\n```\n\n**Benefits**: Get enterprise-grade reliability and availability with simple, user-controlled configuration.\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Documentation\n\n| Document | Description |\n| :--- | :--- |\n| **Sub-Package READMEs** | Detailed documentation for each pluggable feature |\n| [compression/](compression/) | Message compression with Gzip and Zlib |\n| [encryption/](encryption/) | AES-256-GCM message encryption |\n| [performance/](performance/) | Metrics collection and monitoring |\n| [pool/](pool/) | Connection pooling with health monitoring |\n| [protobuf/](protobuf/) | Protocol Buffers integration |\n| [saga/](saga/) | Distributed transaction orchestration |\n| [shutdown/](shutdown/) | Graceful shutdown management |\n| [streams/](streams/) | High-throughput RabbitMQ Streams |\n| **Additional Docs** | |\n| [Quick Start](docs/quick-start.md) | Get up and running with minimal code |\n| [API Reference](docs/api-reference.md) | Complete function reference and usage patterns |\n| [Environment Variables](docs/environment-variables.md) | List of environment variables for configuration |\n| [Environment Variables](docs/environment-variables.md) | Complete environment variable reference and usage |\n| [Production Features](docs/production-features.md) | Auto-reconnection, graceful shutdown, HA queues |\n| [Examples](examples/) | Working examples for each feature |\n| [ULID Message IDs](docs/ulid-message-ids.md) | Using ULIDs for message IDs in RabbitMQ |\n| [Usage Patterns](docs/usage-patterns.md) | Common patterns for using the library effectively |\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for your changes\n4. Ensure all tests pass\n5. Submit a pull request\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## Security\n\nIf you discover a security vulnerability, please report it via email to [security@cloudresty.com](mailto:security@cloudresty.com).\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.\n\n\u0026nbsp;\n\n🔝 [back to top](#go-rabbitmq)\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n---\n\n### Cloudresty\n\n[Website](https://cloudresty.com) \u0026nbsp;|\u0026nbsp; [LinkedIn](https://www.linkedin.com/company/cloudresty) \u0026nbsp;|\u0026nbsp; [BlueSky](https://bsky.app/profile/cloudresty.com) \u0026nbsp;|\u0026nbsp; [GitHub](https://github.com/cloudresty) \u0026nbsp;|\u0026nbsp; [Docker Hub](https://hub.docker.com/u/cloudresty)\n\n\u003csub\u003e\u0026copy; Cloudresty - All rights reserved\u003c/sub\u003e\n\n\u0026nbsp;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudresty%2Fgo-rabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudresty%2Fgo-rabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudresty%2Fgo-rabbitmq/lists"}