+ Version 0.10.0
brings some changes that require a migration:
+
waitForServices
parameter in kRPC config is deprecated
+ and should be replaced with
+ public fun Route.rpc
functions now accept a suspending function parameter
+ instead of a regular one.
+ @@ -67,19 +67,54 @@ You can also define a custom format.
-waitForServices
DSL
+ connector
DSL
- waitForServices
parameter is available for both client and server.
- It specifies the behavior for an endpoint in situations
- when the message for a service is received,
- but the service is not present in KrpcClient
or KrpcServer
.
- If set to true
, the message will be stored in memory,
- otherwise, the error will be sent to a peer endpoint,
- saying that the message was not handled.
- Default value is true
.
+ Connector is a part of kRPC that is responsible for sending and receiving data over the network.
+ You can configure the following parameters:
waitTimeout
- timeout for waiting for a service to be registered.
+ Sometimes services can be registered after the server starts,
+ and after the first requests starts to arrive from a peer.
+ This parameter defines how long the server will wait for a service to be registered.
+ Duration.INFINITE
.
+ dontWait()
.
+ callTimeout
- timeout for processing one message.
+ Duration.INFINITE
.
+ perCallBufferSize
- size of the buffer for one call.
+ Call can be a stream or a single message.
+ This effectively provides a backpressure mechanism.
+ If a peer is slow to process the message during a call,
+ the buffer will be filled up and
+ the sender will wait before sending more messages.
+ 1
.
+ + Example: +
+