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

[Recipe] Command enrichment #3

Open
slashdotdash opened this issue Nov 28, 2019 · 0 comments
Open

[Recipe] Command enrichment #3

slashdotdash opened this issue Nov 28, 2019 · 0 comments

Comments

@slashdotdash
Copy link
Member

slashdotdash commented Nov 28, 2019

How to enrich commands before or during dispatch with external data. This data may be looked up from a read model, another service, or an external third party API.

A router middleware defining an enrichment protocol is one possible solution. Here's an example gist with middleware for command enrichment.

Note processing by an aggregate instance during comand execution blocks it from handling any other commands. Whereas router middleware is executed by the dispatching process, before the aggregate instance is called (and is non-blocking to other processes).

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

1 participant