https://github.com/kelindar/emitter-share
How to use shared subscriptions (subscription groups) with Emitter
https://github.com/kelindar/emitter-share
consumer-group emitter load-balancing subscriber-group subscriptions
Last synced: about 2 months ago
JSON representation
How to use shared subscriptions (subscription groups) with Emitter
- Host: GitHub
- URL: https://github.com/kelindar/emitter-share
- Owner: kelindar
- Created: 2019-03-02T03:26:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-02T03:40:09.000Z (about 6 years ago)
- Last Synced: 2025-01-24T01:51:11.206Z (4 months ago)
- Topics: consumer-group, emitter, load-balancing, subscriber-group, subscriptions
- Language: Go
- Size: 569 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shared Subscription Groups with Emitter
A shared subscription is a mechanism for distributing messages to a set of subscribers to shared subscription topic, such that each message is received by only one subscriber. This contrasts with normal subscriptions where each subscriber will receive a copy of the published message.
A shared subscription is on the form $share/sharename/channel and subscribers to this topic will receive messages published to the channel. The messages will be distributed according to the defined distribution policy.
[](https://www.youtube.com/watch?v=Vl7iGKEQrTg)

## Example Output
```
aircon 1 started
aircon 2 started
aircon 3 started
sensor started
aircon 1 received 37 degrees
aircon 3 received 13 degrees
aircon 1 received 33 degrees
aircon 3 received 8 degrees
aircon 1 received 9 degrees
aircon 2 received 16 degrees
aircon 1 received 32 degrees
aircon 2 received 7 degrees
aircon 1 received 26 degrees
aircon 2 received 28 degrees
aircon 1 received 33 degrees
aircon 2 received 19 degrees
aircon 1 received 6 degrees
aircon 2 received 15 degrees
aircon 1 received 24 degrees
aircon 2 received 10 degrees
aircon 1 received 30 degrees
aircon 2 received 38 degrees
aircon 1 received 0 degrees
aircon 2 received 15 degrees
aircon 1 received 26 degrees
aircon 2 received 30 degrees
aircon 1 received 11 degrees
aircon 2 received 19 degrees
aircon 1 received 22 degrees
aircon 2 received 37 degrees
aircon 1 received 35 degrees
aircon 3 received 1 degrees
aircon 2 received 9 degrees
```