{"action":"created","issue":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/428","repository_url":"https://api.github.com/repos/rebus-org/Rebus","labels_url":"https://api.github.com/repos/rebus-org/Rebus/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/rebus-org/Rebus/issues/428/comments","events_url":"https://api.github.com/repos/rebus-org/Rebus/issues/428/events","html_url":"https://github.com/rebus-org/Rebus/issues/428","id":142112908,"number":428,"title":"timeout exceptions when using azure servicebus","user":{"login":"dampee","id":1857460,"avatar_url":"https://avatars.githubusercontent.com/u/1857460?v=3","gravatar_id":"","url":"https://api.github.com/users/dampee","html_url":"https://github.com/dampee","followers_url":"https://api.github.com/users/dampee/followers","following_url":"https://api.github.com/users/dampee/following{/other_user}","gists_url":"https://api.github.com/users/dampee/gists{/gist_id}","starred_url":"https://api.github.com/users/dampee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dampee/subscriptions","organizations_url":"https://api.github.com/users/dampee/orgs","repos_url":"https://api.github.com/users/dampee/repos","events_url":"https://api.github.com/users/dampee/events{/privacy}","received_events_url":"https://api.github.com/users/dampee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2016-03-20T00:01:59Z","updated_at":"2016-04-22T10:20:01Z","closed_at":null,"body":"I get a lot of exceptions when using azure servicebus as transport.  Using 0.99.23 currently.\r\n\r\nAny idea where i need to start searching.  \r\n\r\n```\r\n20/03/2016 0:55:28 +01:00: System.OperationCanceledException: This messaging entity has already been closed, aborted, or disposed.\r\n   at Microsoft.ServiceBus.Messaging.ClientEntity.ThrowIfClosed()\r\n   at Microsoft.ServiceBus.Messaging.QueueClient.BeginCreateSender(TimeSpan timeout, AsyncCallback callback, Object state)\r\n   at Microsoft.ServiceBus.Messaging.QueueClient.EnsureCreateInternalSender()\r\n   at Microsoft.ServiceBus.Messaging.QueueClient.ThrowIfSenderNull(String operationName)\r\n   at Microsoft.ServiceBus.Messaging.QueueClient.SendAsync(BrokeredMessage message)\r\n   at Rebus.AzureServiceBus.AzureServiceBusTransport.<Send>d__38.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.AzureServiceBus.AzureServiceBusTransport.<>c__DisplayClass37_2.<<GetOutgoingMessages>b__3>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.AzureServiceBus.Retrier.<Execute>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.AzureServiceBus.AzureServiceBusTransport.<>c__DisplayClass37_3.<<GetOutgoingMessages>b__2>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.AzureServiceBus.AzureServiceBusTransport.<>c__DisplayClass37_1.<<GetOutgoingMessages>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.Transport.DefaultTransactionContext.<Invoke>d__25.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.Transport.DefaultTransactionContext.<Commit>d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Rebus.Retry.Simple.SimpleRetryStrategyStep.<DispatchWithTrackerIdentifier>d__8.MoveNext()\r\n```"},"comment":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/comments/213368874","html_url":"https://github.com/rebus-org/Rebus/issues/428#issuecomment-213368874","issue_url":"https://api.github.com/repos/rebus-org/Rebus/issues/428","id":213368874,"user":{"login":"mookid8000","id":32968,"avatar_url":"https://avatars.githubusercontent.com/u/32968?v=3","gravatar_id":"","url":"https://api.github.com/users/mookid8000","html_url":"https://github.com/mookid8000","followers_url":"https://api.github.com/users/mookid8000/followers","following_url":"https://api.github.com/users/mookid8000/following{/other_user}","gists_url":"https://api.github.com/users/mookid8000/gists{/gist_id}","starred_url":"https://api.github.com/users/mookid8000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookid8000/subscriptions","organizations_url":"https://api.github.com/users/mookid8000/orgs","repos_url":"https://api.github.com/users/mookid8000/repos","events_url":"https://api.github.com/users/mookid8000/events{/privacy}","received_events_url":"https://api.github.com/users/mookid8000/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T10:20:01Z","updated_at":"2016-04-22T10:20:01Z","body":"> you should await activator.Bus.SendLocal(message)\r\n\r\nIf you can't `await bus.Send` you should `bus.Send(..).Wait()`\r\n\r\nBut that can actually end up causing a deadlock if you do it in a handler because of the [problem described here](http://stackoverflow.com/questions/15021304/an-async-await-example-that-causes-a-deadlock).\r\n\r\nIt is definitely best if you could somehow make an `async` path that allows you to `await`"}}