Corda check session.send/receive completeness

86 views Asked by At

I am currently creating some custom flows, sending back and forth some data through the session. I noticed that in some cases (for example if a responder flow has a session.receive still unanswered when the initiating flow finishes), no exceptions are thrown and everything works smoothly, without even a warn log. Is there a way to force the check of send/receive completeness?

1

There are 1 answers

3
Peter Li On

If you can provide some log file to demonstrate your use case would be better.

Send & Receive is typically a one-direction communication, one sends and one receives. If you are looking for a confirm receive, you can try to use method sendAndReceive, which

Serializes and queues the given payload object for sending to the counterparty.
Suspends until a response is received, which must be of the given R type.

Receive method itself is a blocking method, so if your flow successfully finishes. it means the receive method successfully receive what it is looking for.

But again, it would be much better if you can share your log and the elaborate on your questions a bit.