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

Multiple subscribers only first received message (publish subscribe) #140

Open
msmadja opened this issue Jul 23, 2019 · 1 comment
Open

Comments

@msmadja
Copy link

msmadja commented Jul 23, 2019

Hi,
We're using this example in our project (built as micro services).

Based to your example.
One subscriber received but another didn't when we used publish to dispatch an event.

setTimeout(() => {
            this.bus.publish('user.created', payload);
        }, 1000);

user-service:

this.bus.subscribe('user.created', (event) => {
  // event arrives.
});

person-service

this.bus.subscribe('user.created', (event) => {
   // event doesn't arrive
});

We saw that you use setInterval() when you publish message.
Is this required? If so , can you please explain why?

Thank you very much.

@nicholaswmin
Copy link

See this: #99.

You're probably running all the subscribers in the same directory...

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

No branches or pull requests

2 participants