{"action":"created","issue":{"url":"https://api.github.com/repos/adrai/node-cqrs-domain/issues/73","repository_url":"https://api.github.com/repos/adrai/node-cqrs-domain","labels_url":"https://api.github.com/repos/adrai/node-cqrs-domain/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/adrai/node-cqrs-domain/issues/73/comments","events_url":"https://api.github.com/repos/adrai/node-cqrs-domain/issues/73/events","html_url":"https://github.com/adrai/node-cqrs-domain/issues/73","id":147256728,"number":73,"title":"Communicating between bounded contexts","user":{"login":"hilkeheremans","id":10352224,"avatar_url":"https://avatars.githubusercontent.com/u/10352224?v=3","gravatar_id":"","url":"https://api.github.com/users/hilkeheremans","html_url":"https://github.com/hilkeheremans","followers_url":"https://api.github.com/users/hilkeheremans/followers","following_url":"https://api.github.com/users/hilkeheremans/following{/other_user}","gists_url":"https://api.github.com/users/hilkeheremans/gists{/gist_id}","starred_url":"https://api.github.com/users/hilkeheremans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hilkeheremans/subscriptions","organizations_url":"https://api.github.com/users/hilkeheremans/orgs","repos_url":"https://api.github.com/users/hilkeheremans/repos","events_url":"https://api.github.com/users/hilkeheremans/events{/privacy}","received_events_url":"https://api.github.com/users/hilkeheremans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-10T19:42:46Z","updated_at":"2016-04-10T21:20:55Z","closed_at":null,"body":"Hey @adrai,\r\n\r\nI would love your input on this. It regularly happens that we need to communicate between several bounded contexts at times. Ie, a change occurs in BC1 and we want BC2 to react or update some data in response to that. Let's assume it is OK if this update is eventually consistent (we are in a microservice situation). Creating one large bounded context or aggregate is not really an option in this case.\r\n\r\nSince node-cqrs-domain does not seem to have a direct way of listening for / reacting to events originating from outside the domain, how would you organise this using your packages?\r\n\r\nSome potential solutions I can imagine:\r\n- using saga's to convert such events to commands: seems a little hackey since saga's are more intended for long lived processes\r\n- using a hacked together custom command handler. Inevitably dirty.\r\n- writing a custom converter which we hook up to node-cqrs-domain and which converts the events to commands\r\n\r\nI'm probably missing a few ideas, which is why I'm reaching out. What would you recommend?\r\n\r\nThanks again for the great work!\r\nHilke"},"comment":{"url":"https://api.github.com/repos/adrai/node-cqrs-domain/issues/comments/208076631","html_url":"https://github.com/adrai/node-cqrs-domain/issues/73#issuecomment-208076631","issue_url":"https://api.github.com/repos/adrai/node-cqrs-domain/issues/73","id":208076631,"user":{"login":"adrai","id":1086194,"avatar_url":"https://avatars.githubusercontent.com/u/1086194?v=3","gravatar_id":"","url":"https://api.github.com/users/adrai","html_url":"https://github.com/adrai","followers_url":"https://api.github.com/users/adrai/followers","following_url":"https://api.github.com/users/adrai/following{/other_user}","gists_url":"https://api.github.com/users/adrai/gists{/gist_id}","starred_url":"https://api.github.com/users/adrai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrai/subscriptions","organizations_url":"https://api.github.com/users/adrai/orgs","repos_url":"https://api.github.com/users/adrai/repos","events_url":"https://api.github.com/users/adrai/events{/privacy}","received_events_url":"https://api.github.com/users/adrai/received_events","type":"User","site_admin":false},"created_at":"2016-04-10T21:20:55Z","updated_at":"2016-04-10T21:20:55Z","body":"if stale data is ok... I would recommend a saga...\r\nif not then custom command handler and pray ;-)"}}