Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use subscriber promises #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nialldonnellyfh
Copy link
Collaborator

@nialldonnellyfh nialldonnellyfh commented Jun 12, 2017

Motivation

The mediatorjs library (https://github.com/ajacksified/Mediator.js) provides a useful API for dealing with asynchronous topics, however the API for dealing with requests is too difficult.

To address this, I have added the ability for the topic subscribers to return a Promise.

The publish command can then wait on the subscribers to resolve / reject instead of subscribing to unique topic IDs.

The benefit of this is a more clear separation between user code and the transport layer.

This change is not backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant