Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify event type resolver for subscriptions #837

Merged
merged 3 commits into from
Dec 30, 2020

Conversation

mpraglowski
Copy link
Member

Make implicit explicit. Type resolver is reponsible
for converting event type from anything (class, string, etc)
to event type (string preffered here).

Default implementation (backward compatible) is just
lambda using to_s method to convert event type
given as class or string to string.

mostlyobvious referenced this pull request Dec 21, 2020
* do not expose subscribers from broker
* rely on event type (naming), update method
  description & simplify implementation
Make implicit explicit. Type resolver is reponsible
for converting event type from anything (class, string, etc)
to event type (string preffered here).

Default implementation (backward compatible) is just
lambda using to_s method to convert event type
given as class or string to string.
Event type resolver will be invoked by subscriptions
objects in all_for method. No need to use to_s here.
That's responsibility of the event type resolver.
@mostlyobvious mostlyobvious merged commit cd47d95 into master Dec 30, 2020
@mostlyobvious mostlyobvious deleted the event-type-resolver branch December 30, 2020 20:23
@mostlyobvious
Copy link
Member

@mpraglowski this needs to cover aggregate_root as well

@mostlyobvious mostlyobvious mentioned this pull request Jan 1, 2021
mostlyobvious added a commit that referenced this pull request Jan 5, 2021
mostlyobvious added a commit that referenced this pull request Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants