Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sonic182/pub_subx
Publisher Subscriber utility for elixir
https://github.com/sonic182/pub_subx
Last synced: 3 months ago
JSON representation
Publisher Subscriber utility for elixir
- Host: GitHub
- URL: https://github.com/sonic182/pub_subx
- Owner: sonic182
- Created: 2022-12-02T12:56:02.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T14:03:40.000Z (about 2 years ago)
- Last Synced: 2024-08-16T17:31:12.198Z (4 months ago)
- Language: Elixir
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- trackawesomelist - PubSubx (⭐1) - A simple publish-subscribe system built on Elixir's GenServer and Registry, allowing for dynamic topics, process monitoring, and automatic subscription management. (Recently Updated / [Sep 02, 2024](/content/2024/09/02/README.md))
README
# PubSubx
![Hex.pm Version](https://img.shields.io/hexpm/v/pub_subx)
![License](https://img.shields.io/github/license/sonic182/pub_subx)
![Issues](https://img.shields.io/github/issues/sonic182/pub_subx)`PubSubx` is a lightweight and flexible publish-subscribe (PubSub) library built on top of Elixir's `GenServer` and `Registry`. It allows processes to communicate by subscribing to topics and receiving messages when they are published. This is useful for decoupling components in your Elixir applications, enabling easier scalability and maintainability.
## Features
- **Subscribe/Unsubscribe**: Processes can easily subscribe or unsubscribe from topics.
- **Publish**: Messages can be published to any topic, notifying all subscribed processes.
- **Dynamic Topic Management**: Topics are created and removed dynamically based on subscriptions.
- **Process Monitoring**: Automatically handles the removal of subscriptions when processes terminate.## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed by adding `pub_subx` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:pub_subx, "~> 0.2.0"}
]
end
```## Usage
The docs can be found at .
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.