net.corda.core.messaging / onNext

onNext

fun <M : Any> MessagingService.onNext(topic: String, sessionId: Long): <ERROR CLASS><M>

Returns a ListenableFuture of the next message payload (Message.data) which is received on the given topic and sessionId. The payload is deserilaized to an object of type M. Any exceptions thrown will be captured by the future.