RavenDB

Detailed information on the RavenDB state store component

Component format

To setup RavenDB state store create a component of type state.ravendb. See this guide on how to create and apply a state store configuration.

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
spec:
  type: state.ravendb
  version: v1
  metadata:
  - name: serverURL
    value: <REPLACE-WITH-SERVER-URL> # Required. Example: "http://localhost:8080"
  - name: databaseName
    value: <REPLACE-WITH-DATABASE-NAME> # Optional. default: "daprStore"
  - name: certPath
    value: <REPLACE-WITH-CERT-PATH> # Required unless server is insecure.
  - name: keyPath
    value: <REPLACE-WITH-KEY-PATH> # Required unless server is insecure.
  - name: EnableTTL
    value: <REPLACE-WITH-ENABLE-TTL> # Optional. default: "true"
  - name: TTLFrequency
    value: <REPLACE-WITH-TTL-FREQUENCY> # Optional. Example: "15". Default: "60"

Spec metadata fields

FieldRequiredDetailsExample
serverURLYURL to RavenDB instance"http://localhost:8080"
databaseNameNThe name of the database to use. Defaults to "daprStore""daprStore"
certPathN1Path to certificate file"/path/to/client.certificate.crt"
keyPathN1Path to key file"/path/to/certificate.key"
EnableTTLNBoolean value to enable TTL capability. Defaults to "true""true"
TTLFrequencyNFrequency in seconds for TTL cleanup. Defaults to "60""60"

[1] The certPath and keyPath fields are not mandatory if server URL is http. However, if the server URL is https and no certPath and keyPath are present, then Dapr returns an error.

TTLs and cleanups

This state store supports Time-To-Live (TTL) for records stored with Dapr. When storing data using Dapr, you can set the ttlInSeconds metadata property to indicate when the data should be considered “expired”.