@@ -7342,7 +7342,7 @@ This module contains Sinks developed and maintained by the members of Quix Strea
7342
7342
class TDengineSink(BatchingSink)
7343
7343
```
7344
7344
7345
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L40 )
7345
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L50 )
7346
7346
7347
7347
<a id="quixstreams.sinks.community.tdengine.sink.TDengineSink.__init__"></a>
7348
7348
@@ -7355,7 +7355,7 @@ def __init__(host: str,
7355
7355
subtable: SubtableNameSetter,
7356
7356
fields_keys: FieldsSetter = (),
7357
7357
tags_keys: TagsSetter = (),
7358
- time_key : Optional[str ] = None,
7358
+ time_setter : Optional[TimeSetter ] = None,
7359
7359
time_precision: TimePrecision = "ms",
7360
7360
allow_missing_fields: bool = False,
7361
7361
include_metadata_tags: bool = False,
@@ -7370,10 +7370,12 @@ def __init__(host: str,
7370
7370
verify_ssl: bool = True,
7371
7371
username: str = "",
7372
7372
password: str = "",
7373
- token: str = "")
7373
+ token: str = "",
7374
+ max_retries: int = 5,
7375
+ retry_backoff_factor: float = 1.0)
7374
7376
```
7375
7377
7376
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L41 )
7378
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/tdengine/sink.py#L51 )
7377
7379
7378
7380
A connector to sink processed data to TDengine.
7379
7381
@@ -7416,10 +7418,12 @@ cannot be both a tag and field.
7416
7418
- If empty, no tags will be sent.
7417
7419
>***NOTE***: always converts tag values to strings.
7418
7420
Default - `()`.
7419
- - `time_key`: a key to be used as "time" when convert to InfluxDB line protocol.
7420
- By default, the record timestamp will be used with "ms" time precision.
7421
- When using a custom key, you may need to adjust the `time_precision` setting
7422
- to match.
7421
+ - `time_setter`: an optional column name to use as "time" when convert to InfluxDB line protocol.
7422
+ Also accepts a callable which receives the current message data and
7423
+ returns either the desired time or `None` (use default).
7424
+ The time can be an `int`, `string` (RFC3339 format), or `datetime`.
7425
+ The time must match the `time_precision` argument if not a `datetime` object, else raises.
7426
+ By default, a record's kafka timestamp with "ms" time precision is used.
7423
7427
- `time_precision`: a time precision to use when convert to InfluxDB line protocol.
7424
7428
Possible values: "ms", "ns", "us", "s".
7425
7429
Default - `"ms"`.
@@ -7444,6 +7448,11 @@ client authentication, primarily for additional logging.
7444
7448
client authentication (which should raise an Exception).
7445
7449
Callback should accept the raised Exception as an argument.
7446
7450
Callback must resolve (or propagate/re-raise) the Exception.
7451
+ - `max_retries`: maximum number of retries for failed requests.
7452
+ Default - `5`.
7453
+ - `retry_backoff_factor`: a backoff factor applied between retry attempts starting from the second retry.
7454
+ The sleep duration between retries is calculated as `{backoff factor} * (2 ** ({number of previous retries}))` seconds.
7455
+ Default - `1.0`.
7447
7456
7448
7457
<a id="quixstreams.sinks.community.tdengine.date_utils"></a>
7449
7458
0 commit comments