{"id":23092636,"url":"https://github.com/kjdev/zlmb","last_synced_at":"2026-02-11T10:31:15.631Z","repository":{"id":6753404,"uuid":"7999875","full_name":"kjdev/zlmb","owner":"kjdev","description":"ZeroMQ-based Log Message broker","archived":false,"fork":false,"pushed_at":"2013-05-29T04:11:07.000Z","size":296,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-01T01:39:18.526Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kjdev.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":"2013-02-04T02:32:28.000Z","updated_at":"2014-05-16T13:13:46.000Z","dependencies_parsed_at":"2022-09-17T06:41:30.539Z","dependency_job_id":null,"html_url":"https://github.com/kjdev/zlmb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kjdev/zlmb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fzlmb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fzlmb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fzlmb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fzlmb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjdev","download_url":"https://codeload.github.com/kjdev/zlmb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fzlmb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-12-16T21:35:30.895Z","updated_at":"2026-02-11T10:31:15.614Z","avatar_url":"https://github.com/kjdev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zlmb\n\nZeroMQ-based Log Message broker\n\n## Structure\n\n![Structure](etc/structure.png)\n\n## ZeroMQ socket type and connection\n\n![ZeroMQ](etc/zeromq.png)\n\n## Build\n\nrequired.\n\n* [cmake](http://www.cmake.org)\n* [ZeroMQ](http://zeromq.org) (\u003e= 3.2)\n* [libyaml](http://pyyaml.org)\n* [snappy](http://code.google.com/p/snappy) (optional)\n\n```\n% cmake .\n% make\n% make install\n```\n\n## Application\n\n command     | description\n -------     | -----------\n zlmb-server | server application\n\n### command option\n\n name                      | description\n ----                      | -----------\n mode                      | execute mode\n client\\_frontendpoint     | client fronend endpoint\n client\\_backendpoints     | client backend endpoints\n client\\_dumpfile          | client error file\n client\\_dumptype          | client error type\n publish\\_frontendpoint    | publish frontend point\n publish\\_backendpoint     | publish backendend point\n publish\\_key              | publish key string\n publish\\_sendkey          | enable sending publish key\n subscribe\\_frontendpoints | subscribe frontend points\n subscribe\\_backendpoint   | subscribe backendend point\n subscribe\\_key            | subscribe key string\n subscribe\\_dropkey        | enable dropped subscribe key\n subscribe\\_dumpfile       | subscribe error file\n subscribe\\_dumptype       | subscribe error type\n config                    | config file path\n info                      | application information\n syslog                    | log to syslog\n verbose                   | verbosity log\n help                      | help\n\n### execute mode\n\n* client\n\n  receive messages in a specified value of a client\\_frontendpoint.\n  send a message to the specified value of the client\\_backendpoints.\n  (More than one can be specified)\n  client\\_dumpfile tries to send the message that if you can not connect the\n  client\\_backendpoints outputs.\n\n  *Usage*\n\n  ```\n  % zlmb-server --mode client --client_frontendpoint tcp://127.0.0.1:5557 --client_backendpoints tcp://127.0.0.1:5558,tcp://127.0.0.1:6668\n  ```\n\n  *Assumptions used*\n\n  Daemon to run on the same server and client applications.\n\n* publish\n\n  receive messages in a specified value of a publish\\_frontendpoint.\n  send a message to the specified value of the publish\\_backendpoint.\n  sends the publish key to the first frame when it is defined the\n  publish\\_sendkey.\n  publish key that is sent is specified by the publish\\_key.\n  (the default value is empty)\n  messages that have been received from the other if there is no connection for\n  the publish\\_backendpoint are discarded.\n\n  *Usage*\n\n  ```\n  % zlmb-server --mode publish --publish_frontendpoint tcp://127.0.0.1:5558 --publish_backendpoint tcp://127.0.0.1:5559 (--publish_key test --publish_sendkey)\n  ```\n\n  *Assumptions used*\n\n  Distributed to the server that distributes the message from the client server\n  to handle.\n\n* subscribe\n\n  receive messages in a specified value of a subscribe\\_frontendpoints.\n  (More than one can be specified)\n  send a message to the specified value of the subscribe\\_backendpoint.\n  subscribe\\_dumpfile tries to send the message that if you can not connect the\n  subscribe\\_backendpoints outputs.\n  subscribe key that is receive is specified by the subscribe\\_key.\n  (the default value is empty)\n  not send backendpoint the first frame received is defined if you\n  subscribe\\_dropkey.\n\n  *Usage*\n\n  ```\n  % zlmb-server --mode subscribe --subscribe_frontendpoints tcp://127.0.0.1:5559,tcp://127.0.0.1:6669 --subscribe_backendpoint tcp://127.0.0.1:5560 (--subscribe_key test --subscribe_dropkey)\n  ```\n\n  *Assumptions used*\n\n  Send me worker program for the received message.\n\n* client-publish\n\n  run a server that has the function of publish and client.\n\n  *Usage*\n\n  ```\n  % zlmb-server --mode client-publish --client_frontendpoint tcp://127.0.0.1:5557 --publish_backendpoint tcp://127.0.0.1:5559 (--publish_key test --publish_dropkey)\n  ```\n\n* publish-subscribe\n\n  run a server that has the function of publish and subscribe.\n\n  *Usage*\n\n  ```\n  % zlmb-server --mode publish-subscribe --publish_frontendpoint tcp://127.0.0.1:5558 --subscribe_backendpoint tcp://127.0.0.1:5560\n  ```\n\n* client-subscribe\n\n  run a server that has the function of client and subscribe.\n\n  *Usage*\n\n  ```\n  % zlmb-server --mode client-subscribe --client_frontendpoint tcp://127.0.0.1:5557 --client_backendpoints tcp://127.0.0.1:5558 --subscribe_frontendpoint tcp://127.0.0.1:5559 --subscribe_backendpoint tcp://127.0.0.1:5560 (--subscribe_key test --subscribe_dropkey)\n  ```\n\n* stand-alone\n\n  run a server that has the function of client, publish and subscribe.\n\n  *Usage*\n\n  ```\n  zlmb-server --mode stand-alone --client_frontendpoint tcp://127.0.0.1:5557 --subscribe_backendpoint tcp://127.0.0.1:5560\n  ```\n\n### config\n\nYou can also read from a file format that is specified in the config yaml\nconfiguration options.\n\nBest options that you specified earlier in the option argument is used on a\npriority basis.\n\n*Usage*\n\n```\n% zlmb-server --mode client --config config.yml\n```\n\nConfiguration file, see [config.yml](etc/config.yml).\n\n### syslog\n\nIf the syslog option is set, a log message is output via syslog.\n\n### compress\n\nIf I were to take effect (snappy) compress option at compile time,\nto compress the message at the time sent from the client to publish\nmessage will be thawed in time to be sent to the worker from subscribe.\n(cmake -DUSE_SNAPPY=ON)\n\n## Extend Application\n\n command     | description\n -------     | -----------\n zlmb-cli    | client application\n zlmb-dump   | dump message application\n zlmb-worker | worker server\n\n### zlmb-cli\n\nsend a message to zlmb-server from the command line.\n\n#### command line\n\nzlmb-cli [-e ENDPOINT] [-f FILE] [-m NUM] [ARGS ...]\n\n name          | description\n ----          | -----------\n endpoint (e)  | connect server endpoint (DEFAULT: tcp://127.0.0.1:5557)\n filename (f)  | input file name or 'stdin'\n multipart (m) | send multi-part message size\n\n#### usage\n\n1. send to 'test' and 'message'.\n\n   ```\n   % zlmb-cli -e tcp://127.0.0.1:5557 test message\n   ```\n\n   ![cli-fig1](etc/cli-fig1.png)\n\n2. send to 2 part message.\n\n   ```\n   % zlmb-cli -e tcp://127.0.0.1:5557 -m 2 test message\n   ```\n\n   ![cli-fig2](etc/cli-fig2.png)\n\n3. send to file (filename: test.txt).\n\n   send one line at a time.\n\n   ```\n   % zlmb-cli -e tcp://127.0.0.1:5557 -f test.txt\n   ```\n\n   ![cli-fig3](etc/cli-fig3.png)\n\n4. send to stdin.\n\n   ```\n   % echo 'message' | zlmb-cli -e tcp://127.0.0.1:5557 -f stdin\n   ```\n\n   ![cli-fig4](etc/cli-fig4.png)\n\n5. send to stdin and multi part.\n\n   ```\n   % echo 'message' | zlmb-cli -e tcp://127.0.0.1:5557 -f stdin -m 2 tag\n   ```\n\n   ![cli-fig5](etc/cli-fig5.png)\n\n   ```\n   % cat test.txt | zlmb-cli -e tcp://127.0.0.1:5557 -f stdin -m 2 tag\n   ```\n\n   ![cli-fig6](etc/cli-fig6.png)\n\n### zlmb-dump\n\nReprocess messages that have been output by the dumpfile(dumptype:binary) of\nzlmb-server.\nProcessing can be performed or retransmission of the message.\nPlease note that from being truncated is read dumpfile.\n\n#### command line\n\nzlmb-dump [-e ENDPOINT] [-c] FILE\n\n name          | description\n ----          | -----------\n endpoint (e)  | send server endpoint\n continue (c)  | continue end of file\n\n#### usage\n\n```\n% zlmb-dump /tmp/zlmb-client-dump.dat\n% zlmb-dump -e tcp://127.0.0.1:5557 /tmp/zlmb-client-dump.dat\n```\n\n### zlmb-worker\n\nBecause you will need to restart the program itself as well each time you\nupdate the processing for messages that are received by the above-mentioned\ncases of Worker, Worker server becomes a simple program to call the CGI.\n\n#### command option\n\nzlmb-worker [-e ENDPOINT] [-c COMMAND] [-t NUM] [ARGS ...]\n\n name         | description\n ----         | -----------\n endpoint (e) | server endpoint\n command (c)  | command path\n thread (t)   | command thread count (DEFAULT: 1)\n\n#### usage\n\n```\n% zlmb-worker --endpoint tcp://127.0.0.1:5560 -c path/to/exec -t 3\n```\n\nInput information to the worker program, the environment variable is done by\nstandard input.\n\nWorker program (path/to/exec) is executed the message was received.\n\nWorker programs (path/to/exec) can be run a few minutes maximum thread count.\n\n![worker](etc/worker.png)\n\n#### environment variables\n\n* ZLMB\\_FRAME: The number of frames received on ZeroMQ\n* ZLMB\\_FRAME\\_LENGTH: The length of each frame ZeroMQ (separator \":\")\n* ZLMB\\_LENGTH: The length of the message received by the ZeroMQ (Total of ZLMB\\_FRAME\\_LENGTH)\n\n#### standard input\n\nMessage received by the ZeroMQ\n\n## Examples\n\n### client\n\nClient program sends a message to connect to the client\\_frontendpoint.\n\n* [C](src/exp_client.c)\n* [PHP](src/exp_client.php)\n* [Python](src/exp_client.py)\n* [Ruby](src/exp_client.rb)\n\n### worker\n\nWorker program to receive messages connected to subscribe\\_backendpoint,\ndo any processing.\n\n* [C](src/exp_worker.c)\n* [PHP](src/exp_worker.php)\n* [Python](src/exp_worker.py)\n* [Ruby](src/exp_worker.rb)\n\n### worker exec\n\nExample of worker program to start at zlmb-worker.\n\n* [C](src/exp_worker_exec.c)\n* [PHP](src/exp_worker_exec.php)\n* [Python](src/exp_worker_exec.py)\n* [Ruby](src/exp_worker_exec.rb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjdev%2Fzlmb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjdev%2Fzlmb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjdev%2Fzlmb/lists"}