The message bus instance to use for creating subscriptions.
Optional
onTransformedClass: (transformedClass: Ctor, originalClass: Ctor) => voidAn optional callback invoked with the class created
by this decorator (transformedClass
) and the original class (originalClass
).
Useful for registering the new class externally.
Class decorator that automatically subscribes to topics based on method parameter decorators.
This decorator inspects the decorated class looking for methods with topic-decorated parameters, and subscribes to those topics using the provided
messageBus
.When a message is published, the decorated parameter's method is invoked with the message data. If the class instance is garbage collected, the topic subscription is automatically disposed.