KV Store processes values by retrieving data from or storing data in a key-value store.

This processor is capable of supporting multiple KV stores simultaneously and concurrently. Stores are accessed by a signature (derived from kv_options) that allows processor threads to access the same store based on its configuration.

Interpretation Methods

The processor supports these interpretation methods:

  • object

Options

FieldTypeDescriptionRequired
typestringdetermines the action applied to the KV store.

must be one of:
- get: retrieve the value in Key from the store
- set: put the value from SetKey into the store
Yes
prefixstringstring that is prepended to either the Key (in the case of get) or the SetKey (in the case of set) and is intended to simplify data management within a KV store.

this is optional and defaults to an empty string.
No
offset_ttlintegeran offset (in seconds) used to determine the time-to-live (TTL) of the value set into the KV store.

TTL is calculated based on the current time plus the offset. for example, if the offset is 86400 (1 day), then the value will either be evicted from the store or ignored on retrieval if more than 1 day has elapsed since it was placed into the store.

this is optional and defaults to using no TTL when setting values into the store.
No
kv_optionsobjectdetermines the type of KV store used by the processor. refer to each KV backend described in Key-Value Stores for more information.Yes

Use Cases

This processor enables several use cases, see Key-Value Stores for detailed examples.