{"id":19673371,"url":"https://github.com/ilcande/manager-app","last_synced_at":"2026-05-04T17:35:50.689Z","repository":{"id":224824071,"uuid":"425492494","full_name":"ilcande/manager-app","owner":"ilcande","description":"a simple application that displays all payment requests submitted by the contractor through RabbitMQ and Bunny","archived":false,"fork":false,"pushed_at":"2021-11-07T17:46:06.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T05:17:17.320Z","etag":null,"topics":["bunny","rabbitmq","redis","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ilcande.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":"2021-11-07T12:05:48.000Z","updated_at":"2021-11-07T17:46:09.000Z","dependencies_parsed_at":"2024-02-27T23:01:59.883Z","dependency_job_id":null,"html_url":"https://github.com/ilcande/manager-app","commit_stats":null,"previous_names":["ilcande/manager-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ilcande/manager-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilcande%2Fmanager-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilcande%2Fmanager-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilcande%2Fmanager-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilcande%2Fmanager-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilcande","download_url":"https://codeload.github.com/ilcande/manager-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilcande%2Fmanager-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32618140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: 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":["bunny","rabbitmq","redis","ruby","ruby-on-rails"],"created_at":"2024-11-11T17:15:04.263Z","updated_at":"2026-05-04T17:35:50.654Z","avatar_url":"https://github.com/ilcande.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Objective\nFollowing the steps from the contractor app, here I am going to build a `Consumer` (the manager) to receive the data sent by the `Producer` (the contractor, from the contractor-app).\n\n## Configuration\nWe need to add dependencies to our Gemfile:\n```\ngem 'redis-rails'\ngem 'redis-namespace'\ngem 'sneakers'\ngem 'bunny'\n```\n\n* Redis: In-memory data structure store, used as a database, cache and message broker.\n* Redis-Namespace: Redis::Namespace provides an interface to a namespaced subset of your Redis keyspace.\n* Sneakers: a high-performance RabbitMQ background processing framework for Ruby. It made especially for processing messages that come from queues\n* Bunny: as for the producer.\n\nFirst things to do is to create initializers for the dependencies and connect the Manager (consumer) to the Contractor (producer) by creating the queue `(manager_dashboard.payment_requests)`.\n\nSo, I create a rake task and I add it to the app. It will allow to initialize the connection between the two apps throughout `RabbitMQ`.\n\nThen I need to add a payment request worker to handle the message sent by the exchange that I have created in the contractor app.\n\nAt this point the manager is connected to the contractor and we are able to play with data\n\nWe need 3 terminal windows open, in one lift up RabbitMQ server\n```\n/usr/local/opt/rabbitmq/sbin/rabbitmq-server\n```\n\nIn the second one we need to action the work method that allow us to retrieve data\n```\nWORKERS=PaymentRequestsWorker bundle exec rake sneakers:run\nrake rabbitmq:setup\n```\nMake sure you browse to http://localhost:15672/ and click on Exchange tab, `display.payment_requests`\n\nIn a third terminal create a payment request from the contractor rails console. Once created a curve in the RabbitMQ Exchange tab will display which means the data sent by the producer is displayed.\n\n## Improvements\n* `ActionCable` could be used to display data in real time\n* Use background job `Sidekiq`: What about using background job to synchronize data ?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filcande%2Fmanager-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filcande%2Fmanager-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filcande%2Fmanager-app/lists"}