NodeJS client - retrieve batch of events

We are using NodeJS client to process events via catch-up subscriptions.

From documentation it looks like there are two ways of how to process data:

  • await for
  • an on callback

By applying domain knowledge I can process some of the events in parallel which I would apply here to improve the performance.

I ended up with some crazy logic in on callback method to pretty much put events back into sequence for processing.

Is there a way how to simply get a collection of events as batches as those are received from EventStore DB and apply the custom logic on them?