event-store-client
event-store-client copied to clipboard
Many concurrent subscriptions on a connection closes connection with no error
The scenario was ... (am migrating crud sql to aggregates) using one connection Maybe 35 rows of data that - per row - converts into 8 calls into an aggregate root. This in turn would per call load 1-2 aggregates (no more than 8 events per stream) by reading stream forwards and then potentially write an event to each of those streams.
If i limit the rows of data to about 24 it all works - at this point i have put nothing in to monitor the number of concurrent read stream forwards i am doing. If i operate on the rows sequentially rather than a ton of promises in parrallel it all works.
The problem is not the failure - its the lack of feedback.
When i fails i do get onClose(false) getting called at the connection level - but nothing that causes each aggregate to fail. The callback simply isn't made as far as i can tell.
Still investigating. Posted this incase someone can point out how i'm being silly! Otherwise i guess a solution would be to end up adding some kind of timeout into the read forward subscription chunks?