# Timeplus

Sends message to a Timeplus Enterprise stream via ingest endpoint

This output can send message to Timeplus Enterprise Cloud, Timeplus Enterprise (self-hosted) or directly to timeplusd.

This output accepts structured message only. It also expects all message contains the same keys and matches the schema of the destination stream.

***

## Configuration

| Name          | Type     | Optional | Secret | Description                                                                                                                                              |
| ------------- | -------- | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| target        | string   | yes      | no     | The destination type, either Timeplus Enterprise or timeplusd. The value should be one of `timeplus` or `timeplusd`. The value defaults to `"timeplus"`. |
| url           | string   | yes      | no     | The url should always include schema and host. The value defaults to `"https://us-west-2.timeplus.cloud"`.                                               |
| workspace     | string   | no       | no     | ID of the workspace. Required if target is `timeplus`.                                                                                                   |
| stream        | string   | no       | no     | The name of the stream. Make sure the schema of the stream matches the input                                                                             |
| apikey        | string   | no       | yes    | The API key. Required if you are sending message to Timeplus Enterprise Cloud                                                                            |
| username      | string   | no       | no     | The username. Required if you are sending message to Timeplus Enterprise (self-hosted) or timeplusd                                                      |
| password      | string   | no       | yes    | The password. Required if you are sending message to Timeplus Enterprise (self-hosted) or timeplusd                                                      |
| max_in_flight | int      | yes      | no     | The maximum number of messages to have in flight at a given time. Increase this to improve throughput. The value defaults to `64`.                       |
| batching      | batching | no       | no     | Allows you to configure a batching policy.                                                                                                               |

### Batching

| Name      | Type   | Optional | Secret | Description                                                                                                                                                               |
| --------- | ------ | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| count     | int    | yes      | no     | A number of messages at which the batch should be flushed. If `0` disables count based batching. The value defaults to `0`.                                               |
| byte_size | int    | yes      | no     | An amount of bytes at which the batch should be flushed. If `0` disables size based batching. The value defaults to `0`.                                                  |
| period    | string | yes      | no     | A period in which an incomplete batch should be flushed regardless of its size. The value defaults to `""`.                                                               |
| check     | string | yes      | no     | A [Bloblang query](/platform/1.14/connectors/bloblang.md) that should return a boolean value indicating whether a message should end a batch. The value defaults to `""`. |
