Skip to content

v1.18.8

Choose a tag to compare

@WhitWaldo WhitWaldo released this 26 Sep 03:35
· 15 commits to master since this release
a7c0612

What's Changed

  • (feat): Dapr.Messaging full implementation by @WhitWaldo in #1906
  • Update Dapr.Actors.Next to use latest Dapr.Messaging pubsub bits instead of recreating streaming pubsub impl by @WhitWaldo in #1907

Dapr.Messaging Overhaul

Prior to this release, Dapr.Client provided basis publish and dynamic streaming subscription methods, Dapr.AspNetCore offered controller-based programmatic topic subscription and Dapr.Messaging offered streaming subscription support. In this release. Dapr.Messaging now unifies and modernizes the approach:

  1. Unified publishing and subscribing: Publish events with IDaprPublishSubscribeClient (including single events, raw byte streams, and bulk publishing) and author subscribers using a single ITopicHandler<TMessage> interface.
  2. Three unified delivery modes: Subscriptions support DeliveryMode.Streaming (streaming subscriptions), DeliveryMode.Programmatic (programmatic subscriptions), and DeliveryMode.Http (declarative subscriptions), all configured through the same [DaprTopic] attribute.
  3. Source generators eliminate reflection: The Dapr.Messaging.Generators source generator inspects [DaprTopic] handlers at compile time and emits typed dispatchers, subscriber registries, and dependency injection wiring. No runtime reflection or runtime code generation is performed on the invocation path, dramatically improving startup times.
  4. AOT and trimming considerations: Like other modern Dapr packages, this package was also built with AOT in mind, but with some considerations. Handler discovery and dispatch registration are generated at compile time, but the current generated subscriber dispatchers use runtime System.Text.Json metadata. Native AOT and trimming scenarios require explicit validation with the target SDK version.
  5. Roslyn analyzers and diagnostics: The SDK includes 8 new analyzers DAPR1610 through DAPR1617 that catch misconfigurations directly in your IDE at you write code
  6. Standard options and simplified DI: Uses IOptions<DaprMessagingOptions> and a single services.AddDaprMessaging() method that registers options, the publishing client, source-generated subscriber dispatches, and required hosting services in a single atomic operation.

Read more about this new functionality in the docs!

Full Changelog: v1.18.7...v1.18.8