Repository navigation
v1.18.8
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:
- Unified publishing and subscribing: Publish events with
IDaprPublishSubscribeClient(including single events, raw byte streams, and bulk publishing) and author subscribers using a singleITopicHandler<TMessage>interface. - Three unified delivery modes: Subscriptions support
DeliveryMode.Streaming(streaming subscriptions),DeliveryMode.Programmatic(programmatic subscriptions), andDeliveryMode.Http(declarative subscriptions), all configured through the same[DaprTopic]attribute. - Source generators eliminate reflection: The
Dapr.Messaging.Generatorssource 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. - 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.Jsonmetadata. Native AOT and trimming scenarios require explicit validation with the target SDK version. - Roslyn analyzers and diagnostics: The SDK includes 8 new analyzers DAPR1610 through DAPR1617 that catch misconfigurations directly in your IDE at you write code
- Standard options and simplified DI: Uses
IOptions<DaprMessagingOptions>and a singleservices.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