Merge branch 'v1.10' of github.com:dapr/docs into bulksubscribe_doc

This commit is contained in:
Deepanshu Agarwal 2023-02-02 16:08:54 +05:30
commit d38f90fba7
53 changed files with 1957 additions and 503 deletions

View File

@ -37,3 +37,10 @@ Dapr provides a way to determine its health using an [HTTP `/healthz` endpoint](
- Determined for readiness and liveness
Read more on about how to apply [dapr health checks]({{< ref sidecar-health >}}) to your application.
## Next steps
- [Learn more about resiliency]({{< ref resiliency-overview.md >}})
- Try out one of the Resiliency quickstarts:
- [Resiliency: Service-to-service]({{< ref resiliency-serviceinvo-quickstart.md >}})
- [Resiliency: State Management]({{< ref resiliency-state-quickstart.md >}})

View File

@ -6,17 +6,40 @@ weight: 1000
description: "Overview of the configuration API building block"
---
## Introduction
Consuming application configuration is a common task when writing applications. Frequently, configuration stores are used to manage this configuration data. A configuration item is often dynamic in nature and tightly coupled to the needs of the application that consumes it.
Consuming application configuration is a common task when writing applications and frequently configuration stores are used to manage this configuration data. A configuration item is often dynamic in nature and is tightly coupled to the needs of the application that consumes it. For example, common uses for application configuration include names of secrets, different identifiers, partition or consumer IDs, names of databases to connect to etc. These configuration items are typically stored as key/value items in a state store or database. Application configuration can be changed by either developers or operators at runtime and the developer needs to be notified of these changes in order to take the required action and load the new configuration. Also configuration data is typically read only from the application API perspective, with updates to the configuration store made through operator tooling. Dapr's configuration API allows developers to consume configuration items that are returned as read only key/value pairs and subscribe to changes whenever a configuration item changes.
For example, application configuration can include:
- Names of secrets
- Different identifiers
- Partition or consumer IDs
- Names of databases to connect to, etc
Usually, configuration items are stored as key/value items in a state store or database. Developers or operators can change application configuration at runtime in the configuration store. Once changes are made, a service is notified to load the new configuration.
Configuration data is read-only from the application API perspective, with updates to the configuration store made through operator tooling. With Dapr's configuration API, you can:
- Consume configuration items that are returned as read-only key/value pairs
- Subscribe to changes whenever a configuration item changes
<img src="/images/configuration-api-overview.png" width=900>
It is worth noting that this configuration API should not be confused with the [Dapr sidecar and control plane configuration]({{<ref "configuration-overview">}}) which is used to set policies and settings on instances of Dapr sidecars or the installed Dapr control plane.
{{% alert title="Note" color="primary" %}}
The Configuration API should not be confused with the [Dapr sidecar and control plane configuration]({{< ref "configuration-overview" >}}), which is used to set policies and settings on Dapr sidecar instances or the installed Dapr control plane.
{{% /alert %}}
*This API is currently in `Alpha` state*
## Try out configuration
### Quickstart
Want to put the Dapr configuration API to the test? Walk through the following quickstart to see the configuration API in action:
| Quickstart | Description |
| ---------- | ----------- |
| [Configuration quickstart]({{< ref configuration-quickstart.md >}}) | Get configuration items or subscribe to configuration changes using the configuration API. |
### Start using the configuration API directly in your app
Want to skip the quickstarts? Not a problem. You can try out the configuration building block directly in your application to read and manage configuration data. After [Dapr is installed]({{< ref "getting-started/_index.md" >}}), you can begin using the configuration API starting with [the configuration how-to guide]({{< ref howto-manage-configuration.md >}}).
## Features
## Next steps
Follow these guides on:

View File

@ -8,12 +8,13 @@ description: "Learn how to get application configuration and subscribe for chang
This example uses the Redis configuration store component to demonstrate how to retrieve a configuration item.
<img src="/images/building-block-configuration-example.png" width=1000 alt="Diagram showing get configuration of example service">
{{% alert title="Note" color="primary" %}}
This API is currently in `Alpha` state and only available on gRPC. An HTTP1.1 supported version with this URL syntax `/v1.0/configuration` will be available before the API is certified into `Stable` state.
If you haven't already, [try out the configuration quickstart]({{< ref configuration-quickstart.md >}}) for a quick walk-through on how to use the configuration API.
{{% /alert %}}
<img src="/images/building-block-configuration-example.png" width=1000 alt="Diagram showing get configuration of example service">
## Create a configuration item in store
@ -68,7 +69,7 @@ spec:
## Retrieve Configuration Items
### Get configuration items using Dapr SDKs
{{< tabs Dotnet Java Python>}}
{{< tabs ".NET" Java Python>}}
{{% codetab %}}

View File

@ -18,7 +18,7 @@ There are two scenarios for how tracing is used:
1. Dapr generates the trace context and you propagate the trace context to another service.
2. You generate the trace context and Dapr propagates the trace context to a service.
### Propogating sequential service calls
### Propagating sequential service calls
Dapr takes care of creating the trace headers. However, when there are more than two services, you're responsible for propagating the trace headers between them. Let's go through the scenarios with examples:
@ -45,7 +45,7 @@ There are no helper methods exposed in Dapr SDKs to propagate and retrieve trace
4. Pub/sub messages
Dapr generates the trace headers in the published message topic. These trace headers are propagated to any services listening on that topic.
### Propogating multiple different service calls
### Propagating multiple different service calls
In the following scenarios, Dapr does some of the work for you and you need to either create or propagate trace headers.
@ -115,4 +115,4 @@ In the gRPC API calls, trace context is passed through `grpc-trace-bin` header.
- [Observability concepts]({{< ref observability-concept.md >}})
- [W3C Trace Context for distributed tracing]({{< ref w3c-tracing-overview >}})
- [W3C Trace Context specification](https://www.w3.org/TR/trace-context/)
- [Observability quickstart](https://github.com/dapr/quickstarts/tree/master/tutorials/observability)
- [Observability quickstart](https://github.com/dapr/quickstarts/tree/master/tutorials/observability)

View File

@ -1,7 +1,7 @@
---
type: docs
title: "Send and receive messages in bulk"
linkTitle: "Send and receive messages in bulk"
title: "Publish and subscribe to bulk messages"
linkTitle: "Publish and subscribe to bulk messages"
weight: 7100
description: "Learn how to use the bulk publish and subscribe APIs in Dapr."
---
@ -10,25 +10,19 @@ description: "Learn how to use the bulk publish and subscribe APIs in Dapr."
The bulk publish and subscribe APIs are in **alpha** stage.
{{% /alert %}}
With the bulk publish and subscribe APIs, you can send and receive multiple messages in a single request.
## Native bulk publish and subscribe support
When a pub/sub component supports the bulk publish/subscribe API natively, Dapr also publishes/subscribes messages to/from the underlying pub/sub component in bulk.
Otherwise, Dapr falls back to sending/receiving messages one by one to/from the underlying pub/sub component. This is still more efficient than using the regular publish/subscribe API, because applications can still send/receive multiple messages in a single request to/from Dapr.
## Supported components
Refer to the [component reference]({{< ref supported-pubsub >}}) to see which components support the bulk publish API natively.
With the bulk publish and subscribe APIs, you can publish and subscribe to multiple messages in a single request. When writing applications that need to send or receive a large number of messages, using bulk operations allows achieving high throughput by reducing the overall number of requests between the Dapr sidecar, the application, and the underlying pub/sub broker.
## Publishing messages in bulk
The bulk publish API allows you to publish multiple messages to a topic in a single request. If any of the messages fail to publish, the bulk publish operation returns a list of failed messages. Note, the bulk publish operation does not guarantee the order of messages.
### Restrictions when publishing messages in bulk
The bulk publish API allows you to publish multiple messages to a topic in a single request. It is *non-transactional*, i.e., from a single bulk request, some messages can succeed and some can fail. If any of the messages fail to publish, the bulk publish operation returns a list of failed messages.
The bulk publish operation also does not guarantee any ordering of messages.
### Example
{{< tabs Java Javascript "HTTP API (Bash)" "HTTP API (PowerShell)" >}}
{{< tabs Java Javascript Dotnet Python Go "HTTP API (Bash)" "HTTP API (PowerShell)" >}}
{{% codetab %}}
@ -41,6 +35,9 @@ import java.util.ArrayList;
import java.util.List;
class BulkPublisher {
private static final String PUBSUB_NAME = "my-pubsub-name";
private static final String TOPIC_NAME = "topic-a";
public void publishMessages() {
try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient()) {
// Create a list of messages to publish
@ -112,19 +109,134 @@ start().catch((e) => {
{{% codetab %}}
```csharp
using System;
using System.Collections.Generic;
using Dapr.Client;
const string PubsubName = "my-pubsub-name";
const string TopicName = "topic-a";
IReadOnlyList<object> BulkPublishData = new List<object>() {
new { Id = "17", Amount = 10m },
new { Id = "18", Amount = 20m },
new { Id = "19", Amount = 30m }
};
using var client = new DaprClientBuilder().Build();
var res = await client.BulkPublishEventAsync(PubsubName, TopicName, BulkPublishData);
if (res == null) {
throw new Exception("null response from dapr");
}
if (res.FailedEntries.Count > 0)
{
Console.WriteLine("Some events failed to be published!");
foreach (var failedEntry in res.FailedEntries)
{
Console.WriteLine("EntryId: " + failedEntry.Entry.EntryId + " Error message: " +
failedEntry.ErrorMessage);
}
}
else
{
Console.WriteLine("Published all events!");
}
```
{{% /codetab %}}
{{% codetab %}}
```python
import requests
import json
base_url = "http://localhost:3500/v1.0-alpha1/publish/bulk/{}/{}"
pubsub_name = "my-pubsub-name"
topic_name = "topic-a"
payload = [
{
"entryId": "ae6bf7c6-4af2-11ed-b878-0242ac120002",
"event": "first text message",
"contentType": "text/plain"
},
{
"entryId": "b1f40bd6-4af2-11ed-b878-0242ac120002",
"event": {
"message": "second JSON message"
},
"contentType": "application/json"
}
]
response = requests.post(base_url.format(pubsub_name, topic_name), json=payload)
print(response.status_code)
```
{{% /codetab %}}
{{% codetab %}}
```go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
const (
pubsubName = "my-pubsub-name"
topicName = "topic-a"
baseUrl = "http://localhost:3500/v1.0-alpha1/publish/bulk/%s/%s"
)
func main() {
url := fmt.Sprintf(baseUrl, pubsubName, topicName)
method := "POST"
payload := strings.NewReader(`[
{
"entryId": "ae6bf7c6-4af2-11ed-b878-0242ac120002",
"event": "first text message",
"contentType": "text/plain"
},
{
"entryId": "b1f40bd6-4af2-11ed-b878-0242ac120002",
"event": {
"message": "second JSON message"
},
"contentType": "application/json"
}
]`)
client := &http.Client {}
req, _ := http.NewRequest(method, url, payload)
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
// ...
}
```
{{% /codetab %}}
{{% codetab %}}
```bash
curl -X POST http://localhost:3500/v1.0-alpha1/publish/bulk/my-pubsub-name/topic-a \
-H 'Content-Type: application/json' \
-d '[
{
"entryId": "ae6bf7c6-4af2-11ed-b878-0242ac120002",
"event": "first",
"event": "first text message",
"contentType": "text/plain"
},
{
"entryId": "b1f40bd6-4af2-11ed-b878-0242ac120002",
"event": {
"message": "second"
"message": "second JSON message"
},
"contentType": "application/json"
},
@ -140,13 +252,13 @@ Invoke-RestMethod -Method Post -ContentType 'application/json' -Uri 'http://loca
-Body '[
{
"entryId": "ae6bf7c6-4af2-11ed-b878-0242ac120002",
"event": "first",
"event": "first text message",
"contentType": "text/plain"
},
{
"entryId": "b1f40bd6-4af2-11ed-b878-0242ac120002",
"event": {
"message": "second"
"message": "second JSON message"
},
"contentType": "application/json"
},
@ -278,6 +390,15 @@ async function start() {
{{% codetab %}}
{{< /tabs >}}
## How components handle publishing and subscribing to bulk messages
Some pub/sub brokers support sending and receiving multiple messages in a single request. When a component supports bulk publish or subscribe operations, Dapr runtime uses them to further optimize the communication between the Dapr sidecar and the underlying pub/sub broker.
For components that do not have bulk publish or subscribe support, Dapr runtime uses the regular publish and subscribe APIs to send and receive messages one by one. This is still more efficient than directly using the regular publish or subscribe APIs, because applications can still send/receive multiple messages in a single request to/from Dapr.
## Supported components
Refer to the [component reference]({{< ref supported-pubsub >}}) to see which components support bulk publish and subscribe operations.
## Related links

View File

@ -119,9 +119,9 @@ By default, all topic messages associated with an instance of a pub/sub componen
Dapr can set a timeout message on a per-message basis, meaning that if the message is not read from the pub/sub component, then the message is discarded. This timeout message prevents a build up of unread messages. If a message has been in the queue longer than the configured TTL, it is marked as dead. For more information, read [pub/sub message TTL]({{< ref pubsub-message-ttl.md >}}).
### Send and receive messages in bulk
### Publish and subscribe to bulk messages
Dapr supports sending and receiving multiple messages in a single request. This is useful for applications that require a high throughput. For more information, read [pub/sub bulk messages]({{< ref pubsub-bulk.md >}}).
Dapr supports sending and receiving multiple messages in a single request. When writing applications that need to send or receive a large number of messages, using bulk operations allows achieving high throughput by reducing the overall number of requests. For more information, read [pub/sub bulk messages]({{< ref pubsub-bulk.md >}}).
## Try out pub/sub

View File

@ -191,25 +191,24 @@ using System.Threading;
//code
namespace EventService
{
class Program
{
static async Task Main(string[] args)
{
while(true) {
System.Threading.Thread.Sleep(5000);
Random random = new Random();
int orderId = random.Next(1,1000);
CancellationTokenSource source = new CancellationTokenSource();
CancellationToken cancellationToken = source.Token;
using var client = new DaprClientBuilder().Build();
//Using Dapr SDK to invoke a method
var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "checkout", "checkout/" + orderId, cancellationToken);
await client.InvokeMethodAsync(result);
Console.WriteLine("Order requested: " + orderId);
Console.WriteLine("Result: " + result);
}
}
}
class Program
{
static async Task Main(string[] args)
{
while(true) {
System.Threading.Thread.Sleep(5000);
Random random = new Random();
int orderId = random.Next(1,1000);
using var client = new DaprClientBuilder().Build();
//Using Dapr SDK to invoke a method
var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "checkout", "checkout/" + orderId);
await client.InvokeMethodAsync(result);
Console.WriteLine("Order requested: " + orderId);
Console.WriteLine("Result: " + result);
}
}
}
}
```

View File

@ -16,7 +16,7 @@ Even though the state store is a key/value store, the `value` might be a JSON do
## Querying the state
Submit query requests via HTTP POST/PUT or gRPC. The body of the request is the JSON map with 3 _optional_ entries:
Submit query requests via HTTP POST/PUT or gRPC. The body of the request is the JSON map with 3 entries:
- `filter`
- `sort`

View File

@ -188,6 +188,7 @@ Available Commands:
stop Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted
uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes
version Print the Dapr runtime and CLI version
Flags:
-h, --help help for dapr

View File

@ -27,4 +27,5 @@ Hit the ground running with our Dapr quickstarts, complete with code samples aim
| [State Management]({{< ref statemanagement-quickstart.md >}}) | Store a service's data as key/value pairs in supported state stores. |
| [Bindings]({{< ref bindings-quickstart.md >}}) | Work with external systems using input bindings to respond to events and output bindings to call operations. |
| [Secrets Management]({{< ref secrets-quickstart.md >}}) | Securely fetch secrets. |
| [Configuration]({{< ref configuration-quickstart.md >}}) | Get configuration items and subscribe for configuration updates. |
| [Resiliency]({{< ref resiliency >}}) | Define and apply fault-tolerance policies to your Dapr API requests. |

View File

@ -46,7 +46,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c
In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following command to set up the container:
@ -73,7 +73,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
In a new terminal window, navigate to the SDK directory.
```bash
cd quickstarts/bindings/python/sdk/batch
cd bindings/python/sdk/batch
```
Install the dependencies:
@ -137,7 +137,7 @@ Your output binding's `print` statement output:
In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following to start the interactive Postgres CLI:
@ -253,7 +253,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c
In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following command to set up the container:
@ -280,7 +280,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
In a new terminal window, navigate to the SDK directory.
```bash
cd quickstarts/bindings/javascript/sdk/batch
cd bindings/javascript/sdk/batch
```
Install the dependencies:
@ -339,7 +339,7 @@ Your output binding's `print` statement output:
In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following to start the interactive Postgres CLI:
@ -455,7 +455,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c
In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following command to set up the container:
@ -482,7 +482,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
In a new terminal window, navigate to the SDK directory.
```bash
cd quickstarts/bindings/csharp/sdk/batch
cd bindings/csharp/sdk/batch
```
Install the dependencies:
@ -543,7 +543,7 @@ Your output binding's `print` statement output:
In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following to start the interactive Postgres CLI:
@ -662,7 +662,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c
In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following command to set up the container:
@ -689,7 +689,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
In a new terminal window, navigate to the SDK directory.
```bash
cd quickstarts/bindings/java/sdk/batch
cd bindings/java/sdk/batch
```
Install the dependencies:
@ -753,7 +753,7 @@ Your output binding's `print` statement output:
In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following to start the interactive Postgres CLI:
@ -869,7 +869,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c
In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following command to set up the container:
@ -896,7 +896,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
In a new terminal window, navigate to the SDK directory.
```bash
cd quickstarts/bindings/go/sdk/batch
cd bindings/go/sdk/batch
```
Install the dependencies:
@ -965,7 +965,7 @@ Your output binding's `print` statement output:
In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory.
```bash
cd quickstarts/bindings/db
cd bindings/db
```
Run the following to start the interactive Postgres CLI:

View File

@ -0,0 +1,639 @@
---
type: docs
title: "Quickstart: Configuration"
linkTitle: Configuration
weight: 76
description: Get started with Dapr's Configuration building block
---
Let's take a look at Dapr's [Configuration building block]({{< ref configuration-api-overview.md >}}). A configuration item is often dynamic in nature and tightly coupled to the needs of the application that consumes it. Configuration items are key/value pairs containing configuration data, such as:
- App ids
- Partition keys
- Database names, etc
In this quickstart, you'll run an `order-processor` microservice that utilizes the Configuration API. The service:
1. Gets configuration items from the configuration store.
1. Subscribes for configuration updates.
<img src="/images/configuration-quickstart/configuration-quickstart-flow.png" width=1000 alt="Diagram that demonstrates the flow of the configuration API quickstart with key/value pairs used.">
Select your preferred language-specific Dapr SDK before proceeding with the Quickstart.
{{< tabs "Python" "JavaScript" ".NET" "Java" "Go" >}}
<!-- Python -->
{{% codetab %}}
### Pre-requisites
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- [Python 3.7+ installed](https://www.python.org/downloads/).
<!-- IGNORE_LINKS -->
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
<!-- END_IGNORE -->
### Step 1: Set up the environment
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration).
```bash
git clone https://github.com/dapr/quickstarts.git
```
Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`.
```bash
docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102"
```
### Step 2: Run the `order-processor` service
From the root of the Quickstarts clone directory, navigate to the `order-processor` directory.
```bash
cd configuration/python/sdk/order-processor
```
Install the dependencies:
```bash
pip3 install -r requirements.txt
```
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-id order-processor --components-path ../../../components/ --app-port 6001 -- python3 app.py
```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
The expected output:
```
== APP == Configuration for orderId1 : value: "101"
== APP ==
== APP == Configuration for orderId2 : value: "102"
== APP ==
== APP == App unsubscribed from config changes
```
### (Optional) Step 3: Update configuration item values
Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command:
```bash
docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104"
```
Run the `order-processor` service again:
```bash
dapr run --app-id order-processor --components-path ../../../components/ --app-port 6001 -- python3 app.py
```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
The app will return the updated configuration values:
```
== APP == Configuration for orderId1 : value: "103"
== APP ==
== APP == Configuration for orderId2 : value: "104"
== APP ==
```
### The `order-processor` service
The `order-processor` service includes code for:
- Getting the configuration items from the config store
- Subscribing to configuration updates (which you made in the CLI earlier)
- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity.
Get configuration items:
```python
# Get config items from the config store
for config_item in CONFIGURATION_ITEMS:
config = client.get_configuration(store_name=DAPR_CONFIGURATION_STORE, keys=[config_item], config_metadata={})
print(f"Configuration for {config_item} : {config.items[config_item]}", flush=True)
```
Subscribe to configuration updates:
```python
# Subscribe for configuration changes
configuration = await client.subscribe_configuration(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS)
```
Unsubscribe from configuration updates and exit the application:
```python
# Unsubscribe from configuration updates
unsubscribed = True
for config_item in CONFIGURATION_ITEMS:
unsub_item = client.unsubscribe_configuration(DAPR_CONFIGURATION_STORE, config_item)
#...
if unsubscribed == True:
print("App unsubscribed from config changes", flush=True)
```
{{% /codetab %}}
<!-- JavaScript -->
{{% codetab %}}
### Pre-requisites
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- [Python 3.7+ installed](https://www.python.org/downloads/).
<!-- IGNORE_LINKS -->
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
<!-- END_IGNORE -->
### Step 1: Set up the environment
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration).
```bash
git clone https://github.com/dapr/quickstarts.git
```
Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`.
```bash
docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102"
```
### Step 2: Run the `order-processor` service
From the root of the Quickstarts clone directory, navigate to the `order-processor` directory.
```bash
cd configuration/javascript/sdk/order-processor
```
Install the dependencies:
```bash
npm install
```
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-id order-processor --components-path ../../../components/ --app-protocol grpc --dapr-grpc-port 3500 -- node index.js
```
The expected output:
```
== APP == Configuration for orderId1: {"key":"orderId1","value":"101","version":"","metadata":{}}
== APP == Configuration for orderId2: {"key":"orderId2","value":"102","version":"","metadata":{}}
== APP == App unsubscribed to config changes
```
### (Optional) Step 3: Update configuration item values
Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command:
```bash
docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104"
```
Run the `order-processor` service again:
```bash
dapr run --app-id order-processor --components-path ../../../components/ --app-protocol grpc --dapr-grpc-port 3500 -- node index.js
```
The app will return the updated configuration values:
```
== APP == Configuration for orderId1: {"key":"orderId1","value":"103","version":"","metadata":{}}
== APP == Configuration for orderId2: {"key":"orderId2","value":"104","version":"","metadata":{}}
```
### The `order-processor` service
The `order-processor` service includes code for:
- Getting the configuration items from the config store
- Subscribing to configuration updates (which you made in the CLI earlier)
- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity.
Get configuration items:
```javascript
// Get config items from the config store
//...
const config = await client.configuration.get(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS);
Object.keys(config.items).forEach((key) => {
console.log("Configuration for " + key + ":", JSON.stringify(config.items[key]));
});
```
Subscribe to configuration updates:
```javascript
// Subscribe to config updates
try {
const stream = await client.configuration.subscribeWithKeys(
DAPR_CONFIGURATION_STORE,
CONFIGURATION_ITEMS,
(config) => {
console.log("Configuration update", JSON.stringify(config.items));
}
);
```
Unsubscribe from configuration updates and exit the application:
```javascript
// Unsubscribe to config updates and exit app after 20 seconds
setTimeout(() => {
stream.stop();
console.log("App unsubscribed to config changes");
process.exit(0);
},
```
{{% /codetab %}}
<!-- .NET -->
{{% codetab %}}
### Pre-requisites
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- [.NET SDK or .NET 6 SDK installed](https://dotnet.microsoft.com/download).
<!-- IGNORE_LINKS -->
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
<!-- END_IGNORE -->
### Step 1: Set up the environment
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration).
```bash
git clone https://github.com/dapr/quickstarts.git
```
Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`.
```bash
docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102"
```
### Step 2: Run the `order-processor` service
From the root of the Quickstarts clone directory, navigate to the `order-processor` directory.
```bash
cd configuration/csharp/sdk/order-processor
```
Recall NuGet packages:
```bash
dotnet restore
dotnet build
```
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 7001 -- dotnet run --project .
```
The expected output:
```
== APP == Configuration for orderId1: {"Value":"101","Version":"","Metadata":{}}
== APP == Configuration for orderId2: {"Value":"102","Version":"","Metadata":{}}
== APP == App unsubscribed from config changes
```
### (Optional) Step 3: Update configuration item values
Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command:
```bash
docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104"
```
Run the `order-processor` service again:
```bash
dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 7001 -- dotnet run --project .
```
The app will return the updated configuration values:
```
== APP == Configuration for orderId1: {"Value":"103","Version":"","Metadata":{}}
== APP == Configuration for orderId2: {"Value":"104","Version":"","Metadata":{}}
```
### The `order-processor` service
The `order-processor` service includes code for:
- Getting the configuration items from the config store
- Subscribing to configuration updates (which you made in the CLI earlier)
- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity.
Get configuration items:
```csharp
// Get config from configuration store
GetConfigurationResponse config = await client.GetConfiguration(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS);
foreach (var item in config.Items)
{
var cfg = System.Text.Json.JsonSerializer.Serialize(item.Value);
Console.WriteLine("Configuration for " + item.Key + ": " + cfg);
}
```
Subscribe to configuration updates:
```csharp
// Subscribe to config updates
SubscribeConfigurationResponse subscribe = await client.SubscribeConfiguration(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS);
```
Unsubscribe from configuration updates and exit the application:
```csharp
// Unsubscribe to config updates and exit the app
try
{
client.UnsubscribeConfiguration(DAPR_CONFIGURATION_STORE, subscriptionId);
Console.WriteLine("App unsubscribed from config changes");
Environment.Exit(0);
}
```
{{% /codetab %}}
<!-- Java -->
{{% codetab %}}
### Pre-requisites
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- Java JDK 11 (or greater):
- [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or
- OpenJDK
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
<!-- IGNORE_LINKS -->
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
<!-- END_IGNORE -->
### Step 1: Set up the environment
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration).
```bash
git clone https://github.com/dapr/quickstarts.git
```
Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`.
```bash
docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102"
```
### Step 2: Run the `order-processor` service
From the root of the Quickstarts clone directory, navigate to the `order-processor` directory.
```bash
cd configuration/java/sdk/order-processor
```
Install the dependencies:
```bash
mvn clean install
```
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
The expected output:
```
== APP == Configuration for orderId1: {'value':'101'}
== APP == Configuration for orderId2: {'value':'102'}
== APP == App unsubscribed to config changes
```
### (Optional) Step 3: Update configuration item values
Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command:
```bash
docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104"
```
Run the `order-processor` service again:
```bash
dapr run --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
The app will return the updated configuration values:
```
== APP == Configuration for orderId1: {'value':'103'}
== APP == Configuration for orderId2: {'value':'104'}
```
### The `order-processor` service
The `order-processor` service includes code for:
- Getting the configuration items from the config store
- Subscribing to configuration updates (which you made in the CLI earlier)
- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity.
Get configuration items:
```java
// Get config items from the config store
try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient()) {
for (String configurationItem : CONFIGURATION_ITEMS) {
ConfigurationItem item = client.getConfiguration(DAPR_CONFIGURATON_STORE, configurationItem).block();
System.out.println("Configuration for " + configurationItem + ": {'value':'" + item.getValue() + "'}");
}
```
Subscribe to configuration updates:
```java
// Subscribe for config changes
Flux<SubscribeConfigurationResponse> subscription = client.subscribeConfiguration(DAPR_CONFIGURATON_STORE,
CONFIGURATION_ITEMS.toArray(String[]::new));
```
Unsubscribe from configuration updates and exit the application:
```java
// Unsubscribe from config changes
UnsubscribeConfigurationResponse unsubscribe = client
.unsubscribeConfiguration(subscriptionId, DAPR_CONFIGURATON_STORE).block();
if (unsubscribe.getIsUnsubscribed()) {
System.out.println("App unsubscribed to config changes");
}
```
{{% /codetab %}}
<!-- Go -->
{{% codetab %}}
### Pre-requisites
For this example, you will need:
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
- [Latest version of Go](https://go.dev/dl/).
<!-- IGNORE_LINKS -->
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
<!-- END_IGNORE -->
### Step 1: Set up the environment
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration).
```bash
git clone https://github.com/dapr/quickstarts.git
```
Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`.
```bash
docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102"
```
### Step 2: Run the `order-processor` service
From the root of the Quickstarts clone directory, navigate to the `order-processor` directory.
```bash
cd configuration/go/sdk/order-processor
```
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-id order-processor --app-port 6001 --components-path ../../../components -- go run .
```
The expected output:
```
== APP == Configuration for orderId1: {"Value":"101","Version":"","Metadata":null}
== APP == Configuration for orderId2: {"Value":"102","Version":"","Metadata":null}
== APP == dapr configuration subscribe finished.
== APP == App unsubscribed to config changes
```
### (Optional) Step 3: Update configuration item values
Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command:
```bash
docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104"
```
Run the `order-processor` service again:
```bash
dapr run --app-id order-processor --app-port 6001 --components-path ../../../components -- go run .
```
The app will return the updated configuration values:
```
== APP == Configuration for orderId1: {"Value":"103","Version":"","Metadata":null}
== APP == Configuration for orderId2: {"Value":"104","Version":"","Metadata":null}
```
### The `order-processor` service
The `order-processor` service includes code for:
- Getting the configuration items from the config store
- Subscribing to configuration updates (which you made in the CLI earlier)
- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity.
Get configuration items:
```go
// Get config items from config store
for _, item := range CONFIGURATION_ITEMS {
config, err := client.GetConfigurationItem(ctx, DAPR_CONFIGURATION_STORE, item)
//...
c, _ := json.Marshal(config)
fmt.Println("Configuration for " + item + ": " + string(c))
}
```
Subscribe to configuration updates:
```go
// Subscribe for config changes
err = client.SubscribeConfigurationItems(ctx, DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS, func(id string, config map[string]*dapr.ConfigurationItem) {
// First invocation when app subscribes to config changes only returns subscription id
if len(config) == 0 {
fmt.Println("App subscribed to config changes with subscription id: " + id)
subscriptionId = id
return
}
})
```
Unsubscribe from configuration updates and exit the application:
```go
// Unsubscribe to config updates and exit app after 20 seconds
select {
case <-ctx.Done():
err = client.UnsubscribeConfigurationItems(context.Background(), DAPR_CONFIGURATION_STORE, subscriptionId)
//...
{
fmt.Println("App unsubscribed to config changes")
}
```
{{% /codetab %}}
{{< /tabs >}}
## Tell us what you think!
We're continuously working to improve our Quickstart examples and value your feedback. Did you find this quickstart helpful? Do you have suggestions for improvement?
Join the discussion in our [discord channel](https://discord.com/channels/778680217417809931/953427615916638238).
## Next steps
- Use Dapr Configuration with HTTP instead of an SDK.
- [Python](https://github.com/dapr/quickstarts/tree/master/configuration/python/http)
- [JavaScript](https://github.com/dapr/quickstarts/tree/master/configuration/javascript/http)
- [.NET](https://github.com/dapr/quickstarts/tree/master/configuration/csharp/http)
- [Java](https://github.com/dapr/quickstarts/tree/master/configuration/java/http)
- [Go](https://github.com/dapr/quickstarts/tree/master/configuration/go/http)
- Learn more about [Configuration building block]({{< ref configuration-api-overview >}})
{{< button text="Explore Dapr tutorials >>" page="getting-started/tutorials/_index.md" >}}

View File

@ -6,10 +6,6 @@ weight: 120
description: "Get started with Dapr's resiliency capabilities via the service invocation API"
---
{{% alert title="Note" color="primary" %}}
Resiliency is currently a preview feature.
{{% /alert %}}
Observe Dapr resiliency capabilities by simulating a system failure. In this Quickstart, you will:
- Run two microservice applications: `checkout` and `order-processor`. `checkout` will continuously make Dapr service invocation requests to `order-processor`.
@ -59,10 +55,10 @@ pip3 install -r requirements.txt
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-port 8001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- python3 app.py
dapr run --app-port 8001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- python3 app.py
```
### Step 3: Run the `checkout` service application with resiliency enabled
### Step 3: Run the `checkout` service application
In a new terminal window, from the root of the Quickstart directory, navigate to the `checkout` directory.
@ -76,13 +72,13 @@ Install dependencies:
pip3 install -r requirements.txt
```
Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature.
Run the `checkout` service alongside a Dapr sidecar.
```bash
dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- python3 app.py
dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- python3 app.py
```
By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar:
The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -287,10 +283,10 @@ npm install
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-port 5001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- npm start
dapr run --app-port 5001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- npm start
```
### Step 3: Run the `checkout` service application with resiliency enabled
### Step 3: Run the `checkout` service application
In a new terminal window, from the root of the Quickstart directory,
navigate to the `checkout` directory.
@ -305,13 +301,14 @@ Install dependencies:
npm install
```
Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature.
Run the `checkout` service alongside a Dapr sidecar.
```bash
dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- npm start
dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- npm start
```
By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar:
The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -450,7 +447,7 @@ Once you restart the `order-processor` service, the application will recover sea
In the `order-processor` service terminal, restart the application:
```bash
dapr run --app-port 5001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- npm start
dapr run --app-port 5001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- npm start
```
`checkout` service output:
@ -518,10 +515,10 @@ dotnet build
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-port 7001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- dotnet run
dapr run --app-port 7001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- dotnet run
```
### Step 3: Run the `checkout` service application with resiliency enabled
### Step 3: Run the `checkout` service application
In a new terminal window, from the root of the Quickstart directory,
navigate to the `checkout` directory.
@ -537,13 +534,13 @@ dotnet restore
dotnet build
```
Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature.
Run the `checkout` service alongside a Dapr sidecar.
```bash
dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- dotnet run
dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- dotnet run
```
By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar:
The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -751,10 +748,10 @@ mvn clean install
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id order-processor --resources-path ../../../resources/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
### Step 3: Run the `checkout` service application with resiliency enabled
### Step 3: Run the `checkout` service application
In a new terminal window, from the root of the Quickstart directory,
navigate to the `checkout` directory.
@ -769,13 +766,14 @@ Install dependencies:
mvn clean install
```
Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature.
Run the `checkout` service alongside a Dapr sidecar.
```bash
dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
```
By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar:
The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -914,7 +912,7 @@ Once you restart the `order-processor` service, the application will recover sea
In the `order-processor` service terminal, restart the application:
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id order-processor --resources-path ../../../resources/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
`checkout` service output:
@ -980,10 +978,10 @@ go build .
Run the `order-processor` service alongside a Dapr sidecar.
```bash
dapr run --app-port 6001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- go run .
dapr run --app-port 6001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- go run .
```
### Step 3: Run the `checkout` service application with resiliency enabled
### Step 3: Run the `checkout` service application
In a new terminal window, from the root of the Quickstart directory,
navigate to the `checkout` directory.
@ -998,13 +996,14 @@ Install dependencies:
go build .
```
Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature.
Run the `checkout` service alongside a Dapr sidecar.
```bash
dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- go run .
dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- go run .
```
By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar:
The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -1143,7 +1142,7 @@ Once you restart the `order-processor` service, the application will recover sea
In the `order-processor` service terminal, restart the application:
```bash
dapr run --app-port 6001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- go run .
dapr run --app-port 6001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- go run .
```
`checkout` service output:

View File

@ -6,13 +6,9 @@ weight: 110
description: "Get started with Dapr's resiliency capabilities via the state management API"
---
{{% alert title="Note" color="primary" %}}
Resiliency is currently a preview feature.
{{% /alert %}}
Observe Dapr resiliency capabilities by simulating a system failure. In this Quickstart, you will:
- Execute a microservice application with resiliency enabled that continuously persists and retrieves state via Dapr's state management API.
- Execute a microservice application that continuously persists and retrieves state via Dapr's state management API.
- Trigger resiliency policies by simulating a system failure.
- Resolve the failure and the microservice application will resume.
@ -54,9 +50,10 @@ Install dependencies
pip3 install -r requirements.txt
```
### Step 2: Run the application with resiliency enabled
### Step 2: Run the application
Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory:
Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is:
```yaml
apiVersion: dapr.io/v1alpha1
@ -89,7 +86,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- python3
dapr run --app-id order-processor --resources-path ../../../resources/ -- python3
```
Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}).
@ -132,7 +129,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r
INFO[0006] Error processing operation component[statestore] output. Retrying...
```
As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
```yaml
retryForever:
@ -223,9 +220,10 @@ Install dependencies
npm install
```
### Step 2: Run the application with resiliency enabled
### Step 2: Run the application
Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory:
Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is:
```yaml
apiVersion: dapr.io/v1alpha1
@ -257,7 +255,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co
```
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- npm start
dapr run --app-id order-processor --resources-path ../../../resources/ -- npm start
```
Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}).
@ -300,7 +298,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r
INFO[0006] Error processing operation component[statestore] output. Retrying...
```
As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
```yaml
retryForever:
@ -392,9 +390,9 @@ dotnet restore
dotnet build
```
### Step 2: Run the application with resiliency enabled
### Step 2: Run the application
Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is:
Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -426,7 +424,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co
```
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- dotnet run
dapr run --app-id order-processor --resources-path ../../../resources/ -- dotnet run
```
Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}).
@ -469,7 +467,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r
INFO[0006] Error processing operation component[statestore] output. Retrying...
```
As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
```yaml
retryForever:
@ -563,9 +561,9 @@ Install dependencies
mvn clean install
```
### Step 2: Run the application with resiliency enabled
### Step 2: Run the application
Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is:
Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -597,7 +595,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co
```
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id order-processor --resources-path ../../../resources/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}).
@ -640,7 +638,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r
INFO[0006] Error processing operation component[statestore] output. Retrying...
```
As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
```yaml
retryForever:
@ -731,9 +729,9 @@ Install dependencies
go build .
```
### Step 2: Run the application with resiliency enabled
### Step 2: Run the application
Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is:
Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory:
```yaml
apiVersion: dapr.io/v1alpha1
@ -765,7 +763,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co
```
```bash
dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components -- go run .
dapr run --app-id order-processor --resources-path ../../../resources -- go run .
```
Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}).
@ -808,7 +806,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r
INFO[0006] Error processing operation component[statestore] output. Retrying...
```
As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals.
```yaml
retryForever:

View File

@ -106,7 +106,7 @@ In the YAML file:
**`secrets.json` file**
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json):
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/python/sdk/order-processor/secrets.json):
```json
{
@ -328,7 +328,7 @@ In the YAML file:
**`secrets.json` file**
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/csharp/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json):
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/csharp/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/csharp/sdk/order-processor/secrets.json):
```json
{
@ -436,7 +436,7 @@ In the YAML file:
**`secrets.json` file**
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json):
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/java/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/java/sdk/order-processor/secrets.json):
```json
{
@ -543,7 +543,7 @@ In the YAML file:
**`secrets.json` file**
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json):
`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/go/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/go/sdk/order-processor/secrets.json):
```json
{

View File

@ -44,7 +44,7 @@ spec:
### Special metadata values
Metadata values can contain a `{uuid}` tag that is replaced with a randomly generate UUID when the Dapr sidecar starts up. A new UUID is generated on every start up. It can be used, for example, to have a pod on Kubernetes with multiple application instances consuming a [shared MQTT subscription]({{< ref "setup-mqtt.md" >}}). Below is an example of using the `{uuid}` tag.
Metadata values can contain a `{uuid}` tag that is replaced with a randomly generate UUID when the Dapr sidecar starts up. A new UUID is generated on every start up. It can be used, for example, to have a pod on Kubernetes with multiple application instances consuming a [shared MQTT subscription]({{< ref "setup-mqtt3.md" >}}). Below is an example of using the `{uuid}` tag.
```yaml
apiVersion: dapr.io/v1alpha1
@ -52,7 +52,7 @@ kind: Component
metadata:
name: messagebus
spec:
type: pubsub.mqtt
type: pubsub.mqtt3
version: v1
metadata:
- name: consumerID

View File

@ -57,7 +57,7 @@ Since you are running Dapr in the same host as the component, verify this folder
Define your component using a [component spec]({{< ref component-schema.md >}}). Your component's `type` is derived from the socket name, without the file extension.
Save the component YAML file in the components-path, replacing:
Save the component YAML file in the resources-path, replacing:
- `your_socket_goes_here` with your component socket name (no extension)
- `your_component_type` with your component type

View File

@ -48,6 +48,7 @@ The following configuration settings can be applied to Dapr application sidecars
- [Tracing](#tracing)
- [Metrics](#metrics)
- [Logging](#logging)
- [Middleware](#middleware)
- [Scope secret store access](#scope-secret-store-access)
- [Access Control allow lists for building block APIs](#access-control-allow-lists-for-building-block-apis)
@ -85,7 +86,7 @@ The following table lists the properties for tracing:
`samplingRate` is used to enable or disable the tracing. To disable the sampling rate ,
set `samplingRate : "0"` in the configuration. The valid range of samplingRate is between 0 and 1 inclusive. The sampling rate determines whether a trace span should be sampled or not based on value. `samplingRate : "1"` samples all traces. By default, the sampling rate is (0.0001) or 1 in 10,000 traces.
See [Observability distributed tracing]({{< ref "tracing-overview.md" >}}) for more information
See [Observability distributed tracing]({{< ref "tracing-overview.md" >}}) for more information.
#### Metrics
@ -104,7 +105,29 @@ The following table lists the properties for metrics:
|--------------|--------|-------------|
| `enabled` | boolean | Whether metrics should to be enabled.
See [metrics documentation]({{< ref "metrics-overview.md" >}}) for more information
See [metrics documentation]({{< ref "metrics-overview.md" >}}) for more information.
#### Logging
The logging section can be used to configure how logging works in the Dapr Runtime.
The `logging` section under the `Configuration` spec contains the following properties:
```yml
logging:
apiLogging:
enabled: false
omitHealthChecks: false
```
The following table lists the properties for logging:
| Property | Type | Description |
|--------------|--------|-------------|
| `apiLogging.enabled` | boolean | The default value for the `--enable-api-logging` flag for `daprd` (and the corresponding `dapr.io/enable-api-logging` annotation): the value set in the Configuration spec is used as default unless a `true` or `false` value is passed to each Dapr Runtime. Default: `false`.
| `apiLogging.omitHealthChecks` | boolean | If `true`, calls to health check endpoints (e.g. `/v1.0/healthz`) are not logged when API logging is enabled. This is useful if those calls are adding a lot of noise in your logs. Default: `false`
See [logging documentation]({{< ref "logs.md" >}}) for more information.
#### Middleware
@ -130,8 +153,8 @@ The following table lists the properties for HTTP handlers:
| Property | Type | Description |
|----------|--------|-------------|
| name | string | Name of the middleware component
| type | string | Type of middleware component
| `name` | string | Name of the middleware component
| `type` | string | Type of middleware component
See [Middleware pipelines]({{< ref "middleware.md" >}}) for more information

View File

@ -64,9 +64,11 @@ There are some scenarios where it's necessary to install Dapr from a private Hel
- having a custom Dapr deployment
- pulling Helm charts from trusted registries that are managed and maintained by your organization
```
export DAPR_HELM_REPO_URL="https://helm.custom-domain.com/dapr/dapr"
export DAPR_HELM_REPO_USERNAME="username_xxx"
export DAPR_HELM_REPO_PASSWORD="passwd_xxx"
```
Setting the above parameters will allow `dapr init -k` to install Dapr images from the configured Helm repository.

View File

@ -109,7 +109,9 @@ spec:
## API Logging
API logging enables you to see the API calls your application makes to the Dapr sidecar, to debug issues or monitor the behavior of your application. You can combine both Dapr API logging with Dapr log events. See [configure and view Dapr Logs]({{< ref "logs-troubleshooting.md" >}}) and [configure and view Dapr API Logs]({{< ref "api-logs-troubleshooting.md" >}}) for more information.
API logging enables you to see the API calls your application makes to the Dapr sidecar, to debug issues or monitor the behavior of your application. You can combine both Dapr API logging with Dapr log events.
See [configure and view Dapr Logs]({{< ref "logs-troubleshooting.md" >}}) and [configure and view Dapr API Logs]({{< ref "api-logs-troubleshooting.md" >}}) for more information.
## Log collectors

View File

@ -3,10 +3,10 @@ type: docs
title: "Policies"
linkTitle: "Policies"
weight: 4500
description: "Configure resiliency policies for timeouts, retries and circuit breakers"
description: "Configure resiliency policies for timeouts, retries, and circuit breakers"
---
You define timeouts, retries and circuit breaker policies under `policies`. Each policy is given a name so you can refer to them from the `targets` section in the resiliency spec.
Define timeouts, retries, and circuit breaker policies under `policies`. Each policy is given a name so you can refer to them from the `targets` section in the resiliency spec.
> Note: Dapr offers default retries for specific APIs. [See here]({{< ref "#override-default-retries" >}}) to learn how you can overwrite default retry logic with user defined retry policies.
@ -285,4 +285,10 @@ The table below is a break down of which policies are applied when attempting to
| statestore | DefaultStatestoreComponentOutboundRetryPolicy |
| actorstore | fastRetries |
| EventActor | retryForever |
| SummaryActor | DefaultActorRetryPolicy |
| SummaryActor | DefaultActorRetryPolicy |
## Next steps
Try out one of the Resiliency quickstarts:
- [Resiliency: Service-to-service]({{< ref resiliency-serviceinvo-quickstart.md >}})
- [Resiliency: State Management]({{< ref resiliency-state-quickstart.md >}})

View File

@ -5,11 +5,8 @@ linkTitle: "Overview"
weight: 4500
description: "Configure Dapr retries, timeouts, and circuit breakers"
---
{{% alert title="Note" color="primary" %}}
Resiliency is currently a preview feature. Before you can utilize a resiliency spec, you must first [enable the resiliency preview feature]({{< ref support-preview-features >}}).
{{% /alert %}}
Dapr provides a capability for defining and applying fault tolerance resiliency policies via a [resiliency spec]({{< ref "resiliency-overview.md#complete-example-policy" >}}). Resiliency specs are saved in the same location as components specs and are applied when the Dapr sidecar starts. The sidecar determines how to apply resiliency policies to your Dapr API calls. In self-hosted mode, the resiliency spec must be named `resiliency.yaml`. In Kubernetes Dapr finds the named resiliency specs used by your application. Within the resiliency spec, you can define policies for popular resiliency patterns, such as:
Dapr provides a capability for defining and applying fault tolerance resiliency policies via a [resiliency spec]({{< ref "resiliency-overview.md#complete-example-policy" >}}). Resiliency specs are saved in the same location as components specs and are applied when the Dapr sidecar starts. The sidecar determines how to apply resiliency policies to your Dapr API calls. In self-hosted mode, the resiliency spec must be named `resiliency.yaml`. In Kubernetes Dapr finds the named resiliency specs used by your application. Within the resiliency spec, you can define policies for popular resiliency patterns, such as:
- [Timeouts]({{< ref "policies.md#timeouts" >}})
- [Retries/back-offs]({{< ref "policies.md#retries" >}})
@ -171,3 +168,9 @@ Watch this video for how to use [resiliency](https://www.youtube.com/watch?t=184
- [Policies]({{< ref "policies.md" >}})
- [Targets]({{< ref "targets.md" >}})
## Next steps
Try out one of the Resiliency quickstarts:
- [Resiliency: Service-to-service]({{< ref resiliency-serviceinvo-quickstart.md >}})
- [Resiliency: State Management]({{< ref resiliency-state-quickstart.md >}})

View File

@ -7,6 +7,7 @@ description: "Apply resiliency policies to apps, components and actors"
---
### Targets
Named policies are applied to targets. Dapr supports three target types that apply all Dapr building block APIs:
- `apps`
- `components`
@ -129,4 +130,10 @@ spec:
circuitBreaker: general
circuitBreakerScope: both
circuitBreakerCacheSize: 5000
```
```
## Next steps
Try out one of the Resiliency quickstarts:
- [Resiliency: Service-to-service]({{< ref resiliency-serviceinvo-quickstart.md >}})
- [Resiliency: State Management]({{< ref resiliency-state-quickstart.md >}})

View File

@ -16,7 +16,6 @@ For CLI there is no explicit opt-in, just the version that this was first made a
| Feature | Description | Setting | Documentation | Version introduced |
| ---------- |-------------|---------|---------------|-----------------|
| **`--image-registry`** flag in Dapr CLI| In self hosted mode you can set this flag to specify any private registry to pull the container images required to install Dapr| N/A | [CLI init command reference]({{<ref "dapr-init.md#self-hosted-environment" >}}) | v1.7 |
| **Resiliency** | Allows configuring of fine-grained policies for retries, timeouts and circuitbreaking. | `Resiliency` | [Configure Resiliency Policies]({{<ref "resiliency-overview">}}) | v1.7|
| **App Middleware** | Allow middleware components to be executed when making service-to-service calls | N/A | [App Middleware]({{<ref "middleware.md#app-middleware" >}}) | v1.9 |
| **App health checks** | Allows configuring app health checks | `AppHealthCheck` | [App health checks]({{<ref "app-health.md" >}}) | v1.9 |
| **Pluggable components** | Allows creating self-hosted gRPC-based components written in any language that supports gRPC. The following component APIs are supported: State stores, Pub/sub, Bindings | N/A | [Pluggable components concept]({{<ref "components-concept#pluggable-components" >}})| v1.9 |

View File

@ -77,3 +77,37 @@ time="2022-03-16T18:32:02.917629403Z" level=info msg="HTTP API Called" method="P
time="2022-03-16T18:32:03.137830112Z" level=info msg="HTTP API Called" method="POST /v1.0/invoke/{id}/method/{method:*}" app_id=invoke-caller instance=invokecaller-f4f949886-cbnmt scope=dapr.runtime.http-info type=log useragent=Go-http-client/1.1 ver=edge
time="2022-03-16T18:32:03.359097916Z" level=info msg="HTTP API Called" method="POST /v1.0/invoke/{id}/method/{method:*}" app_id=invoke-caller instance=invokecaller-f4f949886-cbnmt scope=dapr.runtime.http-info type=log useragent=Go-http-client/1.1 ver=edge
```
## API logging configuration
Using the [Dapr Configuration spec]({{< ref "configuration-overview.md" >}}#sidecar-configuration), you can configure the default behavior of API logging in Dapr runtimes.
### Enable API logging by default
Using the Dapr Configuration spec, you can set the default value for the `--enable-api-logging` flag (and the correspondent annotation when running on Kubernetes), with the `logging.apiLogging.enabled` option. This value applies to all Dapr runtimes that reference the Configuration document or resource in which it's defined.
- If `logging.apiLogging.enabled` is set to `false`, the default value, API logging is disabled for Dapr runtimes unless `--enable-api-logging` is set to `true` (or the `dapr.io/enable-api-logging: true` annotation is added).
- When `logging.apiLogging.enabled` is `true`, Dapr runtimes have API logging enabled by default, and it can be disabled by setting
`--enable-api-logging=false` or with the `dapr.io/enable-api-logging: false` annotation.
For example:
```yaml
logging:
apiLogging:
enabled: true
```
### Omit health checks from API logging
When API logging is enabled, all calls to the Dapr API server are logged, including those to health check endpoints (e.g. `/v1.0/healthz`). Depending on your environment, this may generate multiple log lines per minute and could create unwanted noise.
You can configure Dapr to not log calls to health check endpoints when API logging is enabled using the Dapr Configuration spec, by setting `logging.apiLogging.omitHealthChecks: true`. The default value is `false`, which means that health checks calls are logged in the API logs.
For example:
```yaml
logging:
apiLogging:
omitHealthChecks: true
```

View File

@ -50,45 +50,54 @@ spec:
imagePullPolicy: Always
```
If your pod spec template is annotated correctly and you still don't see the sidecar injected, make sure Dapr was deployed to the cluster before your deployment or pod were deployed.
There are some known cases where this might not properly work:
If this is the case, restarting the pods will fix the issue.
- If your pod spec template is annotated correctly, and you still don't see the sidecar injected, make sure Dapr was deployed to the cluster before your deployment or pod were deployed.
If you are deploying Dapr on a private GKE cluster, sidecar injection does not work without extra steps. See [Setup a Google Kubernetes Engine cluster]({{< ref setup-gke.md >}}).
If this is the case, restarting the pods will fix the issue.
In order to further diagnose any issue, check the logs of the Dapr sidecar injector:
- If you are deploying Dapr on a private GKE cluster, sidecar injection does not work without extra steps. See [Setup a Google Kubernetes Engine cluster]({{< ref setup-gke.md >}}).
```bash
kubectl logs -l app=dapr-sidecar-injector -n dapr-system
```
In order to further diagnose any issue, check the logs of the Dapr sidecar injector:
*Note: If you installed Dapr to a different namespace, replace dapr-system above with the desired namespace*
```bash
kubectl logs -l app=dapr-sidecar-injector -n dapr-system
```
If you are deploying Dapr on Amazon EKS and using an overlay network such as Calico, you will need to set `hostNetwork` parameter to true, this is a limitation of EKS with such CNIs.
*Note: If you installed Dapr to a different namespace, replace dapr-system above with the desired namespace*
You can set this parameter using Helm `values.yaml` file:
- If you are deploying Dapr on Amazon EKS and using an overlay network such as Calico, you will need to set `hostNetwork` parameter to true, this is a limitation of EKS with such CNIs.
```
helm upgrade --install dapr dapr/dapr \
You can set this parameter using Helm `values.yaml` file:
```
helm upgrade --install dapr dapr/dapr \
--namespace dapr-system \
--create-namespace \
--values values.yaml
```
```
`values.yaml`
```yaml
dapr_sidecar_injector:
hostNetwork: true
```
`values.yaml`
```yaml
dapr_sidecar_injector:
hostNetwork: true
```
or using command line:
or using command line:
```
helm upgrade --install dapr dapr/dapr \
```
helm upgrade --install dapr dapr/dapr \
--namespace dapr-system \
--create-namespace \
--set dapr_sidecar_injector.hostNetwork=true
```
```
- Make sure the kube api server can reach the following webhooks services:
- [Sidecar Mutating Webhook Injector Service](https://github.com/dapr/dapr/blob/44235fe8e8799589bb393a3124d2564db2dd6885/charts/dapr/charts/dapr_sidecar_injector/templates/dapr_sidecar_injector_deployment.yaml#L157) at port __4000__ that is served from the sidecar injector.
- [CRD Conversion Webhook Service](https://github.com/dapr/dapr/blob/44235fe8e8799589bb393a3124d2564db2dd6885/charts/dapr/charts/dapr_operator/templates/dapr_operator_service.yaml#L28) at port __19443__ that is served from the operator.
Check with your cluster administrators to setup allow ingress
rules to the above ports, __4000__ and __19443__, in the cluster from the kube api servers.
## My pod is in CrashLoopBackoff or another failed state due to the daprd sidecar

View File

@ -89,13 +89,13 @@ curl -X POST http://localhost:3500/v1.0-alpha1/publish/bulk/pubsubName/deathStar
-d '[
{
"entryId": "ae6bf7c6-4af2-11ed-b878-0242ac120002",
"event": "first",
"event": "first text message",
"contentType": "text/plain"
},
{
"entryId": "b1f40bd6-4af2-11ed-b878-0242ac120002",
"event": {
"message": "second"
"message": "second JSON message"
},
"contentType": "application/json"
},
@ -104,7 +104,7 @@ curl -X POST http://localhost:3500/v1.0-alpha1/publish/bulk/pubsubName/deathStar
### Headers
The `Content-Type` header should always be set to `application/json`.
The `Content-Type` header should always be set to `application/json` since the request body is a JSON array.
### URL Parameters
@ -134,14 +134,14 @@ Metadata can be sent via query parameters in the request's URL. It must be prefi
|403|Forbidden by access controls|
|500|At least one message failed to be delivered|
The response body is a JSON containing a list of failed entries. Example:
In case of a 500 status code, the response body will contain a JSON object containing a list of entries that failed to be delivered. For example from our request above, if the entry with event `"first text message"` failed to be delivered, the response would contain its entry ID and an error message from the underlying pub/sub component.
```json
{
"failedEntries": [
{
"entryId": "ae6bf7c6-4af2-11ed-b878-0242ac120002",
"error": "error message"
"error": "some error message"
},
],
"errorCode": "ERR_PUBSUB_PUBLISH_MESSAGE"

View File

@ -42,6 +42,7 @@ Available Commands:
stop Stop Dapr instances and their associated apps. Supported platforms: Self-hosted
uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes
version Print the Dapr runtime and CLI version
Flags:
-h, --help help for dapr
@ -73,8 +74,8 @@ You can learn more about each Dapr command from the links below.
- [`dapr stop`]({{< ref dapr-stop.md >}})
- [`dapr uninstall`]({{< ref dapr-uninstall.md >}})
- [`dapr upgrade`]({{< ref dapr-upgrade.md >}})
- [`dapr-version`]({{< ref dapr-version.md >}})
- [`dapr version`]({{< ref dapr-version.md >}})
### Environment Variables
Some Dapr flags can be set via environment variables (e.g. `DAPR_NETWORK` for the `--network` flag of the `dapr init` command). Note that specifying the flag on the command line overrides any set environment variable.
Some Dapr flags can be set via environment variables (e.g. `DAPR_NETWORK` for the `--network` flag of the `dapr init` command). Note that specifying the flag on the command line overrides any set environment variable.

View File

@ -20,6 +20,18 @@ spec:
metadata:
- name: url
value: http://something.com
- name: MTLSRootCA
value: /Users/somepath/root.pem # OPTIONAL <path to root CA> or <pem encoded string>
- name: MTLSClientCert
value: /Users/somepath/client.pem # OPTIONAL <path to client cert> or <pem encoded string>
- name: MTLSClientKey
value: /Users/somepath/client.key # OPTIONAL <path to client key> or <pem encoded string>
- name: securityToken # OPTIONAL <token to include as a header on HTTP requests>
secretKeyRef:
name: mysecret
key: mytoken
- name: securityTokenHeader
value: "Authorization: Bearer" # OPTIONAL <header name for the security token>
```
## Spec metadata fields
@ -27,6 +39,11 @@ spec:
| Field | Required | Binding support | Details | Example |
|--------------------|:--------:|--------|--------|---------|
| url | Y | Output |The base URL of the HTTP endpoint to invoke | `http://host:port/path`, `http://myservice:8000/customers`
| MTLSRootCA | N | Output |Path to root ca certificate or pem encoded string |
| MTLSClientCert | N | Output |Path to client certificate or pem encoded string |
| MTLSClientKey | N | Output |Path client private key or pem encoded string |
| securityToken | N | Output |The value of a token to be added to an HTTP request as a header. Used together with `securityTokenHeader` |
| securityTokenHeader| N | Output |The name of the header for `securityToken` on an HTTP request that |
## Binding support
@ -292,6 +309,17 @@ curl -d '{ "operation": "get" }' \
{{< /tabs >}}
## Using mTLS or enabling client TLS authentication along with HTTPS
You can configure the HTTP binding to use mTLS or client TLS authentication along with HTTPS by providing the `MTLSRootCA`, `MTLSClientCert`, and `MTLSClientKey` metadata fields in the binding component.
These fields can be passed as a file path or as a pem encoded string.
- If the file path is provided, the file is read and the contents are used.
- If the pem encoded string is provided, the string is used as is.
When these fields are configured, the Dapr sidecar uses the provided certificate to authenticate itself with the server during the TLS handshake process.
### When to use:
You can use this when the server with which the HTTP binding is configured to communicate requires mTLS or client TLS authentication.
## Related links

View File

@ -1,15 +1,16 @@
---
type: docs
title: "MQTT binding spec"
linkTitle: "MQTT"
description: "Detailed documentation on the MQTT binding component"
title: "MQTT3 binding spec"
linkTitle: "MQTT3"
description: "Detailed documentation on the MQTT3 binding component"
aliases:
- "/operations/components/setup-bindings/supported-bindings/mqtt3/"
- "/operations/components/setup-bindings/supported-bindings/mqtt/"
---
## Component format
To setup MQTT binding create a component of type `bindings.mqtt`. See [this guide]({{< ref "howto-bindings.md#1-create-a-binding" >}}) on how to create and apply a binding configuration.
To setup a MQTT3 binding create a component of type `bindings.mqtt3`. See [this guide]({{< ref "howto-bindings.md#1-create-a-binding" >}}) on how to create and apply a binding configuration.
```yaml
apiVersion: dapr.io/v1alpha1
@ -17,7 +18,7 @@ kind: Component
metadata:
name: <NAME>
spec:
type: bindings.mqtt
type: bindings.mqtt3
version: v1
metadata:
- name: url
@ -63,7 +64,7 @@ kind: Component
metadata:
name: mqtt-binding
spec:
type: bindings.mqtt
type: bindings.mqtt3
version: v1
metadata:
- name: url
@ -103,7 +104,7 @@ metadata:
name: mqtt-binding
namespace: default
spec:
type: bindings.mqtt
type: bindings.mqtt3
version: v1
metadata:
- name: consumerID

View File

@ -85,8 +85,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| enableTLS | N | If the Redis instance supports TLS with public certificates, can be configured to be enabled or disabled. Defaults to `"false"` | `"true"`, `"false"`
| maxRetries | N | Maximum number of retries before giving up. Defaults to `3` | `5`, `10`
| maxRetryBackoff | N | Maximum backoff between each retry. Defaults to `2` seconds; `"-1"` disables backoff. | `3000000000`
| failover | N | Property to enabled failover configuration. Needs sentinalMasterName to be set. The redisHost should be the sentinel host address. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/). Defaults to `"false"` | `"true"`, `"false"`
| sentinelMasterName | N | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/) | `""`, `"127.0.0.1:6379"`
| failover | N | Property to enabled failover configuration. Needs sentinelMasterName to be set. The redisHost should be the sentinel host address. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/). Defaults to `"false"` | `"true"`, `"false"`
| sentinelMasterName | N | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/) | `"mymaster"`
| redeliverInterval | N | The interval between checking for pending messages to redelivery. Defaults to `"60s"`. `"0"` disables redelivery. | `"30s"`
| processingTimeout | N | The amount time a message must be pending before attempting to redeliver it. Defaults to `"15s"`. `"0"` disables redelivery. | `"30s"`
| redisType | N | The type of redis. There are two valid values, one is `"node"` for single node mode, the other is `"cluster"` for redis cluster mode. Defaults to `"node"`. | `"cluster"`

View File

@ -14,10 +14,10 @@ extension.
The Wasm [HTTP middleware]({{< ref middleware.md >}}) allows you to rewrite a
request URI with custom logic compiled to a Wasm binary. In other words, you
can extend Dapr using external files that are not pre-compiled into the `daprd`
binary. Dapr embeds [wazero][https://wazero.io] to accomplish this without CGO.
binary. Dapr embeds [wazero](https://wazero.io) to accomplish this without CGO.
Wasm modules are loaded from a filesystem path. On Kubernetes, see [mounting
volumes to the Dapr sidecar]({{> kubernetes-volume-mounts.md >}}) to configure
volumes to the Dapr sidecar]({{< ref kubernetes-volume-mounts.md >}}) to configure
a filesystem mount that can contain Wasm modules.
## Component format

View File

@ -337,7 +337,7 @@ To run without Docker, see the getting started guide [here](https://kafka.apache
{{% /codetab %}}
{{% codetab %}}
To run Kafka on Kubernetes, you can use any Kafka operator, such as [Strimzi](https://strimzi.io/docs/operators/latest/quickstart.html#ref-install-prerequisites-str).
To run Kafka on Kubernetes, you can use any Kafka operator, such as [Strimzi](https://strimzi.io/quickstarts/).
{{% /codetab %}}
{{< /tabs >}}

View File

@ -105,14 +105,21 @@ Using SQS FIFO (`fifo` metadata field set to `"true"`) per AWS specifications pr
Specifying `fifoMessageGroupID` limits the number of concurrent consumers of the FIFO queue used to only one but guarantees global ordering of messages published by the app's Dapr sidecars. See [this AWS blog post](https://aws.amazon.com/blogs/compute/solving-complex-ordering-challenges-with-amazon-sqs-fifo-queues/) to better understand the topic of Message Group IDs and FIFO queues.
To avoid losing the order of messages delivered to consumers, the FIFO configuration for the SQS Component requires the `concurrencyMode` metadata field set to `"single"`.
#### Default parallel `concurrencyMode`
Since v1.8.0, the component supports the `"parallel"` `concurrencyMode` as its default mode. In prior versions, the component default behavior was calling the subscriber a single message at a time and waiting for its response.
#### SQS dead-letter Queues
When configuring the PubSub component with SQS dead-letter queues, the metadata fields `messageReceiveLimit` and `sqsDeadLettersQueueName` must both be set to a value. For `messageReceiveLimit`, the value must be greater than `0` and the `sqsDeadLettersQueueName` must not be empty string.
{{% alert title="Important" color="warning" %}}
When running the Dapr sidecar (`daprd`) with your application on EKS (AWS Kubernetes) node/pod already attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec.
{{% /alert %}}
## Create an SNS/SQS instance
{{< tabs "Self-Hosted" "Kubernetes" "AWS" >}}

View File

@ -62,12 +62,16 @@ spec:
value: false
- name: rateLimit
value: 1024
- name: hearbeat
- name: heartbeat
value: 15s
- name: ackPolicy
value: explicit
- name: deliverPolicy
value: all
- name: domain
value: hub
- name: apiPrefix
value: PREFIX
```
## Spec metadata fields
@ -94,9 +98,11 @@ spec:
| replicas | N | [Replicas] | `3` |
| memoryStorage | N | [Memory Storage] | `false` |
| rateLimit | N | [Rate Limit] | `1024` |
| hearbeat | N | [Hearbeat] | `10s` |
| heartbeat | N | [Heartbeat] | `10s` |
| ackPolicy | N | [Ack Policy] | `explicit` |
| deliverPolicy | N | One of: all, last, new, sequence, time | `all` |
| domain | N | [JetStream Leafondes] | `HUB` |
| apiPrefix | N | [JetStream Leafnodes] | `PREFIX` |
## Create a NATS server
@ -160,7 +166,8 @@ nats -s localhost:4222 stream add myStream --subjects mySubject
[Replicas]: https://docs.nats.io/jetstream/concepts/consumers#replicas
[Memory Storage]: https://docs.nats.io/jetstream/concepts/consumers#memorystorage
[Rate Limit]: https://docs.nats.io/jetstream/concepts/consumers#ratelimit
[Hearbeat]: https://docs.nats.io/jetstream/concepts/consumers#hearbeat
[Heartbeat]: https://docs.nats.io/jetstream/concepts/consumers#heartbeat
[Ack Policy]: https://docs.nats.io/nats-concepts/jetstream/consumers#ackpolicy
[JetStream Leafonodes]: https://docs.nats.io/running-a-nats-service/configuration/leafnodes/jetstream_leafnodes
[Decentralized JWT Authentication/Authorization]: https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt
[NATS token based authentication]: https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/tokens

View File

@ -1,15 +1,16 @@
---
type: docs
title: "MQTT"
linkTitle: "MQTT"
description: "Detailed documentation on the MQTT pubsub component"
title: "MQTT3"
linkTitle: "MQTT3"
description: "Detailed documentation on the MQTT3 pubsub component"
aliases:
- "/operations/components/setup-pubsub/supported-pubsub/setup-mqtt3/"
- "/operations/components/setup-pubsub/supported-pubsub/setup-mqtt/"
---
## Component format
To setup MQTT pubsub create a component of type `pubsub.mqtt`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pubsub configuration
To setup a MQTT3 pubsub create a component of type `pubsub.mqtt3`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pubsub configuration
```yaml
apiVersion: dapr.io/v1alpha1
@ -17,7 +18,7 @@ kind: Component
metadata:
name: mqtt-pubsub
spec:
type: pubsub.mqtt
type: pubsub.mqtt3
version: v1
metadata:
- name: url
@ -59,7 +60,7 @@ kind: Component
metadata:
name: mqtt-pubsub
spec:
type: pubsub.mqtt
type: pubsub.mqtt3
version: v1
metadata:
- name: url
@ -96,7 +97,7 @@ kind: Component
metadata:
name: mqtt-pubsub
spec:
type: pubsub.mqtt
type: pubsub.mqtt3
version: v1
metadata:
- name: consumerID
@ -119,7 +120,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
Note that in the case, the value of the consumer ID is random every time Dapr restarts, so we are setting `cleanSession` to true as well.
## Create a MQTT broker
## Create a MQTT3 broker
{{< tabs "Self-Hosted" "Kubernetes">}}
@ -134,7 +135,7 @@ You can then interact with the server using the client port: `mqtt://localhost:1
{{% /codetab %}}
{{% codetab %}}
You can run a MQTT broker in kubernetes using following yaml:
You can run a MQTT3 broker in kubernetes using following yaml:
```yaml
apiVersion: apps/v1

View File

@ -0,0 +1,113 @@
---
type: docs
title: "Solace-AMQP"
linkTitle: "Solace-AMQP"
description: "Detailed documentation on the Solace-AMQP pubsub component"
aliases:
- "/operations/components/setup-pubsub/supported-pubsub/setup-solace-amqp/"
---
## Component format
To setup Solace-AMQP pub/sub, create a component of type `pubsub.solace.amqp`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pub/sub configuration.
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: solace
spec:
type: pubsub.solace.amqp
version: v1
metadata:
- name: url
value: 'amqp://localhost:5672'
- name: username
value: 'default'
- name: password
value: 'default'
```
{{% alert title="Warning" color="warning" %}}
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
{{% /alert %}}
## Spec metadata fields
| Field | Required | Details | Example |
|--------------------|:--------:|---------|---------|
| url | Y | Address of the AMQP broker. Can be `secretKeyRef` to use a secret reference. <br> Use the **`amqp://`** URI scheme for non-TLS communication. <br> Use the **`amqps://`** URI scheme for TLS communication. | `"amqp://host.domain[:port]"`
| username | Y | The username to connect to the broker. Only required if anonymous is not specified or set to `false` .| `default`
| password | Y | The password to connect to the broker. Only required if anonymous is not specified or set to `false`. | `default`
| anonymous | N | To connect to the broker without credential validation. Only works if enabled on the broker. A username and password would not be required if this is set to `true`. | `true`
| caCert | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"`
| clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"`
| clientKey | Required for using TLS | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n<base64-encoded PKCS8>\n-----END RSA PRIVATE KEY-----"`
### Communication using TLS
To configure communication using TLS:
1. Ensure that the Solace broker is configured to support certificates.
1. Provide the `caCert`, `clientCert`, and `clientKey` metadata in the component configuration.
For example:
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: solace
spec:
type: pubsub.solace.amqp
version: v1
metadata:
- name: url
value: "amqps://host.domain[:port]"
- name: username
value: 'default'
- name: password
value: 'default'
- name: caCert
value: ${{ myLoadedCACert }}
- name: clientCert
value: ${{ myLoadedClientCert }}
- name: clientKey
secretKeyRef:
name: mySolaceClientKey
key: mySolaceClientKey
auth:
secretStore: <SECRET_STORE_NAME>
```
> While the `caCert` and `clientCert` values may not be secrets, they can be referenced from a Dapr secret store as well for convenience.
### Publishing/subscribing to topics and queues
By default, messages are published and subscribed over topics. If you would like your destination to be a queue, prefix the topic with `queue:` and the Solace AMQP component will connect to a queue.
## Create a Solace broker
{{< tabs "Self-Hosted" "SaaS">}}
{{% codetab %}}
You can run a Solace broker [locally using Docker](https://hub.docker.com/r/solace/solace-pubsub-standard):
```bash
docker run -d -p 8080:8080 -p 55554:55555 -p 8008:8008 -p 1883:1883 -p 8000:8000 -p 5672:5672 -p 9000:9000 -p 2222:2222 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard
```
You can then interact with the server using the client port: `mqtt://localhost:5672`
{{% /codetab %}}
{{% codetab %}}
You can also sign up for a free SaaS broker on [Solace Cloud](https://console.solace.cloud/login/new-account?product=event-streaming).
{{% /codetab %}}
{{< /tabs >}}
## Related links
- [Basic schema for a Dapr component]({{< ref component-schema >}})
- Read [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components
- [Pub/sub building block]({{< ref pubsub >}})

View File

@ -54,8 +54,8 @@
features:
input: false
output: true
- component: MQTT
link: mqtt
- component: MQTT3
link: mqtt3
state: Beta
version: v1
since: "1.7"

View File

@ -1,5 +1,8 @@
- component: AWS SNS/SQS
link: setup-aws-snssqs
state: Beta
state: Stable
version: v1
since: "1.6"
features:
bulkPublish: false
bulkSubscribe: false

View File

@ -3,3 +3,6 @@
state: Alpha
version: v1
since: "1.0"
features:
bulkPublish: false
bulkSubscribe: false

View File

@ -3,11 +3,17 @@
state: Deprecated
version: v1
since: "1.9"
features:
bulkPublish: false
bulkSubscribe: false
- component: In Memory
link: setup-inmemory
state: Beta
version: v1
since: "1.7"
features:
bulkPublish: false
bulkSubscribe: false
- component: Apache Kafka
link: setup-apache-kafka
state: Stable
@ -21,33 +27,62 @@
state: Stable
version: v1
since: "1.0"
features:
bulkPublish: false
bulkSubscribe: false
- component: JetStream
link: setup-jetstream
state: Alpha
version: v1
since: "1.4"
features:
bulkPublish: false
bulkSubscribe: false
- component: Pulsar
link: setup-pulsar
state: Beta
version: v1
since: "1.7"
- component: MQTT
link: setup-mqtt
features:
bulkPublish: false
bulkSubscribe: false
- component: MQTT3
link: setup-mqtt3
state: Stable
version: v1
since: "1.7"
features:
bulkPublish: false
bulkSubscribe: false
- component: NATS Streaming
link: setup-nats-streaming
state: Beta
version: v1
since: "1.0"
features:
bulkPublish: false
bulkSubscribe: false
- component: RabbitMQ
link: setup-rabbitmq
state: Stable
version: v1
since: "1.7"
features:
bulkPublish: false
bulkSubscribe: false
- component: RocketMQ
link: setup-rocketmq
state: Alpha
version: v1
since: "1.8"
features:
bulkPublish: false
bulkSubscribe: false
- component: Solace-AMQP
link: setup-solace-amqp
state: Alpha
version: v1
since: "1.10"
features:
bulkPublish: false
bulkSubscribe: false

View File

@ -21,11 +21,22 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-bindings/{{ .link }}/" }}>{{ .component
}}</a>
<td><a href="/reference/components-reference/supported-bindings/{{ .link }}/">{{ .component }}</a>
</td>
<td align="center">
{{ if .features.input }}
<span role="img" aria-label="Input binding supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="Input binding not supported" aria-label="Input binding not supported">
{{ end }}
</td>
<td align="center">
{{ if .features.output }}
<span role="img" aria-label="Output binding supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="Output binding not supported" aria-label="Output binding not supported">
{{ end }}
</td>
<td align="center">{{ if .features.input }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if .features.output }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td>{{ .state }}</td>
<td>{{ .version }}</td>
<td>{{ .since }}</td>

View File

@ -13,8 +13,7 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-configuration-stores/{{ .link }}/" }}>{{ .component
}}</a>
<td><a href="/reference/components-reference/supported-configuration-stores/{{ .link }}/">{{ .component }}</a>
</td>
<td>{{ .state }}</td>
<td>{{ .version }}</td>

View File

@ -1,7 +1,6 @@
<p>Table captions:</p>
<blockquote>
<p><code>Status</code>: <a href="/operations/components/certification-lifecycle/">Component
certification</a> status</p>
<p><code>Status</code>: <a href="/operations/components/certification-lifecycle/">component certification</a> status</p>
</blockquote>
<ul>
<li><a href="/operations/components/certification-lifecycle/#alpha">Alpha</a></li>
@ -9,8 +8,8 @@
<li><a href="/operations/components/certification-lifecycle/#stable">Stable</a></li>
</ul>
<blockquote>
<p><code>Since</code>: defines from which Dapr Runtime version, the component is in the current status</p>
<p><code>Since</code>: the version of the Dapr Runtime in which the component first moved to the current status</p>
</blockquote>
<blockquote>
<p><code>Component version</code>: defines the version of the component</p>
<p><code>Component version</code>: the version of the component</p>
</blockquote>

View File

@ -13,8 +13,7 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-locks/{{ .link }}/" }}>{{ .component
}}</a>
<td><a href="/reference/components-reference/supported-locks/{{ .link }}/">{{ .component }}</a>
</td>
<td>{{ .state }}</td>
<td>{{ .version }}</td>

View File

@ -13,8 +13,7 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="{{ .link }}/" }}>{{ .component
}}</a>
<td><a href="{{ .link }}/">{{ .component }}</a>
</td>
<td>{{ .description | markdownify}}</td>
<td>{{ .state }}</td>

View File

@ -15,8 +15,7 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-name-resolution/{{ .link }}/" }}>{{ .component
}}</a>
<td><a href="/reference/components-reference/supported-name-resolution/{{ .link }}/">{{ .component }}</a>
</td>
<td>{{ .state }}</td>
<td>{{ .version }}</td>

View File

@ -18,8 +18,7 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-pubsub/{{ .link }}/" }}>{{ .component
}}</a>
<td><a href="/reference/components-reference/supported-pubsub/{{ .link }}/">{{ .component }}</a>
</td>
<td align="center">{{ if .features.bulkPublish }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if .features.bulkSubscribe }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>

View File

@ -27,10 +27,16 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-secret-stores/{{ .link }}/" }}>{{ .component
}}</a>
<td>
<a href="/reference/components-reference/supported-secret-stores/{{ .link }}/">{{ .component }}</a>
</td>
<td align="center">
{{ if .features.multipleKeyValuesPerSecret }}
<span role="img" aria-label="Multiple Key-Values Per Secret: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="Multiple Key-Values Per Secret: Not supported" aria-label="Multiple Key-Values Per Secret: Not supported" />
{{ end }}
</td>
<td align="center">{{ if .features.multipleKeyValuesPerSecret }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td>{{ .state }}</td>
<td>{{ .version }}</td>
<td>{{ .since }}</td>

View File

@ -24,16 +24,51 @@
</tr>
{{ range sort $components "component" }}
<tr>
<td><a href="/reference/components-reference/supported-state-stores/{{ .link }}/" }}>{{ .component
}}</a>
<td>
<a href="/reference/components-reference/supported-state-stores/{{ .link }}/">{{ .component }}</a>
</td>
<td align="center">
{{ if .features.crud }}
<span role="img" aria-label="CRUD: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="CRUD: Not supported" aria-label="CRUD: Not supported" />
{{ end }}
</td>
<td align="center">
{{ if .features.transactions }}
<span role="img" aria-label="Transactions: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="Transactions: Not supported" aria-label="Transactions: Not supported" />
{{ end }}
</td>
<td align="center">
{{ if .features.etag }}
<span role="img" aria-label="ETag: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="ETag: Not supported" aria-label="ETag: Not supported" />
{{ end }}
</td>
<td align="center">
{{ if .features.ttl }}
<span role="img" aria-label="TTL: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="TTL: Not supported" aria-label="TTL: Not supported" />
{{ end }}
</td>
<td align="center">
{{ if (and .features.transactions .features.etag) }}
<span role="img" aria-label="Actors: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="Actors: Not supported" aria-label="Actors: Not supported" />
{{ end }}
</td>
<td align="center">
{{ if .features.query }}
<span role="img" aria-label="Query: Supported"></span>
{{else}}
<img src="/images/emptybox.png" alt="Query: Not supported" aria-label="Query: Not supported" />
{{ end }}
</td>
<td align="center">{{ if .features.crud }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if .features.transactions }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if .features.etag }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if .features.ttl }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if (and .features.transactions .features.etag) }}✅{{else}}<img
src="/images/emptybox.png">{{ end }}</td>
<td align="center">{{ if .features.query }}✅{{else}}<img src="/images/emptybox.png">{{ end }}</td>
<td>{{ .state }}</td>
<td>{{ .version }}</td>
<td>{{ .since }}</td>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

@ -1 +1 @@
Subproject commit e87b9ad6eefaa05390144d82642df13c5b4bed17
Subproject commit 52b82d7ce6599822a37d2528379f5ca146e286bb