{"id":20696491,"url":"https://github.com/sithira/queuepro","last_synced_at":"2026-04-22T06:06:38.264Z","repository":{"id":117341281,"uuid":"184437253","full_name":"Sithira/QueuePro","owner":"Sithira","description":"A broker queue for API calls","archived":false,"fork":false,"pushed_at":"2019-05-01T15:27:50.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T18:26:51.583Z","etag":null,"topics":["api-queue","java","queue","queue-workers","rabbitmq","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Sithira.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}},"created_at":"2019-05-01T15:27:33.000Z","updated_at":"2019-05-01T15:30:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a23a3c6-1907-4192-883c-adc504c101e9","html_url":"https://github.com/Sithira/QueuePro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FQueuePro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FQueuePro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FQueuePro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sithira%2FQueuePro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sithira","download_url":"https://codeload.github.com/Sithira/QueuePro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961754,"owners_count":20213315,"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","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":["api-queue","java","queue","queue-workers","rabbitmq","spring-boot"],"created_at":"2024-11-17T00:14:09.752Z","updated_at":"2025-12-24T06:20:12.454Z","avatar_url":"https://github.com/Sithira.png","language":"Java","readme":"### S-QUEUE Pro\n\nQueuePro basically helps you to call all the API calls to external services through this and retries if fails.\n\n#### How QueuePro works ?\n\nQueuePro basically acts like a broker between your application and external webservices. when a request a come to the\ndefault queue it will call the web services with the data provided in the payload. if the response we get is not a 200 \nor an empty body, QueuePro will retry the request in 2 minutes. This process will happen for maxium 5 times for period \nof 10 mins.\n\nWhen a external call receives a success response, QueuePro will immediately send the response and payload combined to the \nsuccess queue, so the consumers of that queue will be able to consume them. QueuePro will also will listen for the success \nqueues calls, thus handling error responses as same as the default queue.\n\nQueuePro will give up retrying after 5th time and Negatively acknowledges to the respective queue. \n\n#### Payload structure\nFor QueuePro to work, you need a basic JSON payload structure as mentioned below.\n```json\n{  \n   \"url\":\"http://example.com/test\",\n   \"body\":{  \n      \"some_key\":\"some-value\",\n      \"some_other_key\":true,\n      \"authentication\": \"username:password\"\n   },\n   \"method\": \"POST\",\n   \"callback_data\": {\n        \"url\": \"http://example.com/test-url\",\n        \"body\":{  \n          \"action\": \"done\"\n        },\n        \"method\": \"POST\"\n   }\n}\n```\n\n#### Authenticated resources\nQueuePro supports basic authentication for now.\n```json\n{\n\"authentication\":\"username:password\"\n}\n```\nAs mentioned above you must have the authentication field filled with username and password separated by a \":\", QueuePro\nwill handle the rest for you.\n\n#### How to add a new queue to the QueuePro\n\nAll the configurations for the QP are stored in application.yml.\nThese are the default configs for the QP beside default Spring configs.\n```yaml\nmembership-consumer:\n  api_queue: \"membership_api_requests_queue\"\n  success_queue: \"membership_api_requests_success_queue\"\n  exchange: \"membership_exchange\"\n  routing_key: \"membership_key_default\"\n  success_routing_key: \"membership_key_success\"\n  x_delay: 2000\n```\n\n#### Creating a new consumer\nCreating a consumer is not as hard as it sounds. below are the steps to create you own queue consumer.\n\n* Create a new JAVA class under the membershipconsumer.consumers package\n* Extend it from BaseConsumer and implement it from `ChannelAwareMessageListener` (you can implement any message listener)\n* You can use `isSuccess()` method to check the successes of the external API call and `handleFailed()` method to handle \nthe failed fails. These methods are already implemented, but if you want to use your own logic you are free to override \nthem. \n\n```java\nclass MyNewConsumer extends BaseConsumer implements ChannelAwareMessageListener {\n    \n        @Autowired\n        private RESTCallHelper restCallHelper;\n    \n        @Autowired\n        private RabbitMQMessageHelper rabbitMQMessageHelper;\n        \n        if (isSuccess()) {\n            // your success logic\n        } else {\n            handleFailed();\n        }\n    \n}\n```\n\n\n#### About BaseConsumer\n\nBaseConsumer is the parent class that handles all the queue logic and letting us to separate queue logic.\nYou can use `isSuccess()` method to check the successes of the external API call and `handleFailed()` method to handle \nthe failed fails. These methods are already implemented, but if you want to use your own logic you are free to override \nthem. \n\n#### Testing","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsithira%2Fqueuepro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsithira%2Fqueuepro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsithira%2Fqueuepro/lists"}