{"id":18523101,"url":"https://github.com/taymindis/ngx-stomp","last_synced_at":"2025-04-09T11:31:27.571Z","repository":{"id":132372004,"uuid":"136440249","full_name":"Taymindis/ngx-stomp","owner":"Taymindis","description":"A STOMP upstream module on nginx, STOMP is the Simple (or Streaming) Text Orientated Messaging Protocol.","archived":false,"fork":false,"pushed_at":"2018-06-13T08:47:22.000Z","size":175,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:13:28.726Z","etag":null,"topics":["mq","nginx","stompclient"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Taymindis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-06-07T07:38:07.000Z","updated_at":"2024-09-03T03:59:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f0ed92f-635c-4f34-9b5e-92588184b454","html_url":"https://github.com/Taymindis/ngx-stomp","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/Taymindis%2Fngx-stomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taymindis%2Fngx-stomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taymindis%2Fngx-stomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taymindis%2Fngx-stomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Taymindis","download_url":"https://codeload.github.com/Taymindis/ngx-stomp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031407,"owners_count":21036392,"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":["mq","nginx","stompclient"],"created_at":"2024-11-06T17:34:15.710Z","updated_at":"2025-04-09T11:31:27.082Z","avatar_url":"https://github.com/Taymindis.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nngx-stomp\n=========\n\nA STOMP upstream module on nginx, [STOMP](https://stomp.github.io/) is the Simple (or Streaming) Text Orientated Messaging Protocol.\n\nTable of Contents\n=================\n\n* [Introduction](#introduction)\n* [Usage](#usage)\n* [Response Format](#response-format)\n* [Directive](#directive)\n* [Installation](#installation)\n* [Test](#test)\n* [Tips](#tips)\n* [Support](#support)\n* [Copyright \u0026 License](#copyright--license)\n\nIntroduction\n============\n\nngx-stomp is a nginx 3rd party module which allow to send http request and proxy to stomp amqp protocol server with given pre-defined/dynamic frame.\n\n\nUsage\n=======\n### 0. Setup your stomp upstream and subscribed queue\n```nginx\n# nginx.conf\n  upstream stomp {\n        stomp_subscribes /amq/queue/stompqueue;\n        stomp_endpoint 127.0.0.1:61618 login=guest passcode=guest max_send_sess=3 max_recv_sess=3;\n    }\n```\n\n\n### 1. Simple create stomp frame command, \n```nginx\n# nginx.conf\n\nserver {\n    ....\n    location /sendqueue {\n\t   stomp_pass stomp;\n\t   stomp_command SEND;\n\t   stomp_headers \"destination:/amq/queue/stompqueue\n\t\t\t\t\t  persistent:false\n            content-type:text/plain\n\t\t\t\t\t  content-length:38\";\n\t   stomp_body \"This is new message sending from stomp\";\n\t}\n}\n```\n\n\n### 2. Simple consuming the queue destination which pre-defined from upstream\n```nginx\n# nginx.conf\n\nserver {\n  ....\n  \n    location /consume {\n\t   stomp_pass stomp;\n\t   stomp_command CONSUME;\n\t}\n}\n```\n\n[Back to TOC](#table-of-contents)\n\nResponse Format\n===============\nHttp Headers will be Frame Command and headers, Response content will be Frame body content.\n\n\n[Back to TOC](#table-of-contents)\n\nDirective                                                                                                                                                  \n=========           \n                                                                                                                                                           \n| Key               | Description                                                                                                                           |\n| -------------     |:-------------:                                                                                                                        |\n| stomp_subscribes  | which need to defined in upstream block, to tell that which destination queue going to subscribe                                      |\n| stomp_endpoint    | the AMQ server which has stomp protocol feature.                                                                                      |\n| max_send_sess     | the maximum connection which allow to use for sending message to amq server, default is 10                                            |\n| max_recv_sess     | the maximum connection which allow to use for consuming message from amq server, default is 5                                         |\n| stomp_pass        | upstream to stomp.                                                                                                                    |\n| stomp_command     | frame command ( Please note that 'CONSUME' command is the extra command which allow you to consume the message via HTTP request )     |\n| stomp_headers     | frame headers when sending the message                                                                                                |\n| stomp_body        | message content for sending                                                                                                           |\n        \n\n[Back to TOC](#table-of-contents)           \n\nInstallation\n============\n\n```bash\nwget 'http://nginx.org/download/nginx-1.13.7.tar.gz'\ntar -xzvf nginx-1.13.7.tar.gz\ncd nginx-1.13.7/\n\n./configure --add-module=/path/to/ngx-stomp\n\nmake -j2\nsudo make install\n```\n\n[Back to TOC](#table-of-contents)\n\n\nTest\n=====\n\nIt depends on nginx test suite libs, please refer [test-nginx](https://github.com/openresty/test-nginx) for installation.\n\n\n```bash\ncd /path/to/ngx-stomp\nexport PATH=/path/to/nginx-dirname:$PATH \nsudo prove t\n```\n\n[Back to TOC](#table-of-contents)\n\n\nTips\n=====\n\nThe more subscribe session you set, the more consumer will listen to the subscribed queue, suggested to set a fixed consumer session that are constantly consuming the queue, else the broker might send to some consumer which is not actively call for consuming\n\nFor example, if you set `max_recv_sess=5`, it will subscribe 5 listener later, you should have 5 connection to do constantly polling. If you just need one polling please set to `max_recv_sess=1`, then you connection polling should not be more than 1.\n\nExample of 1 receving session and 3 sending session.\n![Image of 1](1recv-3send.png)\n\n\n\nExample of 5 receving session and 10 sending session.\n![Image of 2](5recv-10send.png)\n\n\n[Back to TOC](#table-of-contents)\n\n\nSupport\n=======\n\nPlease do not hesitate to contact minikawoon2017@gmail.com for any queries or development improvement.\n\n\n[Back to TOC](#table-of-contents)\n\nCopyright \u0026 License\n===================\n\nThis module is licensed under the terms of the BSD 3-Clause License.\n\nCopyright (c) 2018, Taymindis Woon \u003ccloudleware2015@gmail.com\u003e\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n[Back to TOC](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaymindis%2Fngx-stomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaymindis%2Fngx-stomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaymindis%2Fngx-stomp/lists"}