{"id":13677303,"url":"https://github.com/sysulq/httpmq","last_synced_at":"2025-05-16T05:04:40.380Z","repository":{"id":22030576,"uuid":"25358696","full_name":"sysulq/httpmq","owner":"sysulq","description":"A simple HTTP message queue written in Go with goleveldb, just like httpsqs written in C with Tokyo Cabinet.","archived":false,"fork":false,"pushed_at":"2024-11-04T02:40:19.000Z","size":1203,"stargazers_count":319,"open_issues_count":2,"forks_count":86,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-04-29T11:39:04.942Z","etag":null,"topics":["fasthttp","go","goleveldb","httpsqs","message-queue"],"latest_commit_sha":null,"homepage":"http://hnlq715.github.io/httpmq/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysulq.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,"publiccode":null,"codemeta":null}},"created_at":"2014-10-17T13:11:23.000Z","updated_at":"2025-01-27T00:08:38.000Z","dependencies_parsed_at":"2024-08-02T13:15:31.694Z","dependency_job_id":"75c8a0cd-5ea2-43fe-937a-223d20977cfb","html_url":"https://github.com/sysulq/httpmq","commit_stats":null,"previous_names":["sysulq/httpmq","hnlq715/httpmq"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Fhttpmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Fhttpmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Fhttpmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysulq%2Fhttpmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysulq","download_url":"https://codeload.github.com/sysulq/httpmq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"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":["fasthttp","go","goleveldb","httpsqs","message-queue"],"created_at":"2024-08-02T13:00:40.183Z","updated_at":"2025-05-16T05:04:40.356Z","avatar_url":"https://github.com/sysulq.png","language":"Go","funding_links":[],"categories":["Message brokers","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"httpmq\n======\n[![Build Status](https://travis-ci.org/sysulq/httpmq.svg?branch=master)](https://travis-ci.org/sysulq/httpmq)\n[![Docker Pulls](https://img.shields.io/docker/pulls/sophos/httpmq.svg)](https://hub.docker.com/r/sophos/httpmq/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sysulq/httpmq)](https://goreportcard.com/report/github.com/sysulq/httpmq)\n\n\u003e httpmq is powered by [Kod](https://github.com/go-kod/kod), which is a dependency injection framework for Go.  \n\u003e It is designed to be simple and easy to use, and to provide a consistent way to manage dependencies across your application.\n\nHttpmq is a simple HTTP message queue written in Go with goleveldb, just like httpsqs wriiten in C with Tokyo Cabinet.\n\nAlso, you can refer to [github.com/sysulq/httpmq-rs#benchmark](https://github.com/sysulq/httpmq-rs#benchmark) for the benchmark of **Rust** implementation.\n\nFeature\n======\n\n* Very simple, less than 300 lines Go code.\n* Very fast, more than 10000 requests/sec.\n* High concurrency, support the tens of thousands of concurrent connections.\n* Multiple queue.\n* Low memory consumption, mass data storage, storage dozens of GB of data takes less than 100MB of physical memory buffer.\n* Convenient to change the maximum queue length of per-queue.\n* Queue status view.\n* Be able to view the contents of the specified queue ID.\n* Multi-Character encoding support.\n\nUsage\n======\nDocker\n```\n  docker run -d -it -p 1218:1218 sophos/httpmq\n```\n\nBinary\n  ```\nUsage of ./httpmq:\n  -auth string\n    \tauth password to access httpmq\n  -buffer int\n    \twrite buffer(MB) (default 32)\n  -cache int\n    \tcache size(MB) (default 64)\n  -cpu int\n    \tcpu number for httpmq (default 4)\n  -db string\n    \tdatabase path (default \"level.db\")\n  -ip string\n    \tip address to listen on (default \"0.0.0.0\")\n  -k int\n    \tkeepalive timeout for httpmq (default 60)\n  -maxqueue int\n    \tthe max queue length (default 1000000)\n  -port string\n    \tport to listen on (default \"1218\")\n  ```\n\n1. PUT text message into a queue\n\n  HTTP GET protocol (Using curl for example):\n  ```\n  curl \"http://host:port/?name=your_queue_name\u0026opt=put\u0026data=url_encoded_text_message\u0026auth=mypass123\"\n  ```\n  HTTP POST protocol (Using curl for example):\n  ```\n  curl -d \"url_encoded_text_message\" \"http://host:port/?name=your_queue_name\u0026opt=put\u0026auth=mypass123\"\n  ```\n\n2. GET text message from a queue\n\n  HTTP GET protocol (Using curl for example):\n  ```\n  curl \"http://host:port/?charset=utf-8\u0026name=your_queue_name\u0026opt=get\u0026auth=mypass123\"\n  ```\n\n3. View queue status\n\n  HTTP GET protocol (Using curl for example):\n  ```\n  curl \"http://host:port/?name=your_queue_name\u0026opt=status\u0026auth=mypass123\"\n  ```\n4. View queue details\n\n  HTTP GET protocol (Using curl for example):\n  ```\n  curl \"http://host:port/?name=your_queue_name\u0026opt=view\u0026pos=1\u0026auth=mypass123\"\n  ```\n5. Reset queue\n\n  HTTP GET protocol (Using curl for example):\n  ```\n  curl \"http://host:port/?name=your_queue_name\u0026opt=reset\u0026pos=1\u0026auth=mypass123\"\n  ```\n\nBenchmark\n========\n\nTest machine(Hackintosh):\n\n```text\n                    'c.          \n                 ,xNMM.          ----------------------- \n               .OMMMMo           OS: macOS 11.6.1 20G224 x86_64 \n               OMMM0,            Host: Hackintosh (SMBIOS: iMac20,1) \n     .;loddo:' loolloddol;.      Kernel: 20.6.0 \n   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 13 hours, 16 mins \n .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 45 (brew) \n XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8 \n;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080@2x \n:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua \n.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor \n kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark) \n .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: vscode \n  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Intel i5-10600K (12) @ 4.10GHz \n    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Radeon Pro W5500X \n     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 17549MiB / 32768MiB \n       .cooc,.    .,coo:.\n```\n\nfasthttp\n--------\n### PUT queue:\n\n```bash\nwrk -c 10 -t 2 -d 10s \"http://127.0.0.1:1218/?name=xoyo\u0026opt=put\u0026data=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\nRunning 10s test @ http://127.0.0.1:1218/?name=xoyo\u0026opt=put\u0026data=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n  2 threads and 10 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency   211.87us  169.58us   4.97ms   98.28%\n    Req/Sec    24.36k     2.23k   27.87k    64.36%\n  489524 requests in 10.10s, 82.64MB read\nRequests/sec:  48459.16\nTransfer/sec:      8.18MB\n```\n\n### GET queue:\n\n```bash\nwrk -c 10 -t 2 -d 10s \"http://127.0.0.1:1218/?name=xoyo\u0026opt=get\"\nRunning 10s test @ http://127.0.0.1:1218/?name=xoyo\u0026opt=get\n  2 threads and 10 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency   218.26us  251.84us  11.56ms   99.22%\n    Req/Sec    23.37k     1.06k   24.70k    90.59%\n  469685 requests in 10.10s, 303.14MB read\nRequests/sec:  46504.02\nTransfer/sec:     30.01MB\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysulq%2Fhttpmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysulq%2Fhttpmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysulq%2Fhttpmq/lists"}