{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/3195","labels_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3195/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3195/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3195/events","html_url":"https://github.com/Particular/NServiceBus/pull/3195","id":121467843,"number":3195,"title":"XML file based routing","user":{"login":"SzymonPobiega","id":163318,"avatar_url":"https://avatars.githubusercontent.com/u/163318?v=3","gravatar_id":"","url":"https://api.github.com/users/SzymonPobiega","html_url":"https://github.com/SzymonPobiega","followers_url":"https://api.github.com/users/SzymonPobiega/followers","following_url":"https://api.github.com/users/SzymonPobiega/following{/other_user}","gists_url":"https://api.github.com/users/SzymonPobiega/gists{/gist_id}","starred_url":"https://api.github.com/users/SzymonPobiega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SzymonPobiega/subscriptions","organizations_url":"https://api.github.com/users/SzymonPobiega/orgs","repos_url":"https://api.github.com/users/SzymonPobiega/repos","events_url":"https://api.github.com/users/SzymonPobiega/events{/privacy}","received_events_url":"https://api.github.com/users/SzymonPobiega/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Particular/NServiceBus/labels/State:%20In%20Progress","name":"State: In Progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"SzymonPobiega","id":163318,"avatar_url":"https://avatars.githubusercontent.com/u/163318?v=3","gravatar_id":"","url":"https://api.github.com/users/SzymonPobiega","html_url":"https://github.com/SzymonPobiega","followers_url":"https://api.github.com/users/SzymonPobiega/followers","following_url":"https://api.github.com/users/SzymonPobiega/following{/other_user}","gists_url":"https://api.github.com/users/SzymonPobiega/gists{/gist_id}","starred_url":"https://api.github.com/users/SzymonPobiega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SzymonPobiega/subscriptions","organizations_url":"https://api.github.com/users/SzymonPobiega/orgs","repos_url":"https://api.github.com/users/SzymonPobiega/repos","events_url":"https://api.github.com/users/SzymonPobiega/events{/privacy}","received_events_url":"https://api.github.com/users/SzymonPobiega/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-12-10T11:57:17Z","updated_at":"2015-12-16T08:42:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus/pulls/3195","html_url":"https://github.com/Particular/NServiceBus/pull/3195","diff_url":"https://github.com/Particular/NServiceBus/pull/3195.diff","patch_url":"https://github.com/Particular/NServiceBus/pull/3195.patch"},"body":"This pull refactors the existing file-based routing to be more production ready. In order to do it properly I've redesigned the `Endpoint` class, replacing the `transport discriminator` with a generic property bag. The usage is following\r\n\r\n```\r\nvar i = new EndpointInstance(\"Sales\").SetProperty(\"schema\", \"nsb\");\r\n```\r\n\r\nTransports might provide specific extension methods:\r\n\r\n```\r\n//MSMQ queue@machine\r\nvar i = new EndpointInstance(\"Sales\").AtMachine(\"MyMachine\");\r\n```\r\n\r\nThe bag in future might support other properties (e.g. SQL Server's `schema` or gateway's `site`).\r\n\r\nOther changes:\r\n * Removed exception when trying to scale out without providing user or transport discriminator. This is because the bag that replaced transport discriminator not necessarily guarantees name uniqueness.\r\n * Renamed `UniqueQueuePerEndpointInstance` to `UniqueInstanceDiscriminator`\r\n\r\n### XML file based routing\r\n\r\nThe sample XML file is following:\r\n\r\n```\r\n<endpoints>\r\n    <endpoint name=\"A\">\r\n        <instance discriminator=\"D1\" prop1=\"V1\" prop2=\"V2\"/>\r\n        <instance prop3=\"V3\" prop4=\"V4\"/>\r\n    </endpoint>\r\n    <endpoint name=\"B\">\r\n        <instance discriminator=\"D2\" prop5=\"V5\" prop6=\"V6\"/>\r\n    </endpoint>\r\n</endpoints>\r\n```\r\n\r\nThe only mandatory attribute is endpoint `name`. Parsing is lax, using DOM. The file based routing table checks the file every couple of seconds (removed file system watcher). If the file does not exist when starting up, the endpoint fails to start. If the file is deleted during run-time, errors are logged but endpoint is not killed.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments/165033805","html_url":"https://github.com/Particular/NServiceBus/pull/3195#issuecomment-165033805","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3195","id":165033805,"user":{"login":"SzymonPobiega","id":163318,"avatar_url":"https://avatars.githubusercontent.com/u/163318?v=3","gravatar_id":"","url":"https://api.github.com/users/SzymonPobiega","html_url":"https://github.com/SzymonPobiega","followers_url":"https://api.github.com/users/SzymonPobiega/followers","following_url":"https://api.github.com/users/SzymonPobiega/following{/other_user}","gists_url":"https://api.github.com/users/SzymonPobiega/gists{/gist_id}","starred_url":"https://api.github.com/users/SzymonPobiega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SzymonPobiega/subscriptions","organizations_url":"https://api.github.com/users/SzymonPobiega/orgs","repos_url":"https://api.github.com/users/SzymonPobiega/repos","events_url":"https://api.github.com/users/SzymonPobiega/events{/privacy}","received_events_url":"https://api.github.com/users/SzymonPobiega/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T08:42:28Z","updated_at":"2015-12-16T08:42:28Z","body":"@timbussmann Implemented everything but the dictionary change. I'll try to spike it now to see if I like it. Thank!"}}