|
| 1 | +# Redis |
| 2 | + |
| 3 | +A Redis sink in Depot requires the following environment variables to be set along with Generic ones |
| 4 | + |
| 5 | +### `SINK_REDIS_URLS` |
| 6 | + |
| 7 | +REDIS server instance hostname/IP address followed by its port. |
| 8 | + |
| 9 | +- Example value: `localhost:6379,localhost:6380` |
| 10 | +- Type: `required` |
| 11 | + |
| 12 | +### `SINK_REDIS_DATA_TYPE` |
| 13 | + |
| 14 | +To select whether you want to push your data as a `KEYVALUE`, `HASHSET` or as a `LIST` data type. |
| 15 | + |
| 16 | +- Example value: `Hashset` |
| 17 | +- Type: `required` |
| 18 | +- Default value: `Hashset` |
| 19 | + |
| 20 | +### `SINK_REDIS_KEY_TEMPLATE` |
| 21 | + |
| 22 | +The string that will act as the key for each Redis entry. This key can be configured as per the requirement, a constant or can extract value from each message and use that as the Redis key. |
| 23 | + |
| 24 | +- Example value: `Service\_%%s,1` |
| 25 | + |
| 26 | + This will take the value with index 1 from proto and create the Redis keys as per the template. |
| 27 | + |
| 28 | +- Type: `required` |
| 29 | + |
| 30 | +### `SINK_REDIS_HASHSET_FIELD_TO_COLUMN_MAPPING` |
| 31 | + |
| 32 | +This is the field that decides what all data will be stored in the HashSet for each message. |
| 33 | +- Example value: `{"order_number":"ORDER_NUMBER","event_timestamp":"TIMESTAMP"}` |
| 34 | +- Type: `required (For Hashset)` |
| 35 | + |
| 36 | +### `SINK_REDIS_KEY_VALUE_DATA_FIELD_NAME` |
| 37 | + |
| 38 | +This field decides what data will be stored in the value part of key-value pair |
| 39 | + |
| 40 | +- Example value: `customer_id` |
| 41 | + |
| 42 | + This will get the value of the field with name `customer_id` in your proto and push that to the Redis as value with the corresponding keyTemplate |
| 43 | + |
| 44 | +- Type: `required (For KeyValue)` |
| 45 | + |
| 46 | +### `SINK_REDIS_LIST_DATA_FIELD_NAME` |
| 47 | + |
| 48 | +This field decides what all data will be stored in the List for each message. |
| 49 | + |
| 50 | +- Example value: `customer_id` |
| 51 | + |
| 52 | + This will get the value of the field with name `customer_id` in your proto and push that to the Redis list with the corresponding keyTemplate |
| 53 | + |
| 54 | +- Type: `required (For List)` |
| 55 | + |
| 56 | +### `SINK_REDIS_TTL_TYPE` |
| 57 | + |
| 58 | +- Example value: `DURATION` |
| 59 | +- Type: `optional` |
| 60 | +- Default value: `DISABLE` |
| 61 | +- Choice of Redis TTL type.It can be: |
| 62 | + - `DURATION`: After which the Key will be expired and removed from Redis \(UNIT- seconds\) |
| 63 | + - `EXACT_TIME`: Precise UNIX timestamp after which the Key will be expired |
| 64 | + |
| 65 | +### `SINK_REDIS_TTL_VALUE` |
| 66 | + |
| 67 | +Redis TTL value in Unix Timestamp for `EXACT_TIME` TTL type, In Seconds for `DURATION` TTL type. |
| 68 | + |
| 69 | +- Example value: `100000` |
| 70 | +- Type: `optional` |
| 71 | +- Default value: `0` |
| 72 | + |
| 73 | +### `SINK_REDIS_DEPLOYMENT_TYPE` |
| 74 | + |
| 75 | +The Redis deployment you are using. At present, we support `Standalone` and `Cluster` types. |
| 76 | + |
| 77 | +- Example value: `Standalone` |
| 78 | +- Type: `required` |
| 79 | +- Default value: `Standalone` |
0 commit comments