Azure ServiceBus TopicClient의 SendAsync 메소드가 제대로 구현 되었습니까?Azure ServiceBus TopicClient 자신의 래퍼에서 SendAsync 구현
두 번째 구현에서 실제로 SendAsync가 발생하기 전에 BrokeredMessage가 삭제됩니까?
public async Task SendAsync<TMessage>(TMessage message, IDictionary<string, object> properties = null)
{
using (var bm = MessagingHelper.CreateBrokeredMessage(message, properties))
{
await this._topicClient.Value.SendAsync(bm);
}
}
public Task SendAsync<TMessage>(TMessage message, IDictionary<string, object> properties = null)
{
using (var bm = MessagingHelper.CreateBrokeredMessage(message, properties))
{
return this._topicClient.Value.SendAsync(bm);
}
}
나는 await/async 패턴을 최대한 활용하고 싶습니다.
그냥 궁금해서 SendAsync와 같은 것을 사용하지 않으려는 이유는 무엇입니까? – cassandrad
@cassandrad 만약 당신이 기다리는 것을 사용한다면 실제로 당신이 통화를 "수행 중"이라는 것을 의미합니까? 그렇습니다. –
예, 실행이 즉시 시작되고 기다리기 전에 실행이 차단되지 않습니다. 거기에 어떤 문제가 있습니까? – cassandrad