0
votes

We were running CORDA node over night and was testing continuous flows of financial messages .

After 12 hours we found that the RPC client listening for vault changes no longer capturing the messages it got disconnected .

  • How do we get the events for the time period when the client got disconnected, snapshot gives all events only.
  • Do we have some configuration to prevent time out of clients . Please let us know the best practise , since our scenario needs high reliability.
  • Could you please provide some insights regarding right architectural pattern to capture events from CORDA node
  • We were using the pattern based on the following example

updates.toBlocking().subscribe { update -> update.produced.forEach { logState(it) }

here are some errors from the log

enter image description here

1
Can you add information about what the machine was doing at the time of disconnect? What kind of machine was the RPC client running on?Joel
It is a linux laptop with 16 gb ram. Machine was screen locked.Mahesh Govind
Did the machine go to sleep at any point?Joel

1 Answers

0
votes

In Corda 4.3 we introduced the feature of RPC reconnecting. You would simply add the follow codes to your spring client, then it will work.

val gracefulReconnect = GracefulReconnect(onDisconnect={/*insert disconnect handling*/}, onReconnect{/*insert reconnect handling*/}, maxAttempts = 3)
val cordaClient = CordaRPCClient(nodeRpcAddress)
val cordaRpcOps = cordaClient.start(rpcUserName, rpcUserPassword, gracefulReconnect = gracefulReconnect).proxy

Also, please refer to the blog if you are looking for more information on the reconnection: https://www.corda.net/blog/corda-rpc-reconnecting-client/