A Redis sink in Depot requires the following environment variables to be set along with Generic ones
REDIS server instance hostname/IP address followed by its port.
- Example value:
localhost:6379,localhost:6380
- Type:
required
To select whether you want to push your data as a KEYVALUE
, HASHSET
or as a LIST
data type.
- Example value:
Hashset
- Type:
required
- Default value:
Hashset
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.
-
Example value:
Service_%s,order_number
This will take the value of the proto field
order_number
from the proto and create the Redis keys as per the template. -
Type:
required
This is the field that decides what all data will be stored in the HashSet for each message.
- Example value:
{"order_number":"ORDER_NUMBER","event_timestamp":"TIMESTAMP"}
- Type:
required (For Hashset)
This field decides what data will be stored in the value part of key-value pair
-
Example value:
customer_id
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 -
Type:
required (For KeyValue)
This field decides what all data will be stored in the List for each message.
-
Example value:
customer_id
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 -
Type:
required (For List)
- Example value:
DURATION
- Type:
optional
- Default value:
DISABLE
- Choice of Redis TTL type.It can be:
DURATION
: After which the Key will be expired and removed from Redis (UNIT- seconds)EXACT_TIME
: Precise UNIX timestamp after which the Key will be expired
Redis TTL value in Unix Timestamp for EXACT_TIME
TTL type, In Seconds for DURATION
TTL type.
- Example value:
100000
- Type:
optional
- Default value:
0
The Redis deployment you are using. At present, we support Standalone
and Cluster
types.
- Example value:
Standalone
- Type:
required
- Default value:
Standalone