Skip to content

feat: Custom Event Subjects#25

Merged
romshark merged 6 commits intomainfrom
custom-event-subject-prefix
Mar 17, 2026
Merged

feat: Custom Event Subjects#25
romshark merged 6 commits intomainfrom
custom-event-subject-prefix

Conversation

@romshark
Copy link
Owner

This PR Generalizes the old TargetUserIDs event field into a flexible subject field system. EventXXX structs can now declare any number of SubjectXXX fields (type []string, tag json:"-") that are combined as a Cartesian product and appended to the event's base NATS subject at dispatch time. SubjectUser retains the special behavior of making the event private (requiring a Session type).

BREAKING:
The TargetUserIDs []string field on event structs is replaced by SubjectUser []string. Rename the field in all event type definitions and dispatch call sites.

@romshark romshark self-assigned this Mar 17, 2026
@romshark romshark added the feature New feature label Mar 17, 2026
@romshark romshark merged commit 7af330a into main Mar 17, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant