{"id":33242406,"url":"https://github.com/t2ne/dockthequeue","last_synced_at":"2025-11-16T20:01:59.825Z","repository":{"id":323901084,"uuid":"1095147940","full_name":"t2ne/dockthequeue","owner":"t2ne","description":"Minimal .NET 9 API + RabbitMQ + MongoDB integration for JSON Queueing, fully containerized with Docker Compose.","archived":false,"fork":false,"pushed_at":"2025-11-12T17:32:02.000Z","size":1709,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-12T19:18:03.939Z","etag":null,"topics":["docker","docker-compose","dotnet","json","mongodb","queue-listener","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"C#","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/t2ne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-11-12T16:50:02.000Z","updated_at":"2025-11-12T17:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/t2ne/dockthequeue","commit_stats":null,"previous_names":["t2ne/dockthequeue"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/t2ne/dockthequeue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ne%2Fdockthequeue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ne%2Fdockthequeue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ne%2Fdockthequeue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ne%2Fdockthequeue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t2ne","download_url":"https://codeload.github.com/t2ne/dockthequeue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ne%2Fdockthequeue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284767947,"owners_count":27060132,"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-11-16T02:00:05.974Z","response_time":65,"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":["docker","docker-compose","dotnet","json","mongodb","queue-listener","rabbitmq"],"created_at":"2025-11-16T20:01:23.182Z","updated_at":"2025-11-16T20:01:59.793Z","avatar_url":"https://github.com/t2ne.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DockTheQueue — .NET API + RabbitMQ + MongoDB\n\nAcademic project demonstrating a minimal integration between a .NET 9 API, a RabbitMQ message queue, and a MongoDB database. The entire system is orchestrated exclusively with Docker Compose.\n\n**GitHub: [DockTheQueue](https://github.com/t2ne/dockthequeue)**\n\n## Overview\n\n- The API exposes a single endpoint `POST /send` that accepts any valid JSON payload and publishes it to the RabbitMQ queue `jsonQueue`.\n- The `QueueListener` service consumes messages from `jsonQueue` and stores each JSON document in MongoDB database `ApiMessages`, collection `ReceivedJson`.\n\nHigh-level architecture:\n\n```\n[HTTP Client / Postman]\n          |\n          v\n[API (/send)] --\u003e [RabbitMQ (jsonQueue)] --\u003e [QueueListener] --\u003e [MongoDB (ApiMessages.ReceivedJson)]\n```\n\n## Technology Stack\n\n- .NET 9 (Minimal API + console listener)\n- RabbitMQ 3 (with Management UI)\n- MongoDB 7 + Mongo Express\n- Docker Compose for multi-service orchestration\n## Prerequisites\n\n- Docker \u0026 Docker Compose\n- Git\n\n## Cloning the GitHub repo\n\nClone the repository and change into the project root:\n\n```bash\ngit clone https://github.com/t2ne/dockthequeue.git\ncd dockthequeue\n```\n\n## Run the System (Docker Only)\n\nFrom the project root (`dockthequeue/`):\n\n```bash\ndocker compose up --build\n```\n\nServices exposed:\n\n- API: http://localhost:5076\n  - Endpoint: `POST /send`\n  - Sample payload (body - raw):\n    ```json\n    {\n      \"name\": \"Test User\",\n      \"timestamp\": \"2025-11-11T20:00:00Z\"\n    }\n    ```\n- RabbitMQ UI: http://localhost:15672 (login: `guest` / `guest`)\n- Mongo Express: http://localhost:8081 (login: `admin` / `admin`)\n\nTo stop all containers:\n\n```bash\ndocker compose down\n```\n\nMongoDB data persists in the named Docker volume `mongo_data`.\n\n## Ports\n\nDefault exposed ports:\n\n- API: 5076\n- RabbitMQ: 5672 (AMQP) / 15672 (UI)\n- MongoDB: 27017\n- Mongo Express: 8081\n\n## Project Structure\n\n```\ndockthequeue/\n├── ApiRabbitMongo/        # API that publishes received JSON to RabbitMQ\n│   ├── Program.cs\n│   └── Dockerfile\n├── QueueListener/         # Consumer that stores JSON documents in MongoDB\n│   ├── Program.cs\n│   └── Dockerfile\n├── docker-compose.yml     # Service orchestration\n└── README.md              # Documentation\n```\n\n## Processing Flow\n\n1. Client sends `POST /send` with a JSON body.\n2. API publishes the raw JSON string to RabbitMQ queue `jsonQueue`.\n3. `QueueListener` consumes messages and attempts `BsonDocument.Parse`.\n4. On success, the document is inserted into `ApiMessages.ReceivedJson` in MongoDB.\n\n## Troubleshooting\n\n| Issue                    | Possible Cause                       | Action                                                                                             |\n| ------------------------ | ------------------------------------ | -------------------------------------------------------------------------------------------------- |\n| API can't reach RabbitMQ | Startup race or wrong hostname       | Ensure container `rabbitmq` is healthy; check `RABBITMQ__HOSTNAME` env var in service definitions. |\n| No documents in MongoDB  | Listener not running or parse errors | Check logs of `queuelistener` container; verify JSON validity.                                     |\n| Port conflicts           | Existing local services              | Stop local RabbitMQ/Mongo or change published ports in `docker-compose.yml`.                       |\n\n## Author\n\n**- [t2ne](https://github.com/t2ne)**\n\n---\n\nEducational example of system integration using messaging and database persistence with .NET.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2ne%2Fdockthequeue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft2ne%2Fdockthequeue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2ne%2Fdockthequeue/lists"}