rabbitmq-website icon indicating copy to clipboard operation
rabbitmq-website copied to clipboard

Consider using async/await in tutorial 6 for .NET

Open bnayae opened this issue 6 years ago • 1 comments

The c# sample of the tutorial is far from representing best practice. Modern C# expected to use async/await rather than blocking API.

I suggest the following RPC sample correction: https://github.com/bnayae/RabbitMQ-Playground/blob/master/RPC/RpcRabbitClient/AsyncRpcClient.cs

It's based on the original example so it recommended to compare it with https://github.com/bnayae/RabbitMQ-Playground/blob/master/RPC/RpcRabbitClient/RpcClient.cs

The full example can be found at: https://github.com/bnayae/RabbitMQ-Playground

bnayae avatar Oct 11 '18 14:10 bnayae

You are welcome to contribute a PR to https://github.com/rabbitmq/rabbitmq-tutorials/ first. Without a significant client API revision I don't think most tutorials can or should use async/await but specifically numbers 6 probably can. The executable version is where all significant changes to the tutorials should originate.

michaelklishin avatar Oct 11 '18 14:10 michaelklishin