A lightweight eventbus library for Go with async compatibility and cross-process event support.
EventBus is a lightweight eventbus library for Go that implements a publish-subscribe pattern for decoupled communication between application components. It allows functions to subscribe to topics and receive events with arguments, supporting both synchronous and asynchronous execution. The library solves the problem of tight coupling in Go applications by providing a simple way to coordinate actions across different modules.
Go developers building event-driven applications, microservices, or systems requiring decoupled component communication. It's particularly useful for those needing async event handling or cross-process event distribution.
Developers choose EventBus for its minimal API, zero dependencies, and built-in async support—offering a straightforward alternative to heavier message brokers or complex event systems while maintaining Go's performance characteristics.
[Go] Lightweight eventbus with async compatibility for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library has no external dependencies, making it lightweight and easy to integrate without adding bloat to Go projects.
Supports asynchronous callbacks with configurable transactional behavior, allowing for serial or concurrent execution as needed, as shown in the SubscribeAsync example.
Includes built-in RPC client/server services for event communication between different processes, enabling distributed setups without additional tools.
Offers a minimal set of methods like Subscribe, Publish, and WaitAsync, reducing learning curve and maintenance overhead.
The library lacks built-in error handling for event callbacks, forcing developers to implement their own recovery and logging.
Topics are limited to simple string matching with no support for hierarchies, wildcards, or pattern-based subscriptions, restricting flexibility.
Setting up RPC for cross-process events requires manual configuration of server and client services, which can be prone to errors and adds setup overhead.