You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2023/03/16 14:17:56 UTC

[rocketmq-clients] 02/02: Add more comments about disable TLS/SSL on .NET Core 3.1

This is an automated email from the ASF dual-hosted git repository.

aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git

commit 9c4e934dfa1f28d0fa32e8f655c6b8d4932d0cd7
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Thu Mar 16 21:08:44 2023 +0800

    Add more comments about disable TLS/SSL on .NET Core 3.1
---
 csharp/README-CN.md                                         | 4 +++-
 csharp/README.md                                            | 8 +++++---
 csharp/examples/ProducerBenchmark.cs                        | 2 +-
 csharp/examples/ProducerDelayMessageExample.cs              | 2 +-
 csharp/examples/ProducerFifoMessageExample.cs               | 2 +-
 csharp/examples/ProducerNormalMessageExample.cs             | 2 +-
 csharp/examples/ProducerTransactionMessageExample.cs        | 2 +-
 csharp/examples/SimpleConsumerExample.cs                    | 2 +-
 csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj | 2 +-
 9 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/csharp/README-CN.md b/csharp/README-CN.md
index faab401b..dadaf2e9 100644
--- a/csharp/README-CN.md
+++ b/csharp/README-CN.md
@@ -9,9 +9,11 @@
 由于 .NET 5 在 2020 年的发布,统一了.NET Framework 和 .NET Core ,并逐渐成为 .NET 开发的主流平台。我们强烈推荐使用 .NET 5+
 访问 RocketMQ。
 
-与此同时我们也支持 .NET Core 3.1。如果您想使用 .NET Core 3.1 接入 RocketMQ,请在运行之前添加以下代码。
+与此同时我们也支持 .NET Core 3.1。注意:如果您想使用 .NET Core 3.1 接入 RocketMQ
+且想通过 `Org.Apache.Rocketmq.ClientConfig.Builder.EnableSsl(false)` 关闭 TLS/SSL,请在运行之前添加以下代码。
 
 ```csharp
+// .NET Core 3.1 环境下想关闭 TLS/SSL 时需要添加此代码
 AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true)
 ```
 
diff --git a/csharp/README.md b/csharp/README.md
index 925ff433..498a6f23 100644
--- a/csharp/README.md
+++ b/csharp/README.md
@@ -1,6 +1,7 @@
 # The .NET Implementation of Apache RocketMQ Client
 
-English | [简体中文](https://github.com/apache/rocketmq-clients/blob/master/csharp/README-CN.md) | [RocketMQ Website](https://rocketmq.apache.org/)
+English | [简体中文](https://github.com/apache/rocketmq-clients/blob/master/csharp/README-CN.md)
+| [RocketMQ Website](https://rocketmq.apache.org/)
 
 ## Supported .NET Versions
 
@@ -9,10 +10,11 @@ English | [简体中文](https://github.com/apache/rocketmq-clients/blob/master/
 Due to the release of .NET 5 in 2020, which unified .NET Framework and .NET Core, and has gradually become the
 mainstream platform for .NET development. We strongly recommend using .NET 5+ to access RocketMQ.
 
-We also support accessing RocketMQ using .NET Core 3.1. If you prefer .NET Core 3.1, please add the following code
-before running it.
+We also support access to RocketMQ using .NET Core 3.1. Note: If you want to use .NET Core 3.1 and want to disable
+TLS/SSL by `Org.Apache.Rocketmq.ClientConfig.Builder.EnableSsl(false)`, add the following code before you run.
 
 ```csharp
+// Only necessary if you want to disable TLS/SSL on .NET Core 3.1
 AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true)
 ```
 
diff --git a/csharp/examples/ProducerBenchmark.cs b/csharp/examples/ProducerBenchmark.cs
index a379b8d2..5e3d4632 100644
--- a/csharp/examples/ProducerBenchmark.cs
+++ b/csharp/examples/ProducerBenchmark.cs
@@ -77,7 +77,7 @@ namespace examples
 
         internal static async Task QuickStart()
         {
-            // Enable the switch if you use .NET Core 3.1.
+            // Enable the switch if you use .NET Core 3.1 and want to disable TLS/SSL.
             // AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
             const string accessKey = "yourAccessKey";
             const string secretKey = "yourSecretKey";
diff --git a/csharp/examples/ProducerDelayMessageExample.cs b/csharp/examples/ProducerDelayMessageExample.cs
index 761ae7ca..83f048aa 100644
--- a/csharp/examples/ProducerDelayMessageExample.cs
+++ b/csharp/examples/ProducerDelayMessageExample.cs
@@ -29,7 +29,7 @@ namespace examples
 
         internal static async Task QuickStart()
         {
-            // Enable the switch if you use .NET Core 3.1.
+            // Enable the switch if you use .NET Core 3.1 and want to disable TLS/SSL.
             // AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
             const string accessKey = "yourAccessKey";
             const string secretKey = "yourSecretKey";
diff --git a/csharp/examples/ProducerFifoMessageExample.cs b/csharp/examples/ProducerFifoMessageExample.cs
index f35ba94c..c2fbef2c 100644
--- a/csharp/examples/ProducerFifoMessageExample.cs
+++ b/csharp/examples/ProducerFifoMessageExample.cs
@@ -29,7 +29,7 @@ namespace examples
 
         internal static async Task QuickStart()
         {
-            // Enable the switch if you use .NET Core 3.1.
+            // Enable the switch if you use .NET Core 3.1 and want to disable TLS/SSL.
             // AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
             const string accessKey = "yourAccessKey";
             const string secretKey = "yourSecretKey";
diff --git a/csharp/examples/ProducerNormalMessageExample.cs b/csharp/examples/ProducerNormalMessageExample.cs
index 890a2dc2..10ec7470 100644
--- a/csharp/examples/ProducerNormalMessageExample.cs
+++ b/csharp/examples/ProducerNormalMessageExample.cs
@@ -28,7 +28,7 @@ namespace examples
 
         internal static async Task QuickStart()
         {
-            // Enable the switch if you use .NET Core 3.1.
+            // Enable the switch if you use .NET Core 3.1 and want to disable TLS/SSL.
             // AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
             const string accessKey = "yourAccessKey";
             const string secretKey = "yourSecretKey";
diff --git a/csharp/examples/ProducerTransactionMessageExample.cs b/csharp/examples/ProducerTransactionMessageExample.cs
index 14f3da42..570ee35c 100644
--- a/csharp/examples/ProducerTransactionMessageExample.cs
+++ b/csharp/examples/ProducerTransactionMessageExample.cs
@@ -37,7 +37,7 @@ namespace examples
 
         internal static async Task QuickStart()
         {
-            // Enable the switch if you use .NET Core 3.1.
+            // Enable the switch if you use .NET Core 3.1 and want to disable TLS/SSL.
             // AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
             const string accessKey = "yourAccessKey";
             const string secretKey = "yourSecretKey";
diff --git a/csharp/examples/SimpleConsumerExample.cs b/csharp/examples/SimpleConsumerExample.cs
index e592e5ee..206e9371 100644
--- a/csharp/examples/SimpleConsumerExample.cs
+++ b/csharp/examples/SimpleConsumerExample.cs
@@ -29,7 +29,7 @@ namespace examples
 
         internal static async Task QuickStart()
         {
-            // Enable the switch if you use .NET Core 3.1.
+            // Enable the switch if you use .NET Core 3.1 and want to disable TLS/SSL.
             // AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
             const string accessKey = "yourAccessKey";
             const string secretKey = "yourSecretKey";
diff --git a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
index ef2a0ff8..80c6774b 100644
--- a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
+++ b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
         <PackageId>RocketMQ.Client</PackageId>
-        <PackageVersion>0.0.17-SNAPSHOT</PackageVersion>
+        <PackageVersion>0.0.17-rc2</PackageVersion>
         <Version>$(PackageVersion)</Version>
 
         <Authors>RocketMQ Authors</Authors>