Galosoft.IaaS.RocketMQ 24.12.4.3-nj

This is a prerelease version of Galosoft.IaaS.RocketMQ.
dotnet add package Galosoft.IaaS.RocketMQ --version 24.12.4.3-nj                
NuGet\Install-Package Galosoft.IaaS.RocketMQ -Version 24.12.4.3-nj                
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="Galosoft.IaaS.RocketMQ" Version="24.12.4.3-nj" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Galosoft.IaaS.RocketMQ --version 24.12.4.3-nj                
#r "nuget: Galosoft.IaaS.RocketMQ, 24.12.4.3-nj"                
#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.
// Install Galosoft.IaaS.RocketMQ as a Cake Addin
#addin nuget:?package=Galosoft.IaaS.RocketMQ&version=24.12.4.3-nj&prerelease

// Install Galosoft.IaaS.RocketMQ as a Cake Tool
#tool nuget:?package=Galosoft.IaaS.RocketMQ&version=24.12.4.3-nj&prerelease                

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
24.12.4.3-nj 45 12/5/2024
24.12.4.2-nj 39 12/5/2024