<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dapr Messaging .NET SDK on Dapr Docs</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-messaging/</link><description>Recent content in Dapr Messaging .NET SDK on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-messaging/index.xml" rel="self" type="application/rss+xml"/><item><title>How to: Author and manage Dapr streaming subscriptions in the .NET SDK</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-messaging/dotnet-messaging-pubsub-howto/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-messaging/dotnet-messaging-pubsub-howto/</guid><description>&lt;p>Let&amp;rsquo;s create a subscription to a pub/sub topic or queue at using the streaming capability. We&amp;rsquo;ll use the
&lt;a href="https://github.com/dapr/dotnet-sdk/tree/master/examples/Client/PublishSubscribe/StreamingSubscriptionExample">simple example provided here&lt;/a>,
for the following demonstration and walk through it as an explainer of how you can configure message handlers at
runtime and which do not require an endpoint to be pre-configured. In this guide, you will:&lt;/p>
&lt;ul>
&lt;li>Deploy a .NET Web API application (&lt;a href="https://github.com/dapr/dotnet-sdk/tree/master/examples/Client/PublishSubscribe/StreamingSubscriptionExample">StreamingSubscriptionExample&lt;/a>)&lt;/li>
&lt;li>Utilize the Dapr .NET Messaging SDK to subscribe dynamically to a pub/sub topic.&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://docs.dapr.io/getting-started/install-dapr-selfhost">Initialized Dapr environment&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://dotnet.microsoft.com/download/dotnet/8.0">.NET 8&lt;/a>,
&lt;a href="https://dotnet.microsoft.com/download/dotnet/9.0">.NET 9&lt;/a>, or
&lt;a href="https://dotnet.microsoft.com/download/dotnet/10.0">.NET 10&lt;/a> installed&lt;/li>
&lt;li>&lt;a href="https://www.nuget.org/packages/Dapr.Messaging">Dapr.Messaging&lt;/a> NuGet package installed to your project&lt;/li>
&lt;/ul>
&lt;h2 id="set-up-the-environment">Set up the environment&lt;/h2>
&lt;p>Clone the &lt;a href="https://github.com/dapr/dotnet-sdk">.NET SDK repo&lt;/a>.&lt;/p></description></item><item><title>DaprPublishSubscribeClient usage</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-messaging/dotnet-messaging-pubsub-usage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-messaging/dotnet-messaging-pubsub-usage/</guid><description>&lt;h2 id="lifetime-management">Lifetime management&lt;/h2>
&lt;p>A &lt;code>DaprPublishSubscribeClient&lt;/code> is a version of the Dapr client that is dedicated to interacting with the Dapr Messaging API.
It can be registered alongside a &lt;code>DaprClient&lt;/code> and other Dapr clients without issue.&lt;/p>
&lt;p>It maintains access to networking resources in the form of TCP sockets used to communicate with the Dapr sidecar and implements
&lt;code>IAsyncDisposable&lt;/code> to support the eager cleanup of resources.&lt;/p>
&lt;p>For best performance, create a single long-lived instance of &lt;code>DaprPublishSubscribeClient&lt;/code> and provide access to that shared
instance throughout your application. &lt;code>DaprPublishSubscribeClient&lt;/code> instances are thread-safe and intended to be shared.&lt;/p></description></item></channel></rss>