Add support for anonymous events in the ASP.NET Core Dapr event bus module: when a topic is identified as anonymous, deserialize payloads as object and forward them as AnonymousEventData to handlers. In DaprDistributedEventBus, use GetEventName(eventType, eventData) when adding to the inbox (so dynamic/topic-based names are respected) and expose IsAnonymousEvent(eventName) to detect anonymous topics.
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.
Add and centralize Subscribe/Unsubscribe(string, IEventHandlerFactory) implementations for Azure and Kafka to avoid duplicate anonymous handler registrations (checks IsInFactories / returns NullDisposable or skips adding).
Switch Kafka anonymous payload handling from JsonElement to the generic Serializer.Deserialize<object> to preserve original types.
Refactor RabbitMQ handler resolution to include anonymous handler factories by matching event names and return handler list early when concrete event type is found.
Update DistributedEventBusBase to use ResolveEventForPublishing to obtain event name and data together, and ensure GetEventData is applied at the correct point when processing incoming events.
Replace direct System.Text.Json usage with the ABP Serializer for anonymous event payloads (deserialize to object) and remove the unused System.Text.Json using. Rework Subscribe(string, IEventHandlerFactory) to avoid duplicate handler registration, return a NullDisposable when already registered, add the consumer binding when the first anonymous handler is added (note: TODO for multi-threading), and keep the new unregistrar. Prevent AnonymousEventData from being added to EventTypes when adding to the outbox. Remove the old Subscribe implementation accordingly.
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.
When generating a project with a company name containing dots (e.g.,
'Demo.App.QoL'), the template replacement was incorrectly camelCasing
the company name as 'demo.App' instead of 'demo.app'.
This was because SolutionRenamer used ToCamelCase() on the entire string
rather than on each dot-separated segment individually. The runtime JS
proxy generator (JQueryProxyScriptGenerator.CamelCaseWithNamespace) applies
camelCase to each segment, causing a mismatch.
Added ToCamelCaseWithNamespace() helper to match runtime behavior.