{"id":39208543,"url":"https://github.com/jakoblorz/brokerutil","last_synced_at":"2026-01-17T23:01:36.586Z","repository":{"id":57552666,"uuid":"134823410","full_name":"jakoblorz/brokerutil","owner":"jakoblorz","description":"brokerutil provides a common interface to message-brokers for pub-sub applications","archived":false,"fork":false,"pushed_at":"2018-06-10T09:12:00.000Z","size":366,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-15T06:03:47.500Z","etag":null,"topics":["golang","message-queue","messaging","networking","pubsub","realtime-messaging","redis"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/jakoblorz/brokerutil","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/jakoblorz.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":"2018-05-25T07:58:27.000Z","updated_at":"2018-06-10T09:00:33.000Z","dependencies_parsed_at":"2022-08-27T10:11:27.151Z","dependency_job_id":null,"html_url":"https://github.com/jakoblorz/brokerutil","commit_stats":null,"previous_names":["jakoblorz/singapoor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jakoblorz/brokerutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fbrokerutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fbrokerutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fbrokerutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fbrokerutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakoblorz","download_url":"https://codeload.github.com/jakoblorz/brokerutil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakoblorz%2Fbrokerutil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28521301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["golang","message-queue","messaging","networking","pubsub","realtime-messaging","redis"],"created_at":"2026-01-17T23:01:36.498Z","updated_at":"2026-01-17T23:01:36.572Z","avatar_url":"https://github.com/jakoblorz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [brokerutil](https://github.com/jakoblorz/brokerutil)\nbrokerutil provides a common interface to message-brokers for pub-sub applications.\n\n[![GoDoc](https://godoc.org/github.com/jakoblorz/brokerutil?status.svg)](https://godoc.org/github.com/jakoblorz/brokerutil)\n[![Build Status](https://travis-ci.com/jakoblorz/brokerutil.svg?branch=master)](https://travis-ci.com/jakoblorz/brokerutil)\n[![codecov](https://codecov.io/gh/jakoblorz/brokerutil/branch/master/graph/badge.svg)](https://codecov.io/gh/jakoblorz/brokerutil)\n\nUse brokerutil to be able to build pub-sub applications which feature interopability with message-brokers drivers.\nbrokerutil provides a abstract and extendible interface which enables developers to switch or mix\nmessage brokers without having to rewrite major parts of the applications\npub-sub logic.\n\n## Features\n- sync / async subscription\n- multi-driver support - subscribe to messages from multiple brokers\n- simple yet extendible pub sub interface\n- simple driver interface to implement own drivers\n\n### Preinstalled Drivers\n- loopback\n- [redis](https://redis.io/) based on [github.com/go-redis/redis](http://github.com/go-redis/redis)\n- [kafka](https://kafka.apache.org/) (soon [#1](https://github.com/jakoblorz/brokerutil/pull/1)) based on [github.com/Shopify/sarama](https://github.com/Shopify/sarama)\n\n## Installation\n\n`go get github.com/jakoblorz/brokerutil`\n\nUse the package drivers or implement your own.\n\n## Example\nThis example will use redis as message-broker. It uses the package redis driver which\nextends on the [github.com/go-redis/redis](http://github.com/go-redis/redis) driver.\n\n```go\npackage main\n\nimport (\n    \"flag\"\n\n    \"github.com/jakoblorz/brokerutil\"\n    \"github.com/jakoblorz/brokerutil/redis\"\n    r \"github.com/go-redis/redis\"\n)\n\nvar (\n    raddr   = flag.String(\"raddr\", \":6379\", \"redis address to connect to\")\n    channel = flag.String(\"channel\", \"brokerutil\", \"redis message channel\")\n)\n\nfunc main() {\n    flag.Parse()\n\n    // create redis driver to support pub-sub\n    driver, err := redis.NewRedisPubSubDriver([]string{*channel}, \u0026r.Options{\n        Addr: *raddr,\n    })\n\n    if err != nil {\n        log.Fatalf(\"could not create redis driver: %v\", err)\n    }\n\n    // create new pub sub using the initialized redis driver\n    ps, err := brokerutil.NewPubSubFromDriver(driver)\n    if err != nil {\n        log.Fatalf(\"could not create pub sub: %v\", err)\n    }\n\n    // run blocking subscribe as go routine\n    go ps.SubscribeSync(func(msg interface{}) error {\n        fmt.Printf(\"%v\", msg)\n\n        return nil\n    })\n\n    // start controller routine which blocks execution\n    if err := ps.ListenSync(); err != nil {\n        log.Fatalf(\"could not listen: %v\", err)\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakoblorz%2Fbrokerutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakoblorz%2Fbrokerutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakoblorz%2Fbrokerutil/lists"}