Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Before you run the example make sure local redis state store is running by executing:

docker ps
  1. To run the example we need to first build the examples using the following command:
cargo build --examples
  1. Insert a key with the value hello to redis using the following command:
docker exec dapr_redis redis-cli MSET hello "world"
  1. Run the example with dapr using the following command:
dapr run --app-id=rustapp --resources-path ../components --dapr-grpc-port 50001 -- cargo run --example configuration
  1. Change the value of the key hello in redis using the following command:
docker exec dapr_redis redis-cli MSET hello "world2"

If everything went well you should see the following output along with dapr logs:

Configuration value: ConfigurationItem { value: "world", version: "", metadata: {} }
App subscribed to config changes with subscription id: "d383169a-0893-4c64-adde-fc3145b56d07" 
Configuration value: {"hello": ConfigurationItem { value: "world2", version: "", metadata: {} }}
App unsubscribed from config changes