{"id":13729686,"url":"https://github.com/eXpl0it3r/PubBus","last_synced_at":"2025-05-08T02:30:38.070Z","repository":{"id":147290720,"uuid":"53966029","full_name":"eXpl0it3r/PubBus","owner":"eXpl0it3r","description":"A simple implementation of a MessageBus.","archived":false,"fork":false,"pushed_at":"2024-02-16T07:09:09.000Z","size":307,"stargazers_count":26,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T22:44:25.063Z","etag":null,"topics":["cpp","hacktoberfest","message","messagebus","publish-subscribe"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eXpl0it3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2016-03-15T17:47:09.000Z","updated_at":"2025-04-14T17:48:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b6e25e9-1896-4f7d-8d8e-b6f9b855fca1","html_url":"https://github.com/eXpl0it3r/PubBus","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/eXpl0it3r%2FPubBus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXpl0it3r%2FPubBus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXpl0it3r%2FPubBus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXpl0it3r%2FPubBus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eXpl0it3r","download_url":"https://codeload.github.com/eXpl0it3r/PubBus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252986562,"owners_count":21836183,"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":["cpp","hacktoberfest","message","messagebus","publish-subscribe"],"created_at":"2024-08-03T02:01:03.822Z","updated_at":"2025-05-08T02:30:37.736Z","avatar_url":"https://github.com/eXpl0it3r.png","language":"C++","readme":"# PubBus\n\n**PubBus** is a simple, header-only implementation of a MessageBus.\n\nUnit tests are written with the [Catch2](https://github.com/catchorg/Catch2) test framework.\n\n**Note:** PubBus requires C++17, the examples and tests use some C++20 features\n\n## Example\n\n```c++\n#include \u003cPubBus/PubBus.hpp\u003e\n#include \u003ciostream\u003e\n\nstruct DummyMessage : pub::Message\n{\n    int important_value = 0;\n};\n\nint main()\n{\n    auto bus = pub::MessageBus{};\n    const auto message = DummyMessage{ .important_value = 100 };\n\n    bus.subscribe\u003cDummyMessage\u003e(\n        [](const DummyMessage\u0026 message)\n        {\n            std::cout \u003c\u003c \"Important value: \" \u003c\u003c message.important_value \u003c\u003c \"\\n\";\n        }\n    );\n\n    bus.publish(message);\n}\n```\n\n## Test Execution\n\nFor Visual Studio I recommend installing the [Test Adapter for Catch2](https://github.com/JohnnyHendriks/TestAdapter_Catch2) and set it up to use the provided `catch.runsettings`.\n\nFor CMake/CTest you can run: `ctest \u003cbuild-dir\u003e/test -S Release`\n\n## License\n\nThis software is available under 2 licenses -- choose whichever you prefer.\n\n- Public Domain\n- MIT\n\n## Credits\n\n* [Message Bus (GDD #3)](http://www.optank.org/2013/04/02/game-development-design-3-message-bus/) by Stefan Schindler\n* [SW Message Bus](http://www.codeproject.com/Articles/723656/SW-Message-Bus) by Evgeny Zavalkovsky\n* [Catch C++ Test Framework](https://github.com/philsquared/Catch) by Phil Nash","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeXpl0it3r%2FPubBus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FeXpl0it3r%2FPubBus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeXpl0it3r%2FPubBus/lists"}