diff --git a/docs/quickstart/logproxy-client-tutorial-cn.md b/docs/quickstart/logproxy-client-tutorial-cn.md index e97725b..97b2380 100644 --- a/docs/quickstart/logproxy-client-tutorial-cn.md +++ b/docs/quickstart/logproxy-client-tutorial-cn.md @@ -222,7 +222,114 @@ client.join(); 调用函数 `LogProxyClient.start()` 会启动一个新的线程,该线程将使用 Netty 建立一个到 LogProxy 的连接,并通过该连接接收日志数据。 -LogProxy 客户端还可以通过 `ClientConf` 配置一些客户端行为相关的参数,如下所示是一个使用自定义 `ClientConf` 的例子: +LogProxy 客户端还可以通过 `ClientConf` 配置一些客户端行为相关的参数: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数名是否必需默认值类型设置函数参数说明
clientId系统生成StringclientId用户自定义客户端id,默认由系统自动生成。
transferQueueSize20000InttransferQueueSize用于缓冲从LogProxy接收的记录的队列大小。
connectTimeoutMs5000IntconnectTimeoutMs连接超时时间(以毫秒为单位)。
readWaitTimeMs2000IntreadWaitTimeMs读取队列的超时时间(以毫秒为单位)。
retryIntervalS2IntretryIntervalS重试之间的间隔时间(以秒为单位)。
idleTimeoutS15IntidleTimeoutSNetty handler空闲超时时间(以秒为单位)。
maxReconnectTimes-1IntmaxReconnectTimes断开连接后的最大重试次数,如果持续idleTimeoutS所配置的时间后,仍没有收到数据,则会触发重新连接。默认值-1代表无限重试。
nettyDiscardAfterReads16IntnettyDiscardAfterReadsNetty尝试读取的最大次数,超过此次数的数据将被丢弃。
ignoreUnknownRecordTypefalsebooleanignoreUnknownRecordType使用warning级别的日志记录未知或不受支持的消息类型,而不是抛出异常。
protocolVersion2IntprotocolVersion与LogProxy服务(cdc模式)的通信协议版本。当前默认值即最新版本V2。
sslContextSslContextsslContextNetty ssl 上下文。
+
+ +如下所示是一个使用自定义 `ClientConf` 的例子: ```java ClientConf clientConf = diff --git a/docs/quickstart/logproxy-client-tutorial.md b/docs/quickstart/logproxy-client-tutorial.md index 7d6c1a3..ead43c2 100644 --- a/docs/quickstart/logproxy-client-tutorial.md +++ b/docs/quickstart/logproxy-client-tutorial.md @@ -222,7 +222,114 @@ client.join(); The method `LogProxyClient.start()` will start a new thread which serving with a netty socket to receive data from LogProxy. -There are also some configurations for the client in `ClientConf`, if you don't want to use its default values, you can customize a `ClientConf` and pass it to the corresponding constructor to create the client instance. +There are also some configurations for the client in `ClientConf`: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionRequiredDefaultTypeSetterDescription
clientIdfalsesystem-generatedStringclientIdUser-defined client id, automatically generated by the system by default.
transferQueueSizefalse20000InttransferQueueSizeQueue size for storing records received from log proxy.
connectTimeoutMsfalse5000IntconnectTimeoutMsConnection timeout in milliseconds.
readWaitTimeMsfalse2000IntreadWaitTimeMsReading queue timeout in milliseconds.
retryIntervalSfalse2IntretryIntervalSTime to sleep in seconds when retrying.
idleTimeoutSfalse15IntidleTimeoutSIdle timeout in seconds for netty handler.
maxReconnectTimesfalse-1IntmaxReconnectTimesMaximum number of retries after disconnect, if not data income lasting idleTimeoutS, a reconnection will be triggered. The default value -1 means infinite retries
nettyDiscardAfterReadsfalse16IntnettyDiscardAfterReadsMaximum number of reads, after which data will be discarded.
ignoreUnknownRecordTypefalsefalsebooleanignoreUnknownRecordTypeIgnore unknown or unsupported record type with a warning log instead of throwing an exception.
protocolVersionfalse2IntprotocolVersionCommunication protocol version with the LogProxy service (cdc mode). The current default value is the latest version V2.
sslContextfalseSslContextsslContextNetty ssl context.
+
+ +If you don't want to use its default values, you can customize a `ClientConf` and pass it to the corresponding constructor to create the client instance. ```java ClientConf clientConf =