-
Notifications
You must be signed in to change notification settings - Fork 168
Description
I’m currently using Spring Modulith’s event publication mechanism, and I noticed that when events are stored in the database (e.g., using EventPublicationRegistry with a persistent EventPublicationRepository), the system stores basic metadata such as the event type and timestamp.
It would be useful for us to store a custom event name (a human-readable identifier) in addition to the event’s class name. This would help in logging, querying, or categorizing events more easily—especially when the same event class might be reused in different contexts.
I’d like to propose an enhancement where we could annotate the event class with a custom name, for example:
@EventName("user.registered")
public class UserRegisteredEvent {
}
The framework could then optionally persist this value along with the event metadata.
Benefits:
Makes stored event data more readable and meaningful
Helps categorize and filter events
Can aid integration with observability tools or analytics dashboards
Would this be a reasonable addition? If so, I’d be happy to help contribute or collaborate on a PR.
Thanks for the great work on Spring Modulith!