Galosys.Foundation.RocketMQ
25.10.30.6
dotnet add package Galosys.Foundation.RocketMQ --version 25.10.30.6
NuGet\Install-Package Galosys.Foundation.RocketMQ -Version 25.10.30.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Galosys.Foundation.RocketMQ" Version="25.10.30.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Galosys.Foundation.RocketMQ" Version="25.10.30.6" />
<PackageReference Include="Galosys.Foundation.RocketMQ" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Galosys.Foundation.RocketMQ --version 25.10.30.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Galosys.Foundation.RocketMQ, 25.10.30.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Galosys.Foundation.RocketMQ@25.10.30.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Galosys.Foundation.RocketMQ&version=25.10.30.6
#tool nuget:?package=Galosys.Foundation.RocketMQ&version=25.10.30.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DI
services.AddRocketMQ(ctx.Configuration);//新增:rmqclient galo@2023-9-28 10:18:41
发送及函数接受消息
using (var scope = _scopeFactory.CreateScope())
{
var sp = scope.ServiceProvider;
var rmq = sp.GetRequiredService<RmqTemplate>();
var topic = "oc_test";
var tag = "order_created";
await rmq.SendAsync(new SpringBootMqTestRequest(1), topic, tag);
//await _rmq.HandleAsync<SpringBootMqTestRequest>(async msg =>
//{
// await Task.Delay(100);
// return true;
//}, topic, "*");
//await _rmq.HandleAsync<SpringBootMqTestRequest>(async msg =>
//{
// await Task.Delay(100);
// return true;
//}, topic, tag);
}
类定义接受消息
[Handler]
internal class SpringBoottRmqTestHandler : IMessageHandler<SpringBootMqTestRequest>
{
/// <summary>
/// ConsumerGroup不设置时 配置文件的值或者默认值<see cref="Env.GetApplicationContext"/>,设置ConsumerGroup 为发布订阅模式,同一个ConsumerGroup为工作者模式 galoS@2024-12-5 14:41:20
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
[RmqHandler("cs_first")]
public async Task<bool> HandleAsync(SpringBootMqTestRequest msg)
{
Tracer.Trace(msg.Id, "1");
await Task.Delay(10);
return true;
}
}
| 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Galosys.Foundation.Core (>= 25.10.30.6)
- Galosys.Foundation.Redis (>= 25.10.30.6)
- rocketmq.client (>= 5.2.0-rc1)
- system.diagnostics.diagnosticsource (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 25.10.30.6 | 183 | 10/31/2025 |
| 25.10.30.6-rc2 | 187 | 10/31/2025 |
| 25.10.30.5 | 205 | 10/31/2025 |