Closed robertsLando closed 4 years ago
Interesting that Mongo with cluster do not work. I think it might need some time to bring the cluster up?
@mcollina In my opinion it could be caused by mongo not ready when aedes start. All mongo persistence methods have once.ready
listener (https://github.com/moscajs/aedes-persistence-mongodb/blob/master/persistence.js#L181) if the db is not ready and so it could loose some messages.
I could try to fix aedes process to wait db ready event
@mcollina I have removed all timeouts, I have also made aedes process waiting for db ready and a cleandb function to be sure there is not problems caused by someting already present inside dbs.
So everytime a test starts it starts the aedes process using a promise, that promise resolves when in order:
ready
eventEven with this checks before run result are the same: everything is :+1: except mongo with clusters that seems to loose some messages randomly. Any ideas?
P.S: Remember to merge and release a new version of mqemitter-redis
@gnought Do you have any idea why mongo could cause that kind of errors with clusters?
no
At least, are tests now good after latest fixes?
If tests are ok, after you publish mqemitter-redis on npm, I will bump that here then I merge this?
the new version of mqemitter-redis is out.
@mcollina Ping
@mcollina Based on my tests the results are: