{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/3590","repository_url":"https://api.github.com/repos/Particular/NServiceBus","labels_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3590/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3590/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3590/events","html_url":"https://github.com/Particular/NServiceBus/issues/3590","id":140864870,"number":3590,"title":"`Defer` always routes message to local endpoint","user":{"login":"mikeminutillo","id":124014,"avatar_url":"https://avatars.githubusercontent.com/u/124014?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeminutillo","html_url":"https://github.com/mikeminutillo","followers_url":"https://api.github.com/users/mikeminutillo/followers","following_url":"https://api.github.com/users/mikeminutillo/following{/other_user}","gists_url":"https://api.github.com/users/mikeminutillo/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeminutillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeminutillo/subscriptions","organizations_url":"https://api.github.com/users/mikeminutillo/orgs","repos_url":"https://api.github.com/users/mikeminutillo/repos","events_url":"https://api.github.com/users/mikeminutillo/events{/privacy}","received_events_url":"https://api.github.com/users/mikeminutillo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-15T03:56:55Z","updated_at":"2016-03-15T10:53:03Z","closed_at":null,"body":"Let's say we have two endpoints A and B. Message M is configured to be routed to B.\r\n\r\nIf A does `bus.Send(new M());` then the message will be delivered to `IHandleMessages<M>` inside of endpoint B.\r\n\r\nIf A does `bus.Defer(TimeSpan.FromSeconds(30), new M());` then in 30 seconds the message will be delivered to `IHandleMessages<M>` inside of **A**. I would expect it to go to B (as with a Send).\r\n\r\nThe fix for https://github.com/Particular/NServiceBus/issues/2353 always overrides the address to be the local endpoint address. This was not the case before. Here is the commit that changed this behavior: https://github.com/Particular/NServiceBus/commit/a6048e0bc9fc871c3397ad9e78cc0f0531800e5e\r\n\r\nThis came up in a doco change https://github.com/Particular/docs.particular.net/issues/1258"},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments/196763918","html_url":"https://github.com/Particular/NServiceBus/issues/3590#issuecomment-196763918","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/3590","id":196763918,"user":{"login":"WojcikMike","id":604826,"avatar_url":"https://avatars.githubusercontent.com/u/604826?v=3","gravatar_id":"","url":"https://api.github.com/users/WojcikMike","html_url":"https://github.com/WojcikMike","followers_url":"https://api.github.com/users/WojcikMike/followers","following_url":"https://api.github.com/users/WojcikMike/following{/other_user}","gists_url":"https://api.github.com/users/WojcikMike/gists{/gist_id}","starred_url":"https://api.github.com/users/WojcikMike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WojcikMike/subscriptions","organizations_url":"https://api.github.com/users/WojcikMike/orgs","repos_url":"https://api.github.com/users/WojcikMike/repos","events_url":"https://api.github.com/users/WojcikMike/events{/privacy}","received_events_url":"https://api.github.com/users/WojcikMike/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T10:53:03Z","updated_at":"2016-03-15T10:53:03Z","body":"@mikeminutillo when  i checked the commit that you presented I don't see it changing the behavior. \r\nThe line that was removed in this checking was:\r\n`var options = new SendOptions(Configure.LocalAddress)` \r\nand it was changed to:\r\n`if (Settings.GetOrDefault<bool>(\"Worker.Enabled\"))  { \r\n                 options = new SendOptions(Settings.Get<Address>(\"MasterNode.Address\"));\r\n             }\r\n             else  {\r\n                 options = new SendOptions(Configure.LocalAddress);\r\n             }`\r\n\r\nSo no behavior was changed in here, beyond sending the message to Master queue when using distributor. As a part of doco change I build sample for v3-5 and in every one of them Defer works in exactly the same manner. And as I was able to find questions on stack overflow about Defer and some articles I believe there are people that uses it:\r\nhttps://mgmccarthy.wordpress.com/2015/05/12/deferring-messages-in-nservicebus-4/\r\n"}}