{"action":"created","comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments/107379049","pull_request_review_id":28339860,"id":107379049,"diff_hunk":"@@ -31,4 +45,156 @@ Example:\n var transportConfig = endpointConfig.UseTransport<MsmqTransport>();\n \n transportConfig.MsmqLabelGenerator(context => return $\"{context.Headers['NServiceBus.EnclosedMessageTypes']}\");\n-```\n\\ No newline at end of file\n+```\n+\n+### FAQ\n+\n+##### How do I apply changes without recompiling?\n+\n+We will be providing additional packages outside the core which allows to hook in configuration sections or alike to support previous scenarios if necessary. Another approach is to show in samples how to load configuration by using `AppSettings`, `ConfigurationManager`, etc.\n+\n+## Startable and stoppable components\n+\n+```\n+class Component\n+{\n+  Task Start();\n+  Task Stop();\n+}\n+```\n+\n+* All components externally implemented but managed by the core (pipelines, satellites...) should try to gracefully stop, if they can't they should hang\n+* The core will *not* timebox any start or stop operations to allow proper debugging and analysis of misbehaving components\n+* Stop operations should be done concurrently if possible/sensible to allow all components to initiate a graceful stop\n+* `CancellationToken` and `CancellationTokenSource` are an implementation detail of the component that needs to stop and are not managed by the core\n+\n+Translating these principles into code, here is how the core handles startable and stoppable components:\n+\n+```\n+var components = new List<Component>();\n+// Start\n+foreach(cmp in components)\n+{\n+  await cmp.Start().ConfigureAwait(false);\n+}\n+\n+// Stop\n+var stopTasks = components.Select(cmp => cmp.Stop());\n+await Task.WhenAll(stopTasks);\n+```\n+\n+## Composition\n+\n+Goal: The public API of NServiceBus is a composition API consisting out of multiple capabilities. The APIs in the core are extensible enough so that [capabilities](https://github.com/Particular/Vision/labels/Capability) can extend the composition API without needing to share the same release cycle as the core, reducing the coupling and allows us to organize code in a more cohesive way.\n+\n+In order to achieve this goal a few design decision are key:\n+\n+### Folders to group capabilities\n+\n+Folders are used to group source files together to represent individual capabilities without affecting the namespace of the components grouped together in these folders\n+\n+For example the core has a Recoverability capability folder which is further divided into\n+\n+* Faults\n+* FirstLevelRetries\n+* SecondLevelRetries\n+\n+### Extension points on public APIs\n+\n+Public APIs provide extension points allowing capabilities to hook in their business logic and float required state over those APIs to various extensions.\n+\n+For example `SendOptions`, `PublishOptions` and `ReplyOptions` inherit from `ExtendableOptions` which provides a `ContextBag` to float additional state into the option classes. This state is then made available on the outgoing pipeline.\n+\n+Another example would be \"handler context\".","path":"guidelines/design-guidelines.md","position":87,"original_position":87,"commit_id":"0f9cbd878ad5cb42355f0f2d41aab35dd49c6818","original_commit_id":"0f9cbd878ad5cb42355f0f2d41aab35dd49c6818","user":{"login":"adamralph","id":677704,"avatar_url":"https://avatars1.githubusercontent.com/u/677704?v=3","gravatar_id":"","url":"https://api.github.com/users/adamralph","html_url":"https://github.com/adamralph","followers_url":"https://api.github.com/users/adamralph/followers","following_url":"https://api.github.com/users/adamralph/following{/other_user}","gists_url":"https://api.github.com/users/adamralph/gists{/gist_id}","starred_url":"https://api.github.com/users/adamralph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamralph/subscriptions","organizations_url":"https://api.github.com/users/adamralph/orgs","repos_url":"https://api.github.com/users/adamralph/repos","events_url":"https://api.github.com/users/adamralph/events{/privacy}","received_events_url":"https://api.github.com/users/adamralph/received_events","type":"User","site_admin":false},"body":"Needs some more context? 😉 ","created_at":"2017-03-22T10:34:54Z","updated_at":"2017-03-22T11:03:53Z","html_url":"https://github.com/Particular/NServiceBus/pull/4565#discussion_r107379049","pull_request_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565","_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments/107379049"},"html":{"href":"https://github.com/Particular/NServiceBus/pull/4565#discussion_r107379049"},"pull_request":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565"}}},"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565","id":111969266,"html_url":"https://github.com/Particular/NServiceBus/pull/4565","diff_url":"https://github.com/Particular/NServiceBus/pull/4565.diff","patch_url":"https://github.com/Particular/NServiceBus/pull/4565.patch","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/4565","number":4565,"state":"open","locked":false,"title":"Migrate design guidelines from platdev","user":{"login":"andreasohlund","id":125028,"avatar_url":"https://avatars2.githubusercontent.com/u/125028?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasohlund","html_url":"https://github.com/andreasohlund","followers_url":"https://api.github.com/users/andreasohlund/followers","following_url":"https://api.github.com/users/andreasohlund/following{/other_user}","gists_url":"https://api.github.com/users/andreasohlund/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasohlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasohlund/subscriptions","organizations_url":"https://api.github.com/users/andreasohlund/orgs","repos_url":"https://api.github.com/users/andreasohlund/repos","events_url":"https://api.github.com/users/andreasohlund/events{/privacy}","received_events_url":"https://api.github.com/users/andreasohlund/received_events","type":"User","site_admin":false},"body":"This is a copy paste from https://github.com/Particular/PlatformDevelopment/tree/master/designprinciples/nservicebus but some level of bike shedding and \"Adam'isation\" of the take place I guess.\r\n\r\nI choose to put it all in the same doc , we can always split later if needed","created_at":"2017-03-22T09:57:30Z","updated_at":"2017-03-22T11:03:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f2058684f4f0cc061fdb8cff7f7895cbb9b14eb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565/commits","review_comments_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565/comments","review_comment_url":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/4565/comments","statuses_url":"https://api.github.com/repos/Particular/NServiceBus/statuses/0f9cbd878ad5cb42355f0f2d41aab35dd49c6818","head":{"label":"Particular:migrate-rules-from-platdev","ref":"migrate-rules-from-platdev","sha":"0f9cbd878ad5cb42355f0f2d41aab35dd49c6818","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars3.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":1056713,"name":"NServiceBus","full_name":"Particular/NServiceBus","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars3.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus","description":"The most popular service bus for .NET","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus","forks_url":"https://api.github.com/repos/Particular/NServiceBus/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus/releases{/id}","deployments_url":"https://api.github.com/repos/Particular/NServiceBus/deployments","created_at":"2010-11-06T12:54:52Z","updated_at":"2017-03-22T04:37:40Z","pushed_at":"2017-03-22T09:57:31Z","git_url":"git://github.com/Particular/NServiceBus.git","ssh_url":"git@github.com:Particular/NServiceBus.git","clone_url":"https://github.com/Particular/NServiceBus.git","svn_url":"https://github.com/Particular/NServiceBus","homepage":"https://particular.net/nservicebus/","size":154969,"stargazers_count":1071,"watchers_count":1071,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":535,"mirror_url":null,"open_issues_count":164,"forks":535,"open_issues":164,"watchers":1071,"default_branch":"develop"}},"base":{"label":"Particular:develop","ref":"develop","sha":"5e0945f7768d3b61e3f79782025f21bd68ff0d95","user":{"login":"Particular","id":5038441,"avatar_url":"https://avatars3.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"repo":{"id":1056713,"name":"NServiceBus","full_name":"Particular/NServiceBus","owner":{"login":"Particular","id":5038441,"avatar_url":"https://avatars3.githubusercontent.com/u/5038441?v=3","gravatar_id":"","url":"https://api.github.com/users/Particular","html_url":"https://github.com/Particular","followers_url":"https://api.github.com/users/Particular/followers","following_url":"https://api.github.com/users/Particular/following{/other_user}","gists_url":"https://api.github.com/users/Particular/gists{/gist_id}","starred_url":"https://api.github.com/users/Particular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Particular/subscriptions","organizations_url":"https://api.github.com/users/Particular/orgs","repos_url":"https://api.github.com/users/Particular/repos","events_url":"https://api.github.com/users/Particular/events{/privacy}","received_events_url":"https://api.github.com/users/Particular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Particular/NServiceBus","description":"The most popular service bus for .NET","fork":false,"url":"https://api.github.com/repos/Particular/NServiceBus","forks_url":"https://api.github.com/repos/Particular/NServiceBus/forks","keys_url":"https://api.github.com/repos/Particular/NServiceBus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Particular/NServiceBus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Particular/NServiceBus/teams","hooks_url":"https://api.github.com/repos/Particular/NServiceBus/hooks","issue_events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/events{/number}","events_url":"https://api.github.com/repos/Particular/NServiceBus/events","assignees_url":"https://api.github.com/repos/Particular/NServiceBus/assignees{/user}","branches_url":"https://api.github.com/repos/Particular/NServiceBus/branches{/branch}","tags_url":"https://api.github.com/repos/Particular/NServiceBus/tags","blobs_url":"https://api.github.com/repos/Particular/NServiceBus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Particular/NServiceBus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Particular/NServiceBus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Particular/NServiceBus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Particular/NServiceBus/statuses/{sha}","languages_url":"https://api.github.com/repos/Particular/NServiceBus/languages","stargazers_url":"https://api.github.com/repos/Particular/NServiceBus/stargazers","contributors_url":"https://api.github.com/repos/Particular/NServiceBus/contributors","subscribers_url":"https://api.github.com/repos/Particular/NServiceBus/subscribers","subscription_url":"https://api.github.com/repos/Particular/NServiceBus/subscription","commits_url":"https://api.github.com/repos/Particular/NServiceBus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Particular/NServiceBus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Particular/NServiceBus/contents/{+path}","compare_url":"https://api.github.com/repos/Particular/NServiceBus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Particular/NServiceBus/merges","archive_url":"https://api.github.com/repos/Particular/NServiceBus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Particular/NServiceBus/downloads","issues_url":"https://api.github.com/repos/Particular/NServiceBus/issues{/number}","pulls_url":"https://api.github.com/repos/Particular/NServiceBus/pulls{/number}","milestones_url":"https://api.github.com/repos/Particular/NServiceBus/milestones{/number}","notifications_url":"https://api.github.com/repos/Particular/NServiceBus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Particular/NServiceBus/labels{/name}","releases_url":"https://api.github.com/repos/Particular/NServiceBus/releases{/id}","deployments_url":"https://api.github.com/repos/Particular/NServiceBus/deployments","created_at":"2010-11-06T12:54:52Z","updated_at":"2017-03-22T04:37:40Z","pushed_at":"2017-03-22T09:57:31Z","git_url":"git://github.com/Particular/NServiceBus.git","ssh_url":"git@github.com:Particular/NServiceBus.git","clone_url":"https://github.com/Particular/NServiceBus.git","svn_url":"https://github.com/Particular/NServiceBus","homepage":"https://particular.net/nservicebus/","size":154969,"stargazers_count":1071,"watchers_count":1071,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":535,"mirror_url":null,"open_issues_count":164,"forks":535,"open_issues":164,"watchers":1071,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565"},"html":{"href":"https://github.com/Particular/NServiceBus/pull/4565"},"issue":{"href":"https://api.github.com/repos/Particular/NServiceBus/issues/4565"},"comments":{"href":"https://api.github.com/repos/Particular/NServiceBus/issues/4565/comments"},"review_comments":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565/comments"},"review_comment":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Particular/NServiceBus/pulls/4565/commits"},"statuses":{"href":"https://api.github.com/repos/Particular/NServiceBus/statuses/0f9cbd878ad5cb42355f0f2d41aab35dd49c6818"}}}}
{"actor":{"display_login":"adamralph"}}