Add call to MapSubscribeHandlers for .NET pubsub

https://github.com/dapr/docs/issues/2649

Signed-off-by: halspang <halspang@microsoft.com>
This commit is contained in:
halspang 2023-03-06 15:36:46 -08:00
parent 5935cbc90d
commit b8153990c8
1 changed files with 9 additions and 0 deletions

View File

@ -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 %}}