KafkaIngestionConfigurationSource

Updated at:
Copy as MD

Parameter

Type

Description

Example

object

Kafka ingestion source configuration.

topics

string

The Kafka topics to subscribe to. Separate multiple topics with a comma (,).

topic1,topic2

fromPosition

string

The starting position for data consumption. Valid values: earliest and latest.

earliest,latest

consumerGroup

string

The ID of the Kafka consumer group.

consumer

valueType

string

The format of the message value. Valid values: text and json.

text,json

encoding

string

The character encoding of the message. This parameter applies only when valueType is text.

UTF-8

parseArray

boolean

Specifies whether to parse a message as a JSON array. If true, each element in the array becomes a separate log entry. This parameter applies only when valueType is json.

true

vpcId

string

The ID of the VPC that contains the Kafka cluster.

timeField

string

The field that contains the log timestamp. This parameter applies only when valueType is json.

__time__

timePattern

string

The regular expression for extracting the timestamp from the field specified by timeField.

\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}

timeFormat

string

The format of the timestamp. For example, you can set this to epoch for a Unix timestamp.

epoch

timeZone

string

The time zone of the timestamp, such as +0800.

+0800

defaultTimeSource

string

The default time source to use if timestamp extraction from the log data fails. Valid values are system (the time of the ingestion server) and kafka (the timestamp from the Kafka message).

system,kafka

enableSlsContext

boolean

Specifies whether to add Simple Log Service (SLS) context fields, such as __topic__ and __partition__, to each log entry.

true

nameResolutions

string

Custom DNS resolutions in JSON format. Use this parameter to map hostnames to IP addresses.

{"hostname": "192.168.1.28"}

communication

string

The authentication and communication protocol settings in JSON format. For example, you can use this parameter to configure SASL authentication.

{ "protocol":"SASL_PLAINTEXT", "sasl":{ "mechanism":"PLAIN", "username":"用户名", "password":"密码" } }

processorId

string

The ID of the ingestion processor.

ingest-processor-1756802123-953901

enableVpcNat

boolean

Specifies whether to enable NAT for VPC connections. Set this to true if your Kafka cluster is in a VPC and requires NAT for access.

securityGroups

string

The ID of the security group to associate with the ingestion source. This parameter is required when connecting to a Kafka cluster in a VPC. Separate multiple IDs with a comma (,).

vswitchId

string

The ID of the VSwitch in the specified VPC. This parameter is required when connecting to a Kafka cluster in a VPC.

bootstrapServers

string

A list of bootstrap servers for the Kafka cluster, formatted as host1:port1,host2:port2.

192.168.1.28:9092

format

object

The data format configuration.

any

Additional format-specific properties. The supported properties depend on the valueType.