{"id":51124568,"url":"https://github.com/brg-liuwei/ngx_kafka_module","last_synced_at":"2026-06-25T06:01:30.048Z","repository":{"id":2744033,"uuid":"25351965","full_name":"brg-liuwei/ngx_kafka_module","owner":"brg-liuwei","description":"nginx kafka module, send post log data to kafka cluster","archived":false,"fork":false,"pushed_at":"2022-02-15T09:55:26.000Z","size":34,"stargazers_count":170,"open_issues_count":16,"forks_count":67,"subscribers_count":13,"default_branch":"master","last_synced_at":"2023-11-07T20:53:30.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brg-liuwei.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}},"created_at":"2014-10-17T10:10:21.000Z","updated_at":"2023-11-06T09:28:22.000Z","dependencies_parsed_at":"2022-08-06T12:31:14.894Z","dependency_job_id":null,"html_url":"https://github.com/brg-liuwei/ngx_kafka_module","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/brg-liuwei/ngx_kafka_module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brg-liuwei%2Fngx_kafka_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brg-liuwei%2Fngx_kafka_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brg-liuwei%2Fngx_kafka_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brg-liuwei%2Fngx_kafka_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brg-liuwei","download_url":"https://codeload.github.com/brg-liuwei/ngx_kafka_module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brg-liuwei%2Fngx_kafka_module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34761847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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":[],"created_at":"2026-06-25T06:01:23.871Z","updated_at":"2026-06-25T06:01:30.043Z","avatar_url":"https://github.com/brg-liuwei.png","language":"C","funding_links":[],"categories":["Honourable mentions"],"sub_categories":[],"readme":"Nginx Kafka Module\n====\n\n[![Build Status](https://travis-ci.org/brg-liuwei/ngx_kafka_module.svg?branch=master)](https://travis-ci.org/brg-liuwei/ngx_kafka_module)\n\nNginx kafka module is used to receive http post data and deliver messages to [kafka](http://kafka.apache.org/)\n\nIf there are any problems when using this module, feel free to send a mail to me :)\n\nTable of Contents\n====\n\n* [Nginx Kafka Module](#nginx-kafka-module)\n* [Installation](#installation)\n    * [Dependency Installation](#dependency-installation)\n    * [Compilation](#compilation)\n* [Nginx Configuration](#nginx-configuration)\n* [Example of Usage](#example-of-usage)\n* [Report Bugs](#report-bugs)\n* [TODO](#todo)\n* [Copyright \u0026 License](#copyright--license)\n\nInstallation\n====\n\nDependency Installation\n----\n\nInstall [librdkafka](https://github.com/edenhill/librdkafka)\n\n    git clone https://github.com/edenhill/librdkafka\n    cd librdkafka\n    ./configure\n    make\n    sudo make install\n\nCompilation\n----\n\nCompile this module into nginx\n\n    git clone https://github.com/brg-liuwei/ngx_kafka_module\n\n    # cd /path/to/nginx\n    ./configure --add-module=/path/to/ngx_kafka_module\n\n    make\n\n    sudo make install\n    # or, use `sudo make upgrade` instead of `sudo make install`\n\nIn newer version of nginx(\u003e=1.9.11), you can make this module as an dynamic module.\n\n    git clone https://github.com/brg-liuwei/ngx_kafka_module\n\n    # cd /path/to/nginx\n    ./configure --add-dynamic-module=/path/to/ngx_kafka_module\n\n    make modules\n    # This will generate a objs/ngx_http_kafka_module.so in your /path/to/ngx_kafka_module and you can copy the so file to a proper location.\n\n[Back to TOC](#table-of-contents)\n\nNginx Configuration\n====\n\nAdd the code to nginx conf file as follows\n\n    http {\n\n        # some other configs\n\n        kafka;\n\n        kafka_broker_list 127.0.0.1:9092 127.0.0.1:9093; # host:port ...\n\n        server {\n\n            # some other configs\n\n            location = /your/path/topic {\n                # optional directive: kafka_partition [\u003cpartition-num\u003e | auto]\n                #\n                # kafka_partition auto; # default value\n                # kafka_partition 0;\n                # kafka_partition 1;\n\n                kafka_topic your_topic;\n            }\n        }\n    }\n\nIf you compile module as a dynamic module, you must add\n    \n    load_module /path/to/ngx_http_kafka_module.so;\n\nat the beginning of the nginx config file besides adding the code. After that you can use the module by just executing `nginx -c /path/to/nginx.conf -s reload`.\n\n\n[Back to TOC](#table-of-contents)\n\nExample of Usage\n====\n\n    curl localhost/your/path/topic -d \"message send to kafka topic\"\n\nor you can use `-v` or `--verbose` to see http request and response for detail:\n\n    curl localhost/your/path/topic -d \"hello ngx_kafka_module\" -v\n\nIf the message is successfully delivered, the http status code must be 204(NO CONTENT). If using `-v` or `--verbose` option of `curl`, the following line will be seen:\n\n    \u003c HTTP/1.1 204 No Content\n\n\n[Back to TOC](#table-of-contents)\n\nReport Bugs\n====\n\nYou are very welcome to report issues on GitHub:\n\nhttps://github.com/brg-liuwei/ngx_kafka_module/issues\n\n[Back to TOC](#table-of-contents)\n\nCopyright \u0026 License\n====\n\nThis module is licensed under the BSD license.\n\nCopyright (C) 2014-2016, by Liu Wei(brg-liuwei) stupidlw@126.com.\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n[Back to TOC](#table-of-contents)\n\nTODO\n====\n\n[issue #13: passing nginx common variables into kafka](https://github.com/brg-liuwei/ngx_kafka_module/issues/13)\n\n[Back to TOC](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrg-liuwei%2Fngx_kafka_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrg-liuwei%2Fngx_kafka_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrg-liuwei%2Fngx_kafka_module/lists"}