Skip to content

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

@msmadja

Description

@msmadja

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions