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

how to deal with side effects? #39

Closed
stephanos opened this issue Mar 14, 2015 · 4 comments
Closed

how to deal with side effects? #39

stephanos opened this issue Mar 14, 2015 · 4 comments

Comments

@stephanos
Copy link

Is there a best practice on how to deal with side effects (e.g. email sending, external API calls)? If implemented in events, a replay of events would re-trigger them, which is usually not what you want.

@adrai
Copy link
Contributor

adrai commented Mar 14, 2015

It really depends on your architecture but: you can use eventExtenders (will not be called during replay) or with viewBuilders by marking the used collection with "noReplay"

@stephanos
Copy link
Author

Thanks for the suggestions! I don't have an architecture yet :)
May I ask, how do you do it in your project(s)?

@adrai
Copy link
Contributor

adrai commented Mar 14, 2015

Stuff like email sending, with viewBuilders and eventExtenders...
And more important stuff with sagas... (cqrs-saga)

@stephanos
Copy link
Author

Thanks.

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

No branches or pull requests

2 participants