rabbitmq-website
rabbitmq-website copied to clipboard
Consider using async/await in tutorial 6 for .NET
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
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.