kalisio / feathers-distributed

Distribute your Feathers services as microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Race condition on service discovery

claustres opened this issue · comments

Steps to reproduce

Start two apps running the distribution module at the same time.

Expected behavior

Every app correctly sees services from the other one.

Actual behavior

It appears that there is a race condition where one app cannot see the second one. If the second app is restarted then it appears correctly.

Because app services publication relies on event publishers/subscribers there is no guarantee of delivery, the bug might appear when the publisher and subscriber are created almost at the same time, so that it could be a duplicate of #1.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): 0.7.1

NodeJS version: 8.16

Operating System: Linux (Debian)

Closing of #48 might have fixed this issue, to be checked.