Skip to main content

Source

Timeplus integrates with a wide range of systems as data sources, such as Apache Kafka.

You can define one or more sources to set up the background jobs to load data into Timeplus. Please check the Data Ingestion section for more details.

Source API

If you need to call an API to create a source, here are the references.

stream_generator

a source that generates random data for test

PropertyRequiredDescriptionDefault
templateyesSpecifies the template used to generate data, support iot,user_logins,devops
intervalnoSpecifies the event interval. for example 200ms200ms

websocket

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

PropertyRequiredDescriptionDefault
urlyesSpecifies the URL of the websocket server url
open_messagenoAn optional message to send to the server upon connection.
open_message_typenoAn optional flag to indicate the data type of open_message. support text binarytext
data_typeyesSpecifies the data type to use for creating the stream. support json,text,

nats

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

PropertyRequiredDescriptionDefault
urlyesA list of URLs to connect to. for example [nats://127.0.0.1:4222]
subjectyesA 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_typeyesSpecifies the data type to use for creating the stream. support json,text,
tls.disablenoIf set to true, disables TLS encryptionfalse
tls.skip_verify_servernoIf set to true, skips server certificate verification when using TLSfalse

nats_jetstream

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

PropertyRequiredDescriptionDefault
urlyesA list of URLs to connect to. for example [nats://127.0.0.1:4222]
subjectyesA 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. Either a subject or stream must be specified..
delivernoDetermines which messages to deliver when consuming without a durable subscriber. 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_typeyesSpecifies the data type to use for creating the stream. support json,text,
tls.disablenoIf set to true, disables TLS encryptionfalse
tls.skip_verify_servernoIf set to true, skips server certificate verification when using TLSfalse