{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/3897","repository_url":"https://api.github.com/repos/Particular/NServiceBus","labels_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3897/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3897/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3897/events","html_url":"https://github.com/Particular/NServiceBus/issues/3897","id":163351002,"number":3897,"title":"Move .PurgeOnStartup(bool) to Transport","user":{"login":"ramonsmits","id":152998,"avatar_url":"https://avatars.githubusercontent.com/u/152998?v=3","gravatar_id":"","url":"https://api.github.com/users/ramonsmits","html_url":"https://github.com/ramonsmits","followers_url":"https://api.github.com/users/ramonsmits/followers","following_url":"https://api.github.com/users/ramonsmits/following{/other_user}","gists_url":"https://api.github.com/users/ramonsmits/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonsmits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonsmits/subscriptions","organizations_url":"https://api.github.com/users/ramonsmits/orgs","repos_url":"https://api.github.com/users/ramonsmits/repos","events_url":"https://api.github.com/users/ramonsmits/events{/privacy}","received_events_url":"https://api.github.com/users/ramonsmits/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Particular/NServiceBus/labels/Tag:%20Breaking%20Change","name":"Tag: Breaking Change","color":"e102d8"},{"url":"https://api.github.com/repos/Particular/NServiceBus/labels/Type:%20Refactoring","name":"Type: Refactoring","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Particular/NServiceBus/milestones/144","html_url":"https://github.com/Particular/NServiceBus/milestones/7.0.0","labels_url":"https://api.github.com/repos/Particular/NServiceBus/milestones/144/labels","id":1587937,"number":144,"title":"7.0.0","description":"","creator":{"login":"andreasohlund","id":125028,"avatar_url":"https://avatars.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},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2016-02-17T09:32:58Z","updated_at":"2016-09-05T19:41:22Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2016-07-01T09:02:44Z","updated_at":"2016-09-23T06:00:11Z","closed_at":null,"body":"Purge on startup seems to be a transport option. ASB does not support purge on startup and so it's strange that this method is even available in the configuration.\r\n\r\nBy moving it to the transport the transport config can add support for purge on startup or not.\r\n\r\nIt also can make the following suggestion easier to implement: https://github.com/Particular/NServiceBus.SqlServer/issues/203#issuecomment-229895194\r\n\r\n```c#\r\nconfig.UseTransport<SqlServer>().PurgeMode(PurgeMode.Truncate);\r\nconfig.PurgeOnStartup(true); // If purge mode is not called, throw an exception stating that selecting a purge mode is explicit.\r\n```\r\n\r\nvs.\r\n\r\n```c#\r\nconfig\r\n    .UseTransport<SqlServer>()\r\n        .PurgeOnStartup(true)\r\n            .PurgeMode(PurgeMode.Truncate);\r\n\r\n// or\r\nconfig\r\n    .UseTransport<SqlServer>()\r\n        .PurgeOnStartup(true, PurgeMode.Truncate)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments/249109716","html_url":"https://github.com/Particular/NServiceBus/issues/3897#issuecomment-249109716","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3897","id":249109716,"user":{"login":"andreasohlund","id":125028,"avatar_url":"https://avatars.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},"created_at":"2016-09-23T06:00:11Z","updated_at":"2016-09-23T06:00:11Z","body":"The sceanarios I know of:\r\n\r\n* Smart client starting after a long period of being offline\r\n\r\nShould be ok\r\n\r\n* Website starting after being offline for a longer period of time\r\n\r\nI think this will even be improved since we currently would purge on app pool recycles which would be unessesary. Now admins can just execute the script as part of the startup procedure/provisioning/whatever of the specific web instance?\r\n\r\n@SeanFeldman @yvesgoeleven azure websites etc has hooks for this right?"}}
{"actor":{"display_login":"andreasohlund"}}