{"id":13623850,"url":"https://github.com/zeromq/lzmq","last_synced_at":"2025-08-21T18:33:05.932Z","repository":{"id":4270393,"uuid":"5398158","full_name":"zeromq/lzmq","owner":"zeromq","description":"Lua binding to ZeroMQ","archived":false,"fork":false,"pushed_at":"2020-07-20T18:34:06.000Z","size":661,"stargazers_count":137,"open_issues_count":11,"forks_count":46,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-12-07T07:11:47.293Z","etag":null,"topics":["ffi","lua","lua-bindings","messaging","zeromq","zmq"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/zeromq.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}},"created_at":"2012-08-13T11:29:53.000Z","updated_at":"2024-11-06T22:12:04.000Z","dependencies_parsed_at":"2022-08-06T16:00:13.341Z","dependency_job_id":null,"html_url":"https://github.com/zeromq/lzmq","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromq%2Flzmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromq%2Flzmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromq%2Flzmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromq%2Flzmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeromq","download_url":"https://codeload.github.com/zeromq/lzmq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230527866,"owners_count":18240051,"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":["ffi","lua","lua-bindings","messaging","zeromq","zmq"],"created_at":"2024-08-01T21:01:36.365Z","updated_at":"2024-12-20T03:09:21.080Z","avatar_url":"https://github.com/zeromq.png","language":"Lua","readme":"# Lua binding to [ZeroMQ](http://zeromq.org) library.\n\n[![Build Status](https://travis-ci.org/zeromq/lzmq.png?branch=master)](https://travis-ci.org/zeromq/lzmq)\n[![Coverage Status](https://coveralls.io/repos/zeromq/lzmq/badge.png?branch=master)](https://coveralls.io/r/zeromq/lzmq?branch=master)\n[![Licence](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENCE.txt)\n\nSupport ZeroMQ version 3.2.x/4.x\u003cbr/\u003e\nThis library is not dropin replacement for [lua-zmq](https://github.com/Neopallium/lua-zmq) library.\u003cbr/\u003e\nThis library has C and FFI version of binding.\n\n## Source Code\nhttps://github.com/zeromq/lzmq\n\n## Install\nIf you plan use `lzmq.threads` module then you should also install [llthreads2](https://github.com/moteus/lua-llthreads2)\u003cbr/\u003e\n\n* Using *LuaRocks*:\u003cbr/\u003e\n`luarocks install lua-llthreads2` or `luarocks install lua-llthreads2-compat`\u003cbr/\u003e\n`luarocks install lzmq` or install only ffi version `luarocks install lzmq-ffi`\u003cbr/\u003e\n\n* Using *LuaDist*:\u003cbr/\u003e\n`luadist install lua-llthreads2` or `luadist install lua-llthreads2-compat`\u003cbr/\u003e\n`luadist install lzmq` or `luadist install lzmq-ffi`\u003cbr/\u003e\n\n## API\nThis is short [API](http://moteus.github.io/lzmq/index.html) description.\u003cbr/\u003e\nSee also [exampes](https://github.com/moteus/lzmq-zguide) from [OMQ - The Guide](http://zguide.zeromq.org).\u003cbr/\u003e\n\n## Performance\nTo run same test you should copy original performance tests to `exampes/perf2/libzmq`\nand run `runner.lua` from `exampes/perf2`. For now it require LuaJIT and exists \nC and FFI version of `lzmq` library.\u003cbr/\u003e\nOf course you can run any test manually.\n\n### Inproc Throughput Test:\n\nmessage size: 30 [B]\u003cbr/\u003e\nmessage count: 10000\u003cbr/\u003e\nmean throughput [Mb/s]:\u003cbr/\u003e\n\n| # | libzmq     | str        | str(ffi)   | msg        | msg(ffi)   |\n|---|------------|------------|------------|------------|------------|\n| 1 |349.396     |307.141     |393.636     |186.162     |239.617     |\n| 2 |350.007     |310.398     |412.371     |188.132     |248.011     |\n| 3 |377.596     |311.284     |413.010     |205.076     |281.228     |\n| 4 |422.535     |308.206     |414.007     |174.406     |248.679     |\n| 5 |392.477     |311.324     |411.876     |181.722     |274.946     |\n| 6 |382.470     |309.917     |395.127     |177.528     |631.413     |\n| 7 |393.636     |324.851     |415.010     |186.437     |282.686     |\n| 8 |386.910     |303.298     |379.627     |116.919     |268.908     |\n| 9 |397.022     |311.931     |415.945     |187.749     |244.998     |\n| 10|438.196     |302.763     |412.229     |189.813     |255.646     |\n\n### Inproc Latency Test:\n\nmessage size: 1 [B]\u003cbr/\u003e\nmessage count: 10000\u003cbr/\u003e\naverage latency [us]:\u003cbr/\u003e\n\n| # | libzmq     | str        | str(ffi)   | msg        | msg(ffi)   |\n|---|------------|------------|------------|------------|------------|\n| 1 |97.356      |97.378      |98.221      |94.274      |96.880      |\n| 2 |95.828      |96.736      |95.957      |100.711     |96.992      |\n| 3 |99.656      |100.347     |95.672      |97.981      |95.312      |\n| 4 |96.649      |99.943      |94.543      |96.198      |94.674      |\n| 5 |96.013      |102.196     |94.184      |97.575      |94.990      |\n| 6 |96.371      |97.925      |98.377      |95.350      |97.165      |\n| 7 |96.253      |93.625      |97.198      |94.856      |94.544      |\n| 8 |95.155      |96.371      |94.904      |96.792      |95.507      |\n| 9 |94.703      |96.698      |96.924      |97.951      |95.527      |\n| 10|95.635      |97.946      |95.684      |96.429      |92.629      |\n\n----\n### Incompatibility list with lua-zmq (this is not full)\n\n|    Feature           |      lua-zmq           |        lzmq              |\n|----------------------|------------------------|--------------------------|\n|global zmq variable   | create                 | does not create          |\n|zmq.init              | io_threads optional    | io_threads require       |\n|create message        | zmq.zmq_msg_t.init_XXX | zmq.msg_init_XXX         |\n|message as string     | tostring(msg)          | msg:data()/tostring(msg) |\n|message as ud         | msg:data()             | msg:pointer()            |\n|msg:close();msg:data()| AV                     | lua error                |\n\n\n","funding_links":[],"categories":["Lua","资源","Resources","Networking"],"sub_categories":["Message Brokers","Message broker / queues"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeromq%2Flzmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeromq%2Flzmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeromq%2Flzmq/lists"}