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 2022/12/19 08:44:17 UTC

[rocketmq-clients] branch master updated (d821b203 -> 6010d65e)

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

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


    from d821b203 golang: fast to the ok state (#295)
     new b8aed221 improve ReceiveMessage performance
     new 6010d65e Bump OT to 1.3.1

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 csharp/rocketmq-client-csharp/ClientManager.cs             | 14 +++++---------
 .../rocketmq-client-csharp/rocketmq-client-csharp.csproj   |  6 +++---
 2 files changed, 8 insertions(+), 12 deletions(-)


[rocketmq-clients] 01/02: improve ReceiveMessage performance

Posted by aa...@apache.org.
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 b8aed2217e7c7c9847214c3ea7e65c6fb06fac8c
Author: colprog <co...@gmail.com>
AuthorDate: Fri Dec 16 18:13:01 2022 +0800

    improve ReceiveMessage performance
---
 csharp/rocketmq-client-csharp/ClientManager.cs | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/csharp/rocketmq-client-csharp/ClientManager.cs b/csharp/rocketmq-client-csharp/ClientManager.cs
index c2e00e8f..329f5910 100644
--- a/csharp/rocketmq-client-csharp/ClientManager.cs
+++ b/csharp/rocketmq-client-csharp/ClientManager.cs
@@ -268,25 +268,21 @@ namespace Org.Apache.Rocketmq
             msg._receiptHandle = message.SystemProperties.ReceiptHandle;
             msg._sourceHost = sourceHost;
 
-            foreach (var key in message.SystemProperties.Keys)
-            {
-                msg.Keys.Add(key);
-            }
-
+            msg.Keys.AddRange(message.SystemProperties.Keys);
             msg.DeliveryAttempt = message.SystemProperties.DeliveryAttempt;
 
             if (message.SystemProperties.BodyEncoding == rmq::Encoding.Gzip)
             {
                 // Decompress/Inflate message body
-                var inputStream = new MemoryStream(message.Body.ToByteArray());
-                var gzipStream = new GZipStream(inputStream, CompressionMode.Decompress);
-                var outputStream = new MemoryStream();
+                using var inputStream = new MemoryStream(raw);
+                using var gzipStream = new GZipStream(inputStream, CompressionMode.Decompress);
+                using var outputStream = new MemoryStream();
                 gzipStream.CopyTo(outputStream);
                 msg.Body = outputStream.ToArray();
             }
             else
             {
-                msg.Body = message.Body.ToByteArray();
+                msg.Body = raw;
             }
 
             return msg;


[rocketmq-clients] 02/02: Bump OT to 1.3.1

Posted by aa...@apache.org.
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 6010d65e101d43efe6e294b00bb15f1f92984e8a
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Mon Dec 19 16:32:31 2022 +0800

    Bump OT to 1.3.1
---
 csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
index e2e18442..737b231d 100644
--- a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
+++ b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.csproj
@@ -19,9 +19,9 @@
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>
     <PackageReference Include="NLog" Version="4.7.13" />
-    <PackageReference Include="OpenTelemetry" Version="1.3.0" />
-    <PackageReference Include="OpenTelemetry.Api" Version="1.3.0" />
-    <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.3.0" />
+    <PackageReference Include="OpenTelemetry" Version="1.3.1" />
+    <PackageReference Include="OpenTelemetry.Api" Version="1.3.1" />
+    <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.3.1" />
 
     <Protobuf Include="Protos\apache\rocketmq\v2\definition.proto" ProtoRoot="Protos" GrpcServices="Client" />
     <Protobuf Include="Protos\google\rpc\code.proto" ProtoRoot="Protos" GrpcServices="Client" />