跳转至主要内容

数据源

Timeplus与各种系统相结合,作为数据来源,例如Apache Kafka。

您可以定义一个或多个源来设置后台任务将数据加载到Timeplus中。 更多详情请检查 数据导入 部分。

API 数据源

如果您需要调用 API 来创建数据源,以下是参考资料。

kafka

请参考 https://kafka.apache.org/

属性必填项描述默认值
brokersyes指定broker地址列表。 这是一个以逗号分隔的字符串。 例如kafka1:9092,kafka2:9092,kafka3:9092
主题yes指定要连接的Kafka主题
offsetyes指定Kafka offset配置。 支持latest,earliest
data_typeyes指定用于创建流的数据类型。 支持jsontextavrodebezium-jsondebezium-json-upsert
groupno指定Kafka消费者组。 如果用户未指定,则使用带有timeplus-source前缀的源uuid作为默认值timeplus-source-<uuid>
saslno指定用于简单身份验证和安全层(SASL)的认证机制。 支持noneplainscram-sha-256scram-sha-512none
用户名no指定用于身份验证的用户名
密码no指定用于身份验证的密码
tls.disableno如果设置为true,则禁用 TLS 加密false
tls.skip_verify_serverno如果设置为true,则在使用 TLS 时会跳过服务器证书验证false
schema_registry_addressno为Kafka指定架构注册表的URL,仅在data_type为avro时适用
schema_registry_api_keyno为架构注册表身份验证指定API密钥
schema_registry_api_secretno为架构注册表身份验证指定API密钥

stream_generator

a source that generates random data for test

属性必填项描述默认值
templateyes指定用于生成数据的模板,支持iotuser_loginsdevops
间隔no指定事件间隔。 例如:200ms200ms

websocket

refer to https://developer.mozilla.org/en-US/docs/Web/API/WebSocket

属性必填项描述默认值
urlyesSpecifies the URL of the websocket server url
open_messagenoAn optional message to send to the server upon connection.
open_message_typeno指定用于创建流的数据类型。 support json,text,text
data_typeyes指定用于创建流的数据类型。 support json,text,

nats

refer to https://docs.nats.io/nats-concepts/what-is-nats

属性必填项描述默认值
urlyesA list of URLs to connect to. for example [nats://127.0.0.1:4222]
subjectyesA subject to consume from. A subject to consume from. Supports wildcards for consuming multiple subjects.
queuenoAn optional queue group to consume as.
nak_delaynoAn optional delay duration on redelivering a message when negatively acknowledged.
prefetch_countnoThe maximum number of messages to pull at a time.524288
data_typeyes指定用于创建流的数据类型。 support json,text,
tls.disableno如果设置为true,则禁用 TLS 加密false
tls.skip_verify_serverno如果设置为true,则在使用 TLS 时会跳过服务器证书验证false

nats_jetstream

refer to https://docs.nats.io/nats-concepts/jetstream

属性必填项描述默认值
urlyesA list of URLs to connect to. for example [nats://127.0.0.1:4222]
subjectyesA subject to consume from. A subject to consume from. Supports wildcards for consuming multiple subjects.
queuenoAn optional queue group to consume as.
durablenoPreserve the state of your consumer under a durable name.
流 StreamnoA stream to consume from. A stream to consume from. Either a subject or stream must be specified..
delivernoDetermines which messages to deliver when consuming without a durable subscriber. support all last support all lastall
bindnoA bool indicates that the subscription should use an existing consumer.
ack_waitnoThe maximum amount of time NATS server should wait for an ack from consumer.30s
max_ack_pendingnoThe maximum number of outstanding acks to be allowed before consuming is halted.1024
data_typeyes指定用于创建流的数据类型。 支持jsontext
tls.disableno如果设置为true,则禁用 TLS 加密false
tls.skip_verify_serverno如果设置为true,则在使用 TLS 时会跳过服务器证书验证false

pulsar

请参考https://pulsar.apache.org/

属性必填项描述默认值
主题yes指定要连接的pulsar的主题
经纪网址yes指定要连接的broker URL
auth_typeyes指定要使用的身份验证类型。 支持``,oauth2token
auth_paramsno将身份验证参数指定为键值对{}

livepeer

参考https://livepeer.org/

属性必填项描述默认值
间隔yes指定livepeer api的拉取间隔。 例如:300s
api_keyyes指定livepeer的API 密钥
data_typeyes指定用于创建流的数据类型。 支持jsontext

ably

参考https://ably.com/

属性必填项描述默认值
api_keyyesapi_key的属性是一个字符串,用于对Ably服务进行身份验证和授权。 它代表与Ably账户关联的API密钥,是向Ably的服务发出经过身份验证的请求所需要的
channelyeschannel的属性制定了向其发送消息或从中接收消息的channel的名称。 Ably中的channels用于对消息进行分组和分类。 这个属性允许你为互动选择目标渠道