{"id":19275068,"url":"https://github.com/danielepalaia/message-bus","last_synced_at":"2025-10-07T03:41:28.392Z","repository":{"id":131056407,"uuid":"104122196","full_name":"DanielePalaia/message-bus","owner":"DanielePalaia","description":"A generic multithreading message bus written in C++11","archived":false,"fork":false,"pushed_at":"2017-09-21T18:32:44.000Z","size":9,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T05:27:58.475Z","etag":null,"topics":["gtest","message-bus","multithreading"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielePalaia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-09-19T19:59:27.000Z","updated_at":"2025-02-14T13:08:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8bcac00-e468-4f30-8b56-c511779ca0fa","html_url":"https://github.com/DanielePalaia/message-bus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DanielePalaia/message-bus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielePalaia%2Fmessage-bus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielePalaia%2Fmessage-bus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielePalaia%2Fmessage-bus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielePalaia%2Fmessage-bus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielePalaia","download_url":"https://codeload.github.com/DanielePalaia/message-bus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielePalaia%2Fmessage-bus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717431,"owners_count":26033539,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gtest","message-bus","multithreading"],"created_at":"2024-11-09T20:48:11.077Z","updated_at":"2025-10-07T03:41:28.387Z","avatar_url":"https://github.com/DanielePalaia.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# message-bus\nA generic multithreading message bus written in C++11\n\nStill instable and not 100% complete, but a good starting point.\n\nThis is an implementation of a generic multithreading message-bus using the publish/subscribe deisgn pattern written using the new C++11 threading primitives and tested with google test and google mock.\n\nWe can imagine a set of modules (listeners) which want to communicate in an event-driven fashion. A module can subscribe itself to a topic and modules can dispatch events to a topic so that the ones subscribed will be notified.\n\nAn application which needs this functionality can use the eventbus.hpp and publish.hpp primitive (publish, subscribe, unsubscribe) and use the message bus functionality.\n\nEverything is completely generic using design C++ template so, a module subscribe using:\n\ntemplate \u003ctypename Event, class Listener\u003e\n  void subscribe(Listener* listener)\n  \nif the class Listener is overloading the operator () with the a specify Event or it can use:\n\ntemplate \u003ctypename Event, class Listener\u003e\n  void subscribe(Listener* listener, void (Listener::*method)(const Event\u0026)) \n  \nTo specify a method to be called in case of publishing to that Event.\n\nA module can then publish an event with the send (publish) function:\n  \ntemplate \u003ctypename Event\u003e\n  int sendSync(const Event\u0026 event)\n    \nwhere the typename Event is the topic and the Event in input is the event to publish (the method registerd would be called with the type Event.\n \n Or using threads can use, in this case the call will be asynchronous dispatched to a thread\n \n template \u003ctypename Event\u003e\n  int sendAsync(const Event\u0026 event)\n  \n See listeners.cpp for a mocking module example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielepalaia%2Fmessage-bus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielepalaia%2Fmessage-bus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielepalaia%2Fmessage-bus/lists"}