Detailed information on the RethinkDB state store component


To setup RethinkDB state store create a component of type state.rethinkdb. 请参阅本指南,了解如何创建和应用状态存储配置。

kind: Component
  name: <NAME>
  namespace: <NAMESPACE>
  type: state.rethinkdb
  version: v1
  - name: address
    value: <REPLACE-RETHINKDB-ADDRESS> # Required, e.g. or rethinkdb.default.svc.cluster.local:28015).
  - name: database
    value: <REPLACE-RETHINKDB-DB-NAME> # Required, e.g. dapr (alpha-numerics only)
  - name: table
    value: # Optional
  - name: username
    value: <USERNAME> # Optional
  - name: password
    value: <PASSWORD> # Optional
  - name: archive
    value: bool # Optional (whether or not store should keep archive table of all the state changes)

If you wish to use Redis as an actor store, append the following to the yaml.

  - name: actorStateStore
    value: "true"

RethinkDB state store supports transactions so it can be used to persist Dapr Actor state. By default, the state will be stored in table name daprstate in the specified database.

Additionally, if the optional archive metadata is set to true, on each state change, the RethinkDB state store will also log state changes with timestamp in the daprstate_archive table. This allows for time series analyses of the state managed by Dapr.


字段 必填 详情 Example
address Y The address for RethinkDB server "", "rethinkdb.default.svc.cluster.local:28015"
database Y The database to use. Alpha-numerics only "dapr"
table N The table name to use "table"
username N The username to connect with "user"
password N The password to connect with "password"
archive N Whether or not to archive the table "true", "false"

Setup RethinkDB

You can run RethinkDB locally using Docker:

docker run --name rethinkdb -v "$PWD:/rethinkdb-data" -d rethinkdb:latest

To connect to the admin UI:

open "http://$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' rethinkdb):8080"


Last modified January 1, 0001