{"id":16815700,"url":"https://github.com/robatron/msgq","last_synced_at":"2025-06-20T16:33:58.455Z","repository":{"id":1170433,"uuid":"1064112","full_name":"robatron/MsgQ","owner":"robatron","description":"A simple \"message queue\" web-based utility.","archived":false,"fork":false,"pushed_at":"2012-07-01T00:00:04.000Z","size":131,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T22:18:00.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://robmd.net:8080","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robatron.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":"2010-11-09T04:51:55.000Z","updated_at":"2013-10-21T10:58:17.000Z","dependencies_parsed_at":"2022-08-16T12:25:12.814Z","dependency_job_id":null,"html_url":"https://github.com/robatron/MsgQ","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatron%2FMsgQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatron%2FMsgQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatron%2FMsgQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robatron%2FMsgQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robatron","download_url":"https://codeload.github.com/robatron/MsgQ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244033243,"owners_count":20386896,"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":[],"created_at":"2024-10-13T10:35:13.428Z","updated_at":"2025-03-17T12:29:15.833Z","avatar_url":"https://github.com/robatron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MsgQ\n\nMsgQ is short for \"Message Queue\". It is a simple, web-based utility that allows one to push and pop messages off of a queue. There is also an optional blocking mechanism that allows the server to act \"busy\" while waiting for a message. This is handy for (almost) instant server-to-client communication.\n\nThis is based on the idea of the [messenger component](http://trac.osuosl.org/git/?p=touchscreen.git;a=blob_plain;f=core/messenger.tac;hb=c60491d32feb22ade5aa6abc6bbf925c12c3f427) of the [Touchscreen project](http://trac.osuosl.org/trac/touchscreen).\n\n## Installation\n\nFirst, `cd` into a directory of your choice, and download the MsgQ source\n\n\tcd /path/to/installation/directory\n    git clone git://github.com/robatron/MsgQ.git\n\n`cd` into the MsgQ directory, and copy the distributed config file to a working config file\n\n    cd MsgQ\n\tcp msgq-serv.config.dist msgq-serv.config\n\nInstall Python and CherryPy. If you're on Ubuntu (like me), you should be able to install both with the following:\n\n    sudo apt-get install python-cherypy3\n\nDependencies:\n\n - Python \u003e= v2.6.5\n - CherryPy \u003e= v3.1.2\n\n## Server-side setup\n\nTo start MsgQ, just run \n\n    python msgq-serv.py\n\n## Client-side usage\n\nHere are some example uses for MsgQ on the client side:\n\n### Push\n\nTo push a message onto a queue, first specify the `queue`, and set `msg` to your message. In the following example, we're pushing a message \"O HAI!!\" onto the queue \"fooQ\":\n\n    http://localhost:8080/push?queue=fooQ\u0026msg=O HAI!!\n\nIf the queue does not exist, it will be created. If the message is not set, or some other error occurs, the error will be returned. If everything went well, a '0' will be returned.\n\n### Pop\n\nTo pop a message off of a queue, you only need to specify the `queue`. In the following example, we're popping a message of the \"fooQ\" queue:\n\n    http://localhost:8080/pop?queue=fooQ\n\nThe top message on the specified queue will be returned. Trying to pop a message off of an empty queue will result in a \"{{empty queue}}\" being returned.\n\nOptionally, you can make MsgQ wait for a message to be placed on the queue. This will cause MsgQ to look \"busy\" to the client while it waits. This is handy for (almost) instant server-to-client communication. Make MsgQ wait by setting the `wait` parameter to the number of milliseconds the queue should wait before it times out, and reports \"{{empty queue}}\". \n\nIn the following example, MsgQ will wait for 5 seconds:\n\n    http://localhost:8080/pop?queue=fooQ\u0026wait=5000\n\nIf a message gets placed on the queue while it's waiting, MsgQ will return with it right away. If no message gets placed on the queue before the wait time is up, it will return with an \"{{empty queue}}\".\n\n**Note:** Setting `wait` to a negative number will result in it waiting indefinitely.\n\n### Demo\n\nYou can try an [interactive demo](http://robmd.net:8080), or you can try the demo on your own installation by starting the server and going to `/demo`\n\n    http://localhost:8080/demo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobatron%2Fmsgq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobatron%2Fmsgq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobatron%2Fmsgq/lists"}