diff --git a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md index 96dbd8bdc..3581606d0 100644 --- a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md @@ -99,7 +99,7 @@ When you ran `dapr init` during Dapr install, the following YAML files were gene Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-subscriber" >}}) and [publisher]({{< ref "#checkout-publisher" >}}) applications. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -117,7 +117,7 @@ apps: command: ["python3", "app.py"] ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file With the `pubsub.yaml` component, you can easily swap out underlying components without application code changes. @@ -144,7 +144,7 @@ In the component YAML file: - `spec/metadata` defines the connection to the instance of the component. - `scopes` specify which application can use the component. -#### `order-processor` subscriber +##### `order-processor` subscriber In the `order-processor` subscriber, you subscribe to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. @@ -173,7 +173,7 @@ def orders_subscriber(): app.run(port=5001) ``` -#### `checkout` publisher +##### `checkout` publisher In the `checkout` publisher, you publish the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: @@ -261,7 +261,7 @@ When you ran `dapr init` during Dapr install, the following YAML files were gene Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-subscriber" >}}) and [publisher]({{< ref "#checkout-publisher" >}}) applications. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -279,7 +279,7 @@ apps: command: ["npm", "run", "start"] ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file With the `pubsub.yaml` component, you can easily swap out underlying components without application code changes. @@ -306,7 +306,7 @@ In the component YAML file: - `spec/metadata` defines the connection to the instance of the component. - `scopes` specify which application can use the component. -#### `order-processor` subscriber +##### `order-processor` subscriber In the `order-processor` subscriber, you subscribe to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. @@ -314,7 +314,7 @@ In the `order-processor` subscriber, you subscribe to the Redis instance called server.pubsub.subscribe("orderpubsub", "orders", (data) => console.log("Subscriber received: " + JSON.stringify(data))); ``` -#### `checkout` publisher +##### `checkout` publisher In the `checkout` publisher service, you publish the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: @@ -398,7 +398,7 @@ When you ran `dapr init` during Dapr install, the following YAML files were gene Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-subscriber" >}}) and [publisher]({{< ref "#checkout-publisher" >}}) applications. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -416,7 +416,7 @@ apps: command: ["dotnet", "run"] ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file With the `pubsub.yaml` component, you can easily swap out underlying components without application code changes. @@ -443,7 +443,7 @@ In the component YAML file: - `spec/metadata` defines the connection to the instance of the component. - `scopes` specify which application can use the component. -#### `order-processor` subscriber +##### `order-processor` subscriber In the `order-processor` subscriber, you subscribe to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. @@ -457,7 +457,7 @@ app.MapPost("/orders", [Topic("orderpubsub", "orders")] (Order order) => { public record Order([property: JsonPropertyName("orderId")] int OrderId); ``` -#### `checkout` publisher +##### `checkout` publisher In the `checkout` publisher, you publish the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: @@ -543,7 +543,7 @@ When you ran `dapr init` during Dapr install, the following YAML files were gene Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-subscriber" >}}) and [publisher]({{< ref "#checkout-publisher" >}}) applications. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -561,7 +561,7 @@ apps: command: ["java", "-jar", "CheckoutService-0.0.1-SNAPSHOT.jar"] ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file With the `pubsub.yaml` component, you can easily swap out underlying components without application code changes. @@ -588,7 +588,7 @@ In the component YAML file: - `spec/metadata` defines the connection to the instance of the component. - `scopes` specify which application can use the component. -#### `order-processor` subscriber +##### `order-processor` subscriber In the `order-processor` subscriber, you subscribe to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. @@ -607,7 +607,7 @@ public Mono getCheckout(@RequestBody(required = false) CloudEven } ``` -#### `checkout` publisher +##### `checkout` publisher In the `checkout` publisher, you publish the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: @@ -693,7 +693,7 @@ When you ran `dapr init` during Dapr install, the following YAML files were gene Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-subscriber" >}}) and [publisher]({{< ref "#checkout-publisher" >}}) applications. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -711,7 +711,7 @@ apps: command: ["go", "run", "."] ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file With the `pubsub.yaml` component, you can easily swap out underlying components without application code changes. @@ -738,7 +738,7 @@ In the component YAML file: - `spec/metadata` defines the connection to the instance of the component. - `scopes` specify which application can use the component. -#### `order-processor` subscriber +##### `order-processor` subscriber In the `order-processor` subscriber, you subscribe to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. @@ -749,7 +749,7 @@ func eventHandler(ctx context.Context, e *common.TopicEvent) (retry bool, err er } ``` -#### `checkout` publisher +##### `checkout` publisher In the `checkout` publisher, you publish the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: @@ -912,7 +912,7 @@ Subscriber output: == APP == INFO:root:Subscriber received: {"orderId": 10} ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file When you run `dapr init`, Dapr creates a default Redis `pubsub.yaml` and runs a Redis container on your local machine, located: @@ -1070,7 +1070,7 @@ Subscriber output: ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file When you run `dapr init`, Dapr creates a default Redis `pubsub.yaml` and runs a Redis container on your local machine, located: @@ -1223,7 +1223,7 @@ Subscriber output: == APP == Subscriber received: Order { OrderId = 10 } ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file When you run `dapr init`, Dapr creates a default Redis `pubsub.yaml` and runs a Redis container on your local machine, located: @@ -1385,7 +1385,7 @@ Subscriber output: == APP == 2022-03-07 13:31:37.919 INFO 43512 --- [nio-8080-exec-2] c.s.c.OrderProcessingServiceController : Subscriber received: 10 ``` -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file When you run `dapr init`, Dapr creates a default Redis `pubsub.yaml` and runs a Redis container on your local machine, located: @@ -1543,7 +1543,7 @@ Subscriber output: Note: the order in which they are received may vary. -#### `pubsub.yaml` component file +##### `pubsub.yaml` component file When you run `dapr init`, Dapr creates a default Redis `pubsub.yaml` and runs a Redis container on your local machine, located: diff --git a/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md index bd866aa24..08014b5e1 100644 --- a/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md @@ -112,7 +112,7 @@ Exited App successfully Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-service" >}}) and [publisher]({{< ref "#checkout-service" >}}) applications using the `dapr.yaml` Multi-App Run template file. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -128,7 +128,7 @@ apps: command: ["python3", "app.py"] ``` -#### `order-processor` service +##### `order-processor` service The `order-processor` service receives the call from the `checkout` service: @@ -247,7 +247,7 @@ Exited App successfully Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-service" >}}) and [publisher]({{< ref "#checkout-service" >}}) applications using the `dapr.yaml` Multi-App Run template file. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -263,7 +263,7 @@ apps: command: ["npm", "start"] ``` -#### `order-processor` service +##### `order-processor` service The `order-processor` service receives the call from the `checkout` service: @@ -274,7 +274,7 @@ app.post('/orders', (req, res) => { }); ``` -#### `checkout` service +##### `checkout` service In the `checkout` service, you'll notice there's no need to rewrite your app code to use Dapr's service invocation. You can enable service invocation by simply adding the `dapr-app-id` header, which specifies the ID of the target service. @@ -377,7 +377,7 @@ Exited App successfully Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-service" >}}) and [publisher]({{< ref "#checkout-service" >}}) applications using the `dapr.yaml` Multi-App Run template file. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -393,7 +393,7 @@ apps: command: ["dotnet", "run"] ``` -#### `order-processor` service +##### `order-processor` service The `order-processor` service receives the call from the `checkout` service: @@ -405,7 +405,7 @@ app.MapPost("/orders", (Order order) => }); ``` -#### `checkout` service +##### `checkout` service In the Program.cs file for the `checkout` service, you'll notice there's no need to rewrite your app code to use Dapr's service invocation. You can enable service invocation by simply adding the `dapr-app-id` header, which specifies the ID of the target service. @@ -511,7 +511,7 @@ Exited App successfully Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-service" >}}) and [publisher]({{< ref "#checkout-service" >}}) applications using the `dapr.yaml` Multi-App Run template file. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -527,7 +527,7 @@ apps: command: ["java", "-jar", "target/CheckoutService-0.0.1-SNAPSHOT.jar"] ``` -#### `order-processor` service +##### `order-processor` service The `order-processor` service receives the call from the `checkout` service: @@ -538,7 +538,7 @@ public String processOrders(@RequestBody Order body) { } ``` -#### `checkout` service +##### `checkout` service In the `checkout` service, you'll notice there's no need to rewrite your app code to use Dapr's service invocation. You can enable service invocation by simply adding the `dapr-app-id` header, which specifies the ID of the target service. @@ -640,7 +640,7 @@ Exited App successfully Running `dapr run -f .` in this Quickstart started both the [subscriber]({{< ref "#order-processor-service" >}}) and [publisher]({{< ref "#checkout-service" >}}) applications using the `dapr.yaml` Multi-App Run template file. -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file Running the [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) with `dapr run -f .` starts all applications in your project. In this Quickstart, the `dapr.yaml` file contains the following: @@ -656,7 +656,7 @@ apps: command: ["go", "run", "."] ``` -#### `order-processor` service +##### `order-processor` service In the `order-processor` service, each order is received via an HTTP POST request and processed by the `getOrder` function. @@ -670,7 +670,7 @@ func getOrder(w http.ResponseWriter, r *http.Request) { } ``` -#### `checkout` service +##### `checkout` service In the `checkout` service, you'll notice there's no need to rewrite your app code to use Dapr's service invocation. You can enable service invocation by simply adding the `dapr-app-id` header, which specifies the ID of the target service. diff --git a/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md index 7c80c4c23..e360c6600 100644 --- a/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md @@ -102,7 +102,7 @@ Order-processor output: == APP == INFO:root:Deleting Order: {'orderId': '4'} ``` -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file When you run `dapr init`, Dapr creates a default [Multi-App Run template file]({{< ref multi-app-dapr-run >}}) named `dapr.yaml`. Running `dapr run -f` starts all applications in your project. In this sample, the `dapr.yaml` file contains the following: @@ -116,7 +116,7 @@ apps: command: ["dotnet", "run"] ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr also creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -239,7 +239,7 @@ Order-processor output: == APP == Deleting Order: { orderId: 5 } ``` -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file When you run `dapr init`, Dapr creates a default Multi-App Run template file named `dapr.yaml`. Running `dapr run -f` starts all applications in your project. In this sample, the `dapr.yaml` file contains the following: @@ -253,7 +253,7 @@ apps: command: ["dotnet", "run"] ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -370,7 +370,7 @@ Order-processor output: == APP == Deleting Order: Order { orderId = 5 } ``` -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file When you run `dapr init`, Dapr creates a default Multi-App Run template file named `dapr.yaml`. Running `dapr run -f` starts all applications in your project. In this sample, the `dapr.yaml` file contains the following: @@ -384,7 +384,7 @@ apps: command: ["dotnet", "run"] ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -506,7 +506,7 @@ Order-processor output: == APP == INFO:root:Deleting Order: {'orderId': '4'} ``` -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file When you run `dapr init`, Dapr creates a default Multi-App Run template file named `dapr.yaml`. Running `dapr run -f` starts all applications in your project. In this sample, the `dapr.yaml` file contains the following: @@ -520,7 +520,7 @@ apps: command: ["dotnet", "run"] ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -638,7 +638,7 @@ Order-processor output: == APP == 2022/04/01 09:16:03 Deleting Order: {"orderId":5} ``` -#### `dapr.yaml` Multi-App Run template file +##### `dapr.yaml` Multi-App Run template file When you run `dapr init`, Dapr creates a default Multi-App Run template file named `dapr.yaml`. Running `dapr run -f` starts all applications in your project. In this sample, the `dapr.yaml` file contains the following: @@ -652,7 +652,7 @@ apps: command: ["dotnet", "run"] ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -776,7 +776,7 @@ Order-processor output: == APP == INFO:root:Deleting Order: {'orderId': '4'} ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -898,7 +898,7 @@ Order-processor output: == APP == Deleting Order: { orderId: 5 } ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -1015,7 +1015,7 @@ Order-processor output: == APP == Deleting Order: Order { orderId = 5 } ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -1137,7 +1137,7 @@ Order-processor output: == APP == INFO:root:Deleting Order: {'orderId': '4'} ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: @@ -1255,7 +1255,7 @@ Order-processor output: == APP == 2022/04/01 09:16:03 Deleting Order: {"orderId":5} ``` -#### `statestore.yaml` component file +##### `statestore.yaml` component file When you run `dapr init`, Dapr creates a default Redis `statestore.yaml` and runs a Redis container on your local machine, located: