loopRecover
open suspend fun loopRecover(type: String, resetBlock: suspend () -> Unit, block: suspend () -> Unit)
Always run block, and executes resetBlock when an exception occurs.
Parameters
type
the nature of connection, e.g. queue poll, subscribe
resetBlock
actions to reset the internal state upon a connection failure
block
main logic to try executing