{"id":21274034,"url":"https://github.com/flexrobotics/roboflex_transport_zmq","last_synced_at":"2026-01-21T09:33:39.478Z","repository":{"id":201796991,"uuid":"707418526","full_name":"flexrobotics/roboflex_transport_zmq","owner":"flexrobotics","description":"Roboflex transport nodes using ZeroMQ.","archived":false,"fork":false,"pushed_at":"2025-11-02T00:56:36.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T19:49:31.407Z","etag":null,"topics":["roboflex","zmq"],"latest_commit_sha":null,"homepage":"https://github.com/flexrobotics/roboflex_transport_zmq","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/flexrobotics.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,"zenodo":null}},"created_at":"2023-10-19T21:23:47.000Z","updated_at":"2025-11-02T00:56:40.000Z","dependencies_parsed_at":"2023-12-06T00:30:42.980Z","dependency_job_id":"08bbfc84-5b78-43ec-ab42-beea412cbfe9","html_url":"https://github.com/flexrobotics/roboflex_transport_zmq","commit_stats":null,"previous_names":["flexrobotics/roboflex_transport_zmq"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flexrobotics/roboflex_transport_zmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_zmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_zmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_zmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_zmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexrobotics","download_url":"https://codeload.github.com/flexrobotics/roboflex_transport_zmq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_zmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["roboflex","zmq"],"created_at":"2024-11-21T09:18:40.848Z","updated_at":"2026-01-21T09:33:39.453Z","avatar_url":"https://github.com/flexrobotics.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# roboflex.transport.zmq\n\nRoboflex support for the ZMQ transport.\n\n    any node -\u003e ZMQPublisher ==THEINTERNET==\u003e ZMQSubscriber -\u003e any node\n\nSee https://zeromq.org/ for details.\n\nUsing ZMQ, nodes can connect to other nodes, running in different threads, different processes, or different computers, with a publisher-subscriber pattern. roboflex.transport.zmq supports:\n\n    \"inproc\" transport -\u003e between threads within same process\n    \"ipc\" transport -\u003e between processes on same computer\n    \"tcp\" transport -\u003e between processes on different computers\n\n\n## System Dependencies\n\n    None! We build libzmq from source...\n\n## pip install\n\n    pip install roboflex.transport.zmq\n\n## Import (python)\n\n    import roboflex.transport.zmq as rtz\n\n## Build  (for c++ projects):\n\n    mkdir build \u0026\u0026 cd build\n    cmake ..\n    make\n    make install\n\n## Run Examples (see [examples](examples))\n\n    go to roboflex_transport_zmq/examples\n\n    ... create and activate some sort of virtual environment\n    where you installed roboflex.transport.zmq...\n\n    python pub_sub_0_py.py\n\n## Nodes:\n\nThere are three: `ZMQContext`, `ZMQPublisher`, `ZMQSubscriber`.\n\nTo use the ZMQ transport nodes, first you must create a ZMQContext object. This mirrors the design of ZMQ itself.\n\n    # all parameters optional\n    zmq_context = ZMQContext(\n        num_io_threads = 1,\n    )\n\nFirst, know this. \"bind addresses\" in this world can be three different things. All are strings, but can create different types of queues. These all implement one-to-many publish-subscribe pattern (in fact, it's actually many-to-many).\n\n    1. thread-to-thread only queues; \"inproc://somename\"; the fastest.\n    2. process-to-process (or thread-to-thread) queues; \"ipc://somename\"; sort of fast.\n    3. computer-to-computer (can work anywhere) queues (uses TCP): \"tcp://*:5647\"; the slowest, but works across the planet.\n\nThen, create a ZMQPublisher:\n\n    zmq_pub = ZMQPublisher(\n        # the ZMQContext object you created\n        zmq_context, \n\n        # what socket to bind to, or what transport to publish on\n        bind_address = \u003cbind address\u003e,\n        #    or\n        bind_addresses = [\u003cbind address\u003e],\n\n        # optional\n        \n        # name of the\n        name = \"ZMQPublisher\",\n\n        # same as 'high-water mark' in zeromq parlance\n        max_queued_msgs = 1000,\n    )\n\n    #... when a ZMQPublisher receives a message from some upstream node, #it will wire-serialize it, and publish on its transport.\n\n    #You can get the bind_addresses:\n\n    ba = zmq_pub.bind_addresses\n\n    # you can get the high-water mark\n    hm = zmq_pub.max_queued_msgs\n\n    # You can publish a message 'by hand' - same as calling 'receive' on the node.\n    zmq_pub.publish(some_message)\n\nThen, create one or more ZMQSubscribers, to listen to what you are publishing. ZMQSubscribes are the equivalent of 'sensors' in that the are root nodes, must be started, and start a thread.\n\n    zmq_sub = ZMQSubscriber(\n        # the ZMQContext object you created\n        zmq_context, \n\n        # what socket to bind to, or what transport to subscribe on\n        connect_address = \u003cbind address\u003e,\n        #    or\n        connect_addresses = [\u003cbind address\u003e],\n\n        # optional\n        \n        # name of the\n        name = \"ZMQPublisher\",\n\n        # same as 'high-water mark' in zeromq parlance\n        max_queued_msgs = 1000,\n\n        # how often to yield control on the thread\n        # You'll probably never change this.\n        timeout_milliseconds = 10,\n    )\n\n    # you get get values\n    zmq_sub.connect_addresses\n    zmq_sub.connect_address\n    zmq_sub.max_queued_msgs\n    zmq_sub.timeout_milliseconds\n\n    # you MUST start it!\n    zmq_sub.start()\n\n    # you may pull a message 'by hand':\n    msg_or_none = zmq_sub.pull(\n        10, # timeout_milliseconds - how long to wait for a message\n    )\n\n    # you may 'produce' messages 'by hand' - this will wait x milliseconds\n    # for one message, and if it has received one, signals it downstream\n    zmq_sub.produce(\n        10, # timeout_milliseconds\n    )\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexrobotics%2Froboflex_transport_zmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexrobotics%2Froboflex_transport_zmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexrobotics%2Froboflex_transport_zmq/lists"}