From b8153990c8dc3b6f8ac1f9c4ff0b2c38010cb32a Mon Sep 17 00:00:00 2001 From: halspang Date: Mon, 6 Mar 2023 15:36:46 -0800 Subject: [PATCH] Add call to MapSubscribeHandlers for .NET pubsub https://github.com/dapr/docs/issues/2649 Signed-off-by: halspang --- .../building-blocks/pubsub/subscription-methods.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md index a176d9402..965647b92 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md @@ -212,6 +212,15 @@ app.MapPost("/checkout", [Topic("pubsub", "orders")] (Order order) => { }); ``` +Both of the handlers defined above also need to be mapped to configure the `dapr/subscribe` endpoint. This is done in the application startup code while defining endpoints. + +```csharp +app.UseEndpoints(endpoints => +{ + endpoints.MapSubscribeHandler(); +} +``` + {{% /codetab %}} {{% codetab %}}