Last active
November 9, 2017 16:33
-
-
Save yellowbrickc/af556571a733fc5c20be01ea9ae487dc to your computer and use it in GitHub Desktop.
Domain event documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: different business teams building parts of a product, splitted by business domains. We are anly communicate via domain events published to a message bus and sometimes via published links. | |
As the domain events are the "contracts" between the business domains we want to declare and enforce the schemas of the events. | |
Our solution is built in node but the concept could work in any stack. |
Wow! There is a lot of complexity in this workflow proposal. The schema looks pretty common. Maybe you are doing something too unclear / much things with this kind of "messaging"?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Components:
"build": "doca init -i node_modules/domain-events/json-schema"
This solve the problem of the documentation but we want to enforce that only events published as domain-event are allowed on the message bus. On the other hand all we have shared packages to produce respectively consumer events from our bus. After this it was the easy and logical step to include the domain-event package in the consumer/producer packages and use it there in the validation step. Additionally in order to be backward compatible we allow unknown properties in the consumer validation but not in the producer validation.
Regarding the (current) process: