{"id":23545277,"url":"https://github.com/rulyotano/example-queue-workers","last_synced_at":"2026-04-17T12:32:52.422Z","repository":{"id":232221215,"uuid":"700329576","full_name":"rulyotano/example-queue-workers","owner":"rulyotano","description":"Sample project to create a message queue to process long running tasks","archived":false,"fork":false,"pushed_at":"2023-10-30T07:36:02.000Z","size":333,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T10:44:05.790Z","etag":null,"topics":["docker","dotnet","example","queue","rabbitmq","test","worker","worker-queue"],"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/rulyotano.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}},"created_at":"2023-10-04T11:48:34.000Z","updated_at":"2023-12-13T22:22:12.000Z","dependencies_parsed_at":"2024-04-08T18:40:27.403Z","dependency_job_id":null,"html_url":"https://github.com/rulyotano/example-queue-workers","commit_stats":null,"previous_names":["rulyotano/example-queue-workers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rulyotano/example-queue-workers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rulyotano%2Fexample-queue-workers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rulyotano%2Fexample-queue-workers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rulyotano%2Fexample-queue-workers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rulyotano%2Fexample-queue-workers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rulyotano","download_url":"https://codeload.github.com/rulyotano/example-queue-workers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rulyotano%2Fexample-queue-workers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31929666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"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":["docker","dotnet","example","queue","rabbitmq","test","worker","worker-queue"],"created_at":"2024-12-26T08:15:45.780Z","updated_at":"2026-04-17T12:32:52.408Z","avatar_url":"https://github.com/rulyotano.png","language":"C#","readme":"# Example Worker Message Queue\n\nCreate a message queue to simulate long tasks running in dotnet using RabbitMq.\nThese long running task can vary, for example process big files (or files in general), web crawler, db migrations, conciliation processes between 2 ledgers, etc. This code is meant to be as simple as possible.\n\nJust following the tutorial from the official Rabbit documentation:\n1. [Introduction](https://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html)\n1. [Work Queues](https://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html)\n\n## How to try it\n\n- Install docker\n- Run: `docker-compose up -d` (this will start 3 services: producer, rabbit and worker)\n- Open the producer. Go to `http://localhost:3002/swagger` (be sure this port is free, if not, change it in the docker compose file)\n- Open the RabbitMq. Go to `http://localhost:8082/` and login using user and pass defined in the docker compose file.\n- Test it\n- Run `docker-compose down`\n\nSo far we can test it by make requests using the producer's swagger UI. And we can see how the messages get stuck in the rabbit.\n\nThen we can create new worker instances. Just go to the `docker-compose.yml` file and change the `worker-\u003edeploy-\u003ereplicas` to a higher value. Then run `docker-compose up -d worker` Depending on how hight is the amount of replicas we defined, the ready messages should go down much more faster.\n\nRules:\n- One worker can only perform 1 job at the same time\n- Every job will take 10 seconds.\n\n### 1. Initial state, no message queued. Only 1 worker\n\n![Initial state](images/1_initial.png)\n\n### 2. Enqueue a lot of work to do\n\n![Add tasks](images/2_add_tasks.png)\n\n### 3. Add more workers\n\n![More workers](images/3_1_more_workers.png)\n\n![More workers](images/3_2_more_workers.png)\n\n### 4. Pending scheduled work go down much more faster\n\n![Pending go down](images/4_pending_go_down.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frulyotano%2Fexample-queue-workers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frulyotano%2Fexample-queue-workers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frulyotano%2Fexample-queue-workers/lists"}