{"id":15067758,"url":"https://github.com/yasminteles/catmq","last_synced_at":"2026-01-03T11:31:41.493Z","repository":{"id":57635924,"uuid":"423967598","full_name":"YasminTeles/CatMQ","owner":"YasminTeles","description":"CatMQ is a queue server.","archived":false,"fork":false,"pushed_at":"2021-11-12T17:44:03.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T05:44:37.707Z","etag":null,"topics":["golang","socket-server"],"latest_commit_sha":null,"homepage":"","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/YasminTeles.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","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":"2021-11-02T19:08:08.000Z","updated_at":"2025-02-09T11:14:01.000Z","dependencies_parsed_at":"2022-09-26T20:21:37.010Z","dependency_job_id":null,"html_url":"https://github.com/YasminTeles/CatMQ","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YasminTeles%2FCatMQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YasminTeles%2FCatMQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YasminTeles%2FCatMQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YasminTeles%2FCatMQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YasminTeles","download_url":"https://codeload.github.com/YasminTeles/CatMQ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354850,"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":["golang","socket-server"],"created_at":"2024-09-25T01:27:14.581Z","updated_at":"2026-01-03T11:31:41.430Z","avatar_url":"https://github.com/YasminTeles.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CatMQ\n\nCatMQ is a queue server that allows offline data processing.\nThe main purpose of this server is to analyze text snippets and reject those that have offensive terms.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purpose.\n\nThere are two ways to get started:\n\u003cdetails\u003e\n\u003csummary\u003eGet started with local Golang;\u003c/summary\u003e\n\n### Prerequisites\n\n- [Golang](https://golang.org/) - Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. You need the version 1.17.\n\n### Installation\n\n1. Clone this repository;\n\n2. Run the following commands:\n\n```Makefile\ncd new-server\nmake setup\nmake run\n```\n\n### Running tests\n\n1. Run the server\n```Makefile\nmake run\n```\n\n2. In another terminal, run the tests:\n\n```Makefile\nmake test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGet started with Docker;\u003c/summary\u003e\n### Prerequisites\n\n- [Docker](https://www.docker.com/) - is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.\n\n### Installation\n\n1. Clone this repository;\n\n2. Run the following commands:\n\n```Makefile\ncd new-server\nmake docker-build\nmake docker-run\n```\n\n4. For kill container's Docker, run the following command:\n\n```Makefile\nmake docker-kill\n```\n\n\u003c/details\u003e\n\n## How it works?\n\n### Server\n\nThe server receives TCP connections on port `23023` and follows a message sending and replying protocol.\nClient connections remain open until the client process is closed.\nMessages sent to and from the server are messages ending in `'\\n'` with the format specified in Protocol.\n\n### Protocol\n\n#### Publish\n\nTo send a message to the queue (publish), the client must send to the server the following message:\n\n`{\"operation\":\"PUT\",\"data\":\"\u003csome data\u003e\"}\\n`\n\nThe server responds with:\n\n`{\"operation\":\"OK\",\"data\":\"\"}\\n`\n\nIn case of error, the server should respond:\n\n`{\"operation\":\"ERR\",\"data\":\"Operation failed!\"}\\n`\n\n#### Get\n\nTo receive a message from the queue, the client must send the following message to the server:\n\n`{\"operation\":\"GET\",\"data\":\"\"}\\n`\n\nIf there is any message in the queue, the server responds with:\n\n`{\"operation\":\"MSG\",\"data\":\"\u003csome data\u003e\"}\\n`\n\nIf the queue is empty, the server responds with:\n\n`{\"operation\":\"EMP\",\"data\":\"\"}\\n`\n\nIn case of error, the server should respond:\n\n`{\"operation\":\"ERR\",\"data\":\"Operation failed!\"}\\n`\n\n### Client\n\nThe client library must have a Client class that receives the host and server port and have the following methods:\n\n#### Connect\n\nConnects to the server and leaves a socket open with the server.\n\n#### Disconnect\n\nCloses the socket opened with the server. Does nothing if the connection already\nit's closed.\n\n#### Publish\n\nSends a message to the queue. This method takes the message to be sent as an argument.\n\n#### Get\n\nRead a message from the queue. If the server responds with EMP, it returns null (no error).\n\n## Versions\n\nWe use [Semantic version](http://semver.org) for versioning. For versions available, see [changelog](Changelog.md).\n\n## Contribute Us\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create.\nAny contributions you make are greatly appreciated. See [contribute policy](Contribute.md).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasminteles%2Fcatmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyasminteles%2Fcatmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasminteles%2Fcatmq/lists"}