{"id":36440535,"url":"https://github.com/takashabe/go-pubsub","last_synced_at":"2026-01-11T21:56:05.475Z","repository":{"id":144204110,"uuid":"85472876","full_name":"takashabe/go-pubsub","owner":"takashabe","description":"It is a pubsub server that can be operated with the REST API.","archived":false,"fork":false,"pushed_at":"2018-08-18T11:44:49.000Z","size":274,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-18T04:57:35.024Z","etag":null,"topics":["go","golang","message-queue","pubsub"],"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/takashabe.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}},"created_at":"2017-03-19T12:05:49.000Z","updated_at":"2024-06-19T13:18:03.643Z","dependencies_parsed_at":null,"dependency_job_id":"85c1ab58-3fd7-4535-82da-ac60a68dc570","html_url":"https://github.com/takashabe/go-pubsub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/takashabe/go-pubsub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takashabe%2Fgo-pubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takashabe%2Fgo-pubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takashabe%2Fgo-pubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takashabe%2Fgo-pubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takashabe","download_url":"https://codeload.github.com/takashabe/go-pubsub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takashabe%2Fgo-pubsub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"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":["go","golang","message-queue","pubsub"],"created_at":"2026-01-11T21:56:04.906Z","updated_at":"2026-01-11T21:56:05.470Z","avatar_url":"https://github.com/takashabe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-pubsub\n\n[![GoDoc](https://godoc.org/github.com/takashabe/go-pubsub?status.svg)](https://godoc.org/github.com/takashabe/go-pubsub)\n[![CircleCI](https://circleci.com/gh/takashabe/go-pubsub.svg?style=shield)](https://circleci.com/gh/takashabe/go-pubsub)\n[![Go Report Card](https://goreportcard.com/badge/github.com/takashabe/go-pubsub)](https://goreportcard.com/report/github.com/takashabe/go-pubsub)\n\nProvide pubsub server and simple stats monitoring, available both by REST API.\n\nYou can select the background datastore of pubsub server one out of in  the `in-memory`, `mysql` and `redis`.\n\nIf you need pubsub client library, import `client` packages. Currently available client library is `Go` only.\n\n## Installation\n\n```\ngo get -u github.com/takashabe/go-pubsub/cmd/pubsub\n```\n\n## Usage\n\n### Start server\n\n```\nmake build # need once at first\ncmd/pubsub/pubsub\n```\n\nOptions:\n\n* file: Config file. require anything config file. (default \"config/app.yaml\")\n* port: Running port. require unused port. (default 8080)\n\n#### Config file format\n\nSyntax based on the `YAML`, require `datastore` element and it configration parameters. If empty the parameters of `datastore`, used `in-memory` datastore.\n\nExamples:\n\n```\n# MySQL\ndatastore:\n  mysql:\n    addr: \"localhost:3306\"\n    user: pubsub\n    password: \"\"\n\n# Redis\ndatastore:\n  redis:\n    addr: \"localhost:6379\"\n    db: 0\n\n# In-memory\ndatasotre:\n```\n\n## Components\n\n| Component    | Features                                                                                                                                                  |\n| ------       | ------                                                                                                                                                    |\n| Publisher    | * Message push to Topic                                                                                                                                   |\n| Topic        | * Recieve publish Message\u003cbr/\u003e * Save Message to datastor\u003cbr/\u003e * Transport Message to Subscription                                                        |\n| Datastore    | * Save and mutex Message\u003cbr/\u003e * Selectable backend storage                                                                                                |\n| Subscription | * Recieve Subscriber pull request\u003cbr/\u003e * Push Message to Subscriber                                                                                       |\n| Subscriber   | * Register some Subscription\u003cbr/\u003e* Pull message from Subscription\u003cbr/\u003e* Receive push Message from Subscription\u003cbr/\u003e * Return ack response to Subscription |\n\n## Message flow\n\n### Quickstart\n\n_When do not specify created component(topic, subscription), Default component used._\n\n1. Publish Message\n2. Pull Message\n3. Subscriber return ack response\n\n### Use specific Topic and Subscription\n\n1. Create Topic\n2. Create Subscription (optional: specify push endpoint)\n3. Publish Message to specific Topic\n4. Push or Pull Message from specific Subscription\n5. Subscriber retrun ack response\n\n## API\n\n### Topic\n\n| Method             | URL                                   | Behavior                                                                                       |\n| ------             | ------                                | -----                                                                                          |\n| create             | PUT:    `/topic/{name}`               | create topic                                                                                   |\n| delete             | DELETE: `/topic/{name}`               | delete topic                                                                                   |\n| get                | GET:    `/topic/{name}`               | get topic detail                                                                               |\n| list               | GET:    `/topic/`                     | get topic list                                                                                 |\n| list subscriptions | GET:    `/topic/{name}/subscriptions` | get toipc depends subscriptions                                                                |\n| publish            | POST:   `/topic/{name}/publish`       | create message\u003cbr/\u003esave message to backend storage and deliver message to depends subscription |\n\n### Subscription\n\n| Method             | URL                                        | Behavior                                                                                  |\n| ------             | ------                                     | -----                                                                                     |\n| ack                | POST:   `/subscription/{name}/ack`         | return ack response\u003cbr/\u003ewhen receive ack from all depended Subscriptions, delete message. |\n| create             | PUT:    `/subscription/{name}`             | create subscription                                                                       |\n| delete             | DELETE: `/subscription/{name}`             | delete subscription                                                                       |\n| get                | GET:    `/subscription/{name}`             | get subscription detail                                                                   |\n| pull               | POST:   `/subscription/{name}/pull`        | get message                                                                               |\n| modify ack config  | POST:   `/subscription/{name}/ack/modify`  | modify ack timeout                                                                        |\n| modify push config | POST:   `/subscription/{name}/push/modify` | modify push config                                                                        |\n| list               | GET:    `/subscription/`                   | get subscripction list                                                                    |\n\n### Monitoring\n\n| Method               | URL                               | Behavior                     |\n| ------               | ------                            | -----                        |\n| summary              | GET: `/stats`                     | pubsub metrics summary       |\n| topic summary        | GET: `/stats/topic`               | topic metrics summary        |\n| topic detail         | GET: `/stats/topic/{name}`        | topic metrics detail         |\n| subscription summary | GET: `/stats/subscription`        | subscription metrics summary |\n| subscription detail  | GET: `/stats/subscription/{name}` | subscription metrics detail  |\n\n## TODO\n\n* gRPC interface\n* improve stats items\n* authenticate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakashabe%2Fgo-pubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakashabe%2Fgo-pubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakashabe%2Fgo-pubsub/lists"}