- Remove "Unknown event name" exception from all providers and LocalEventBus
to match typed PublishAsync behavior (no handler = silent, not exception)
- Use ABP's IJsonSerializer instead of System.Text.Json for ConvertDynamicEventData
to respect configured JSON serialization options
Add native anonymous event support and simplify handling across transports. AnonymousEventData now contains conversion helpers (ConvertToTypedObject/ConvertToTypedObject<T>/ConvertToTypedObject -> loose typed object), caching JSON elements and replacing the removed AnonymousEventDataConverter. Multiple distributed event bus implementations (Azure, Dapr, Kafka, RabbitMQ, Rebus) were updated to: detect anonymous handlers via AnonymousHandlerFactories, construct AnonymousEventData when appropriate, resolve event types at publish/process time, simplify Subscribe/Unsubscribe logic (avoid duplicate-factory checks using IsInFactories then add), and throw on unknown event names in PublishAsync. AbpAspNetCoreMvcDaprEventBusModule was refactored to deserialize and trigger handlers inline for both envelope and direct Dapr events. Tests updated accordingly and a small cursor hook state file was added.
Centralize and simplify anonymous event handling across transports. Introduces AnonymousEventDataConverter and changes AnonymousEventData to store optional JsonData with a FromJson factory. Adds helpers (CreateAnonymousEnvelope, TryPublishTypedByEventNameAsync, TryResolveStoredEventData, TryResolveIncomingEvent) and unifies handling logic in Dapr/Azure/Kafka/RabbitMQ/Rebus implementations. Also deduplicates subscription registration using locking, cleans up empty anonymous handler maps, and removes duplicated JSON conversion code. Tests updated to match the new anonymous event semantics.
RebusDistributedEventBus: properly handle AnonymousEventData by extracting its EventName when processing, wrap deserialized anonymous payloads into AnonymousEventData, and subscribe to AnonymousEventData when the first anonymous handler is registered (note: a TODO about multi-threading remains).
DistDemoApp.MongoDbRebus Program: replace the previous Host/Serilog-driven async Main with an ABP application bootstrap using AbpApplicationFactory. The new Main initializes the ABP app, runs DemoService.CreateTodoItemAsync via AsyncHelper.RunSync, and then shuts down; prior Serilog/host startup code has been commented out and ABP logging/Serilog services are wired up.
Introduce AnonymousEventData and add name-based (string) event publish/subscribe APIs across the event bus.
Key changes:
- New AnonymousEventData class with conversion helpers (ConvertToTypedObject/ConvertToTypedObject<T>/ConvertToTypedObject(Type)) and caching for JsonElement payloads.
- Extended IEventBus and IDistributedEventBus interfaces with PublishAsync(string, ...), Subscribe/Unsubscribe/UnsubscribeAll overloads that accept string event names and factories/handlers.
- DistributedEventBusBase implements name-based PublishAsync and Subscribe overloads and adapts anonymous event publishing to typed flows.
- Updated concrete distributed bus implementations (Azure, Dapr, Kafka, RabbitMQ, Rebus, Local) to support anonymous handlers, inbox/outbox processing for anonymous events, serialization helpers, and handler-factory management. Changes include deduplication when registering factories, removal helpers for single-instance handlers, and preserving EventTypes mapping (AnonymousEventData is not added to EventTypes).
- Fixed/centralized logic for mapping event names <-> event types, handler lookup (including anonymous handlers), and outbox/inbox processing so both typed and anonymous (name-based) events are handled consistently.
Compatibility: existing typed event handling is preserved; new string-based APIs allow publishing and subscribing to events identified only by name.
Introduce AnonymousEventData and add support for anonymous (name-based) events across the event bus implementations. Adds string-based Subscribe/Unsubscribe APIs, anonymous handler factories, and handling in distributed providers (Azure, Dapr, Kafka, RabbitMQ, Rebus) and local buses. Update EventBusBase and DistributedEventBusBase to resolve event names/data (GetEventName/GetEventData/ResolveEventForPublishing) and route/serialize/deserialize anonymous payloads. Also add AnonymousEventHandlerFactoryUnregistrar and minimal NullDistributedEventBus implementations, plus tests for anonymous local events.
Introduce a new IEventBus.PublishAsync(string eventName, ...) overload and make EventBusBase declare it. Implementations for Azure, Dapr, Kafka, RabbitMQ, Rebus, LocalDistributedEventBus and LocalEventBus resolve the event Type from an EventTypes map and delegate to the existing type-based PublishAsync. LocalEventBus now maintains an EventTypes dictionary (populated on Subscribe) to map event names to types. Unknown event names now throw an AbpException.