Annotation Interface TrackSelf
When this annotation is present on a class (or its interface), Fluxzero will automatically register a handler for any implementation of that type. The resulting handler behaves like a standard external consumer: the message is first published to the appropriate message log and then tracked and processed via the configured consumer infrastructure.
Without this annotation, a payload class with handler methods (e.g., HandleCommand) would be treated as a
local handler. That means it would be executed immediately, bypassing the message log and any tracking.
You may also annotate the class with Consumer to configure message consumption in an isolated consumer.
If no @Consumer annotation is present, the handler will be assigned to the application's default consumer.
Spring integration: When using Spring, types annotated with @TrackSelf will be
detected and registered as handlers when they fall within the application's component-scan scope. They are not
exposed as regular injectable Spring beans. Type-level conditional annotations are still respected, including
ConditionalOnProperty and
ConditionalOnMissingProperty. When not using Spring, or when testing
using an asynchronous
TestFixture, you must register the class manually.
- See Also: