{"id":25412924,"url":"https://github.com/flomesh-io/pipy-mqtt-proxy","last_synced_at":"2026-04-16T02:31:59.261Z","repository":{"id":234027052,"uuid":"787894895","full_name":"flomesh-io/pipy-mqtt-proxy","owner":"flomesh-io","description":"A lightweight, highly configurable MQTT proxy built on Pipy for efficient MQTT traffic handling, enabling secure and scalable IoT communication. Optimized for low latency and high throughput, the Pipy MQTT Proxy enhances MQTT protocol routing and load balancing with easy deployment and management.","archived":false,"fork":false,"pushed_at":"2024-06-06T00:51:26.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T17:51:14.234Z","etag":null,"topics":["loadbalancing","mqtt","proxy","routing","throttle"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/flomesh-io.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,"zenodo":null}},"created_at":"2024-04-17T11:42:25.000Z","updated_at":"2024-06-06T00:51:29.000Z","dependencies_parsed_at":"2025-04-16T05:55:11.864Z","dependency_job_id":"3811fccc-bd2a-442c-bb64-4a8caeecbf04","html_url":"https://github.com/flomesh-io/pipy-mqtt-proxy","commit_stats":null,"previous_names":["addozhang/pipy-mqtt-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flomesh-io/pipy-mqtt-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flomesh-io%2Fpipy-mqtt-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flomesh-io%2Fpipy-mqtt-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flomesh-io%2Fpipy-mqtt-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flomesh-io%2Fpipy-mqtt-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flomesh-io","download_url":"https://codeload.github.com/flomesh-io/pipy-mqtt-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flomesh-io%2Fpipy-mqtt-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31868493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["loadbalancing","mqtt","proxy","routing","throttle"],"created_at":"2025-02-16T13:38:17.334Z","updated_at":"2026-04-16T02:31:59.237Z","avatar_url":"https://github.com/flomesh-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pipy MQTT Proxy\n\n## Intro\n\nThis is a demonstration of Pipy working as a MQTT Proxy, providing features:\n\n- Loadbalancing\n- HealthCheck\n- Message tagging\n- Logging\n- Metrics\n- Tracing\n- Rate limit\n- Client identifier black/white list\n- Authentication base on username and password\n\nBeyond these, it also provides flexible extension with [PipyJS](https://flomesh.io/pipy/docs/en/reference/pjs).\n\n## Quickstart\n\nFirst, download the Pipy binary from [here](https://flomesh.io/pipy/download).\n\nThen run the command:\n\n```shell\npipy main.js\n```\n\nIt will start a proxy listening on `1884` and forward the request to broker which may running on `localhost:1883`.\n\n## Configuration\n\nThe configuration of proxy locates at [config.yaml](./config.yaml).\n\n- `listen`: the port proxy will listen on,\n- `listenTLS`\n  - `port`: the TLS port proxy will listen on. Disable TSL by commentting.\n  - `cert`: cert file location\n  - `key`: key file location\n- `brokers`: the list of upstream MQTT brokers,\n  - `addr`: broker address\n  - `capicity`: the connection capicity of broker\n- `healthCheck`: configuration of health check\n  - `enabled`: if enable health check or not\n  - `interval`: the health check interval\n  - `failureThreshold`: health check failutre threshold from failure\n  - `successThreshold`: health check success threshold from failure\n  - `backoffRate`: the backoff rate for failure broker checking\n- `limits`: rate limit configuration which can limit connection rate and message publising rate,\n  - `conn`\n    - `rate`: connciton limit\n    - `fastFail`: reject connection if reach limit, or it will hold the connect request for next statistics window\n- `tracing`: proxy will generate a traceid and embed it header with name as value of `key`,\n- `tags`: the tags list you prefer to embed in message header. It accepts key-value pair.\n- `ids`: the client id white and black list,\n- `creds`: username and password configured as key-value pair.\n- `plugins`: the feature list proxy provides. You can customize its features by commenting or uncommenting.\n But please keep the `balancer` in the end.\n\n```yaml\nlisten: 1884\nlistenTLS: \n  port: 11884\n  cert: ./secret/server-cert.pem\n  key: ./secret/server-key.pem\nbrokers:\n  - addr: 127.0.0.1:1883\n    capicity: 50\nhealthCheck:\n  enabled: true\n  interval: 2 #seconds\n  failureThreshold: 3\n  successThreshold: 3\n  backoffRate: 2    \nlimits:\n  conn:\n    rate: 20\n    blockInput: true\n    fastFail: true\n  pub:\n    rate: 20\n    blockInput: true\ntracing:\n  key: traceid\ntags:\n  proxy: pipy\nids:\n  allow:\n    - client-1\n    - client-2\n  deny:\n    - client-3\ncreds:\n  username: flomesh\n  password: pipy  \nplugins:\n  - tag\n  - tracing\n  - logger\n  - metrics\n  # - identify\n  # - credential\n  - throttle\n  - balancer\n```\n\n## Appendix\n\nThe cert and key files in [./secret](./secret) are generated with script below.\n\n```shell\n#ca\nopenssl genrsa 2048 \u003e ca-key.pem\nopenssl req -new -x509 -nodes -days 365000 \\\n   -key ca-key.pem \\\n   -out ca-cert.pem \\\n   -subj '/CN=nip.io'\n#sever\nopenssl genrsa -out server-key.pem 2048\nopenssl req -new -key server-key.pem -out server.csr -subj '/CN=broker.nip.io'\nopenssl x509 -req -in server.csr -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -days 365\n#client\nopenssl genrsa -out client-key.pem 2048\nopenssl req -new -key client-key.pem -out client.csr -subj '/CN=client.nip.io'\nopenssl x509 -req -in client.csr -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out client-cert.pem -days 365\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflomesh-io%2Fpipy-mqtt-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflomesh-io%2Fpipy-mqtt-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflomesh-io%2Fpipy-mqtt-proxy/lists"}