YMJake.RocketMQ.Client
5.5.8
dotnet add package YMJake.RocketMQ.Client --version 5.5.8
NuGet\Install-Package YMJake.RocketMQ.Client -Version 5.5.8
<PackageReference Include="YMJake.RocketMQ.Client" Version="5.5.8" />
<PackageVersion Include="YMJake.RocketMQ.Client" Version="5.5.8" />
<PackageReference Include="YMJake.RocketMQ.Client" />
paket add YMJake.RocketMQ.Client --version 5.5.8
#r "nuget: YMJake.RocketMQ.Client, 5.5.8"
#:package YMJake.RocketMQ.Client@5.5.8
#addin nuget:?package=YMJake.RocketMQ.Client&version=5.5.8
#tool nuget:?package=YMJake.RocketMQ.Client&version=5.5.8
RocketMQ C# Client
Enhanced C# client for Apache RocketMQ 5.x with full feature support and FIFO Consume Accelerator.
Features
- ✅ Producer — normal / FIFO / delay / transactional / recall
- ✅ Simple consumer (pull mode)
- ✅ Push consumer — concurrent / FIFO / FIFO accelerator (enhanced)
- ✅ Message filtering — Tag & SQL92 expressions
- ✅ Priority Message
- ✅ Client properties for server-side observability / management
- ⚠️ Lite Push Consumer — experimental support for RocketMQ 5.5+
- ⚠️ Lite Simple Consumer — client-side API is available, but current RocketMQ 5.5 proxy/server support is still incomplete
Supports .NET 8.0 (LTS) and .NET 10.0
Installation
dotnet add package YMJake.RocketMQ.Client
Optional: OpenTelemetry Instrumentation
dotnet add package YMJake.RocketMQ.Client.OpenTelemetry
Automatic distributed tracing and metrics with W3C Trace Context propagation, client-side latency histograms, and broker-controlled OTLP metric export from RocketMQ settings.
See package docs for details.
Examples
See RocketMQ.Client.Samples for sample code.
For a runnable WebAPI demo with OpenTelemetry tracing, see RocketMQ.Client.OpenTelemetry.Sample.
Client Properties
You can attach opaque client properties through ClientConfig.Builder. These properties are reported in telemetry Settings and can be used by RocketMQ server-side observability and management components.
var clientConfig = new ClientConfig.Builder()
.SetEndpoints("127.0.0.1:9876")
.AddClientProperty("app.id", "order-service")
.AddClientProperty("zone", "cn-hz-a")
.Build();
var producer = await new Producer.Builder()
.SetClientConfig(clientConfig)
.SetTopics("OrderTopic")
.Build();
You can also replace, remove, or clear properties before Build():
var builder = new ClientConfig.Builder()
.SetEndpoints("127.0.0.1:9876")
.SetClientProperties(new Dictionary<string, string>
{
["app.id"] = "order-service",
["zone"] = "cn-hz-a"
});
builder.RemoveClientProperty("zone");
builder.ClearClientProperties();
Validation rules follow the Java client design:
- Up to
32entries. - Key length up to
64characters; value length up to256characters. - Key must start with a letter and only contain letters, digits,
.,_, or-. - Key must not use the reserved
rocketmq.prefix. - Total serialized size must not exceed
4 KB.
This configuration applies to Producer, PushConsumer, SimpleConsumer, LitePushConsumer, and LiteSimpleConsumer because they all share ClientConfig.
Packages
- Main Client: YMJake.RocketMQ.Client
- OpenTelemetry: YMJake.RocketMQ.Client.OpenTelemetry
- Repository: Gitee
License
Apache License 2.0. Based on Apache RocketMQ Clients.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Google.Protobuf (>= 3.35.1)
- Grpc.Net.Client (>= 2.80.0)
- K4os.Compression.LZ4.Streams (>= 1.3.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- NLog.Extensions.Logging (>= 6.1.4)
- System.IO.Hashing (>= 10.0.8)
- ZstdSharp.Port (>= 0.8.8)
-
net8.0
- Google.Protobuf (>= 3.35.1)
- Grpc.Net.Client (>= 2.80.0)
- K4os.Compression.LZ4.Streams (>= 1.3.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- NLog.Extensions.Logging (>= 6.1.4)
- System.IO.Hashing (>= 10.0.8)
- ZstdSharp.Port (>= 0.8.8)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on YMJake.RocketMQ.Client:
| Package | Downloads |
|---|---|
|
YMJake.Aspire.Apache.RocketMQ
Client-side Aspire helpers for Apache RocketMQ, including optional health checks, logging, tracing, and metrics wiring. |
|
|
YMJake.Aspire.Hosting.RocketMQ
Hosting extensions for running RocketMQ with .NET Aspire. |
|
|
YMJake.Aspire.Hosting.RocketMQ.Local
Experimental .NET Aspire hosting extensions for running Apache RocketMQ 5.x local mode with an embedded proxy endpoint. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
v5.5.8: Carries exception details through message diagnostics for failed send, receive, and consume operations so observability integrations can record richer error telemetry.