We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 08d5748 + 12fbf18 commit e6bd78fCopy full SHA for e6bd78f
dotnet/RPCClient/RPCClient.cs
@@ -34,6 +34,11 @@ public RpcClient()
34
var response = Encoding.UTF8.GetString(body);
35
tcs.TrySetResult(response);
36
};
37
+
38
+ channel.BasicConsume(
39
+ consumer: consumer,
40
+ queue: replyQueueName,
41
+ autoAck: true);
42
}
43
44
public Task<string> CallAsync(string message, CancellationToken cancellationToken = default(CancellationToken))
@@ -52,11 +57,6 @@ public RpcClient()
52
57
basicProperties: props,
53
58
body: messageBytes);
54
59
55
- channel.BasicConsume(
56
- consumer: consumer,
- queue: replyQueueName,
- autoAck: true);
-
60
cancellationToken.Register(() => callbackMapper.TryRemove(correlationId, out var tmp));
61
return tcs.Task;
62
0 commit comments