> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# format_avro_* 格式设置

> ClickHouse 中 format_avro_* 生成组的格式设置。

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置是根据[源文件](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h)自动生成的。

<div id="format_avro_schema_registry_connection_timeout">
  ## format\_avro\_schema\_registry\_connection\_timeout
</div>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "用于控制 AvroConfluent 格式 所用 Confluent Schema Registry HTTP 客户端连接超时（以秒为单位）的新设置。"}]}]} />

对于 AvroConfluent 格式：这是 Confluent Schema Registry HTTP 客户端的连接超时 (秒) 设置。该设置同时用于 schema 拉取和 schema 注册。其值必须大于 0 且小于 600 (10 分钟) 。

<div id="format_avro_schema_registry_max_retries">
  ## format\_avro\_schema\_registry\_max\_retries
</div>

<SettingsInfoBlock type="UInt64" default_value="5" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "5"},{"label": "新增设置，用于控制与 Confluent Schema Registry 通信时发生临时性故障（传输超时、连接被拒绝、DNS 错误、HTTP 5xx\/408\/429）时的最大重试次数。设为 0 可禁用重试。通过 `compatibility = '26.5'` 可保留之前的行为（不重试）。"}]}]} />

对于 AvroConfluent 格式：与 Confluent Schema Registry 通信时发生临时性故障 (传输超时、连接被拒绝、DNS 错误、HTTP 5xx/408/429) 时的最大重试次数。设为 0 可禁用重试。允许的最大值为 20。schema 验证错误 (HTTP 409、格式错误的 Avro JSON) 不会重试。

<div id="format_avro_schema_registry_receive_timeout">
  ## format\_avro\_schema\_registry\_receive\_timeout
</div>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "用于控制 AvroConfluent 格式 所使用的 Confluent Schema Registry HTTP 客户端 接收超时（以秒为单位）的新设置。"}]}]} />

对于 AvroConfluent 格式：Confluent Schema Registry HTTP 客户端 的接收超时时间，单位为秒。该设置同时用于 schema 拉取和 schema 注册。其值必须大于 0 且小于 600 (10 分钟) 。

<div id="format_avro_schema_registry_retry_initial_backoff_ms">
  ## format\_avro\_schema\_registry\_retry\_initial\_backoff\_ms
</div>

<SettingsInfoBlock type="UInt64" default_value="100" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "100"},{"label": "新增设置：用于控制失败的 Confluent Schema Registry 请求在重试前的初始 backoff（以毫秒为单位）。每次重试时，backoff 都会加倍，上限为 10 秒。当 `format_avro_schema_registry_max_retries = 0` 时不生效（可通过 `compatibility = '26.5'` 恢复 26.6 之前的行为）。"}]}]} />

对于 AvroConfluent 格式：失败的 Confluent Schema Registry 请求在重试前的初始 backoff (以毫秒为单位) 。此后每次重试时，backoff 都会加倍，上限为 10 秒。该值必须大于 0 且小于或等于 60000。

<div id="format_avro_schema_registry_send_timeout">
  ## format\_avro\_schema\_registry\_send\_timeout
</div>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "新增设置：控制 AvroConfluent 格式 所用的 Confluent Schema Registry HTTP 客户端的发送超时时间（以秒为单位）。"}]}]} />

对于 AvroConfluent 格式：Confluent Schema Registry HTTP 客户端的发送超时时间 (单位为秒) 。同时用于 schema 拉取和 schema 注册。必须大于 0 且小于 600 (10 分钟) 。

<div id="format_avro_schema_registry_url">
  ## format\_avro\_schema\_registry\_url
</div>

用于 AvroConfluent 格式的 Confluent Schema Registry URL。
