waitForEvents

suspend fun waitForEvents(correlationId: String, timeoutMs: Long? = null): List<Event>

Suspend until every needed event-type arrives for correlationId, or until timeoutMs elapses. Returns the captured events on success, or whatever has been captured so far on timeout.