{"action":"created","issue":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/292","labels_url":"https://api.github.com/repos/rebus-org/Rebus/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/rebus-org/Rebus/issues/292/comments","events_url":"https://api.github.com/repos/rebus-org/Rebus/issues/292/events","html_url":"https://github.com/rebus-org/Rebus/pull/292","id":56165858,"number":292,"title":"SendAsync support ","user":{"login":"DixonD-git","id":1036478,"avatar_url":"https://avatars.githubusercontent.com/u/1036478?v=3","gravatar_id":"","url":"https://api.github.com/users/DixonD-git","html_url":"https://github.com/DixonD-git","followers_url":"https://api.github.com/users/DixonD-git/followers","following_url":"https://api.github.com/users/DixonD-git/following{/other_user}","gists_url":"https://api.github.com/users/DixonD-git/gists{/gist_id}","starred_url":"https://api.github.com/users/DixonD-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DixonD-git/subscriptions","organizations_url":"https://api.github.com/users/DixonD-git/orgs","repos_url":"https://api.github.com/users/DixonD-git/repos","events_url":"https://api.github.com/users/DixonD-git/events{/privacy}","received_events_url":"https://api.github.com/users/DixonD-git/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-01T14:54:42Z","updated_at":"2015-02-05T10:29:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rebus-org/Rebus/pulls/292","html_url":"https://github.com/rebus-org/Rebus/pull/292","diff_url":"https://github.com/rebus-org/Rebus/pull/292.diff","patch_url":"https://github.com/rebus-org/Rebus/pull/292.patch"},"body":"Related to https://github.com/rebus-org/Rebus/issues/291. \r\n\r\nI've finished (I hope) the core of ```SendAsync``` support (```RebusBus```, configuration etc) but I when started working on the actual transport implementation ```FileSystemMessageQueue```, I had the confusion that I mentioned earlier but, I guess, not properly explained, with the following piece of code:\r\n```if (context.IsTransactional)\r\n{\r\n    context.DoCommit += commitAction;\r\n}\r\nelse\r\n{\r\n    commitAction();\r\n}```\r\n\r\nIn case of ```SendAsync```, ```commitAction``` here should be rather ```Func<Task>``` and awaited later in ```AmbientTransactionContext.Commit```, for instance. So I don't how to resolve this better. Maybe, we should have separate sync and async versions of ```ITransactionContext```, which doesn't sound like a good idea.\r\n\r\nLet know if I should try harder explaining what I have in my mind:)  "},"comment":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/comments/73025195","html_url":"https://github.com/rebus-org/Rebus/pull/292#issuecomment-73025195","issue_url":"https://api.github.com/repos/rebus-org/Rebus/issues/292","id":73025195,"user":{"login":"asgerhallas","id":299575,"avatar_url":"https://avatars.githubusercontent.com/u/299575?v=3","gravatar_id":"","url":"https://api.github.com/users/asgerhallas","html_url":"https://github.com/asgerhallas","followers_url":"https://api.github.com/users/asgerhallas/followers","following_url":"https://api.github.com/users/asgerhallas/following{/other_user}","gists_url":"https://api.github.com/users/asgerhallas/gists{/gist_id}","starred_url":"https://api.github.com/users/asgerhallas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asgerhallas/subscriptions","organizations_url":"https://api.github.com/users/asgerhallas/orgs","repos_url":"https://api.github.com/users/asgerhallas/repos","events_url":"https://api.github.com/users/asgerhallas/events{/privacy}","received_events_url":"https://api.github.com/users/asgerhallas/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T10:29:37Z","updated_at":"2015-02-05T10:29:37Z","body":"If you send a message async, does that mean that it will be sent before the transaction is committed? "}}