NetPro.EasyNetQ
6.0.5-beta.3
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
This is a prerelease version of NetPro.EasyNetQ.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NetPro.EasyNetQ --version 6.0.5-beta.3
NuGet\Install-Package NetPro.EasyNetQ -Version 6.0.5-beta.3
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="NetPro.EasyNetQ" Version="6.0.5-beta.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetPro.EasyNetQ --version 6.0.5-beta.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NetPro.EasyNetQ, 6.0.5-beta.3"
#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 NetPro.EasyNetQ as a Cake Addin #addin nuget:?package=NetPro.EasyNetQ&version=6.0.5-beta.3&prerelease // Install NetPro.EasyNetQ as a Cake Tool #tool nuget:?package=NetPro.EasyNetQ&version=6.0.5-beta.3&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EasyNetQ使用
对EasyNetQ的封装,简化使用,支持多库
使用
appsetting.json
"EasyNetQOption": {
"ConnectionString": [
{
"Key": "rabbit2", //连接串key别名,唯一
"Value": "host=192.168.18.129:5672;virtualHost=/;username=admin;password=123456;timeout=60" //别名key对应的连接串
},
{
"Key": "rabbit1", //连接串key别名,唯一
"Value": "host=192.168.18.129:5672;virtualHost=/;username=admin;password=123456;timeout=60" //别名key对应的连接串
}
]
},
启用服务
没有基于NetPro.Web.Api 的使用场景,必须手动进行初始化,如下:
IConfiguration Configuration;
public void ConfigureServices(IServiceCollection services)
{
services.AddEasyNetQ(Configuration);
}
基于NetPro.Web.Api的使用,只需要添加引用后配置以上appsetting.josn配置EasyNetQOption节点即可
使用说明
public class RabbitmqService : IRabbitmqService
{
private readonly IEasyNetQMulti _easyNetQMulti;
public RabbitmqService( IEasyNetQMulti easyNetQMulti)
{
_easyNetQMulti=easyNetQMulti;
}
/// <summary>
///
/// </summary>
public void Method()
{
//订阅/Subscribe
_idbus ["rabbit2"].Subscribe<TextMessage>("subscriptionId", tm =>
{
Console.WriteLine("Recieve Message: {0}", tm.Text);
});
//发布/Publish
using (var bus = _easyNetQMulti["rabbit21"])
{
var input = "";
Console.WriteLine("Please enter a message. 'q'/'Q' to quit.");
while ((input = Console.ReadLine()).ToLower() != "q")
{
bus.PubSub.Publish(new TextMessage
{
Text = input
});
}
}
}
}
更新中...
reference 使用rabbitmq消息队列——EasyNetQ插件介绍
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- EasyNetQ (>= 6.3.1)
- IdleBus (>= 1.5.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- NetPro.Startup (>= 6.0.5-beta.3)
-
net6.0
- EasyNetQ (>= 6.3.1)
- IdleBus (>= 1.5.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- NetPro.Startup (>= 6.0.5-beta.3)
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 |
---|---|---|
6.0.16 | 217 | 7/24/2023 |
6.0.15 | 456 | 7/19/2022 |
6.0.14 | 446 | 7/10/2022 |
6.0.13 | 456 | 6/15/2022 |
6.0.12 | 397 | 6/15/2022 |
6.0.11 | 418 | 6/15/2022 |
6.0.10 | 420 | 6/11/2022 |
6.0.9 | 423 | 6/8/2022 |
6.0.8 | 479 | 5/26/2022 |
6.0.8-beta.3 | 121 | 5/24/2022 |
6.0.8-beta.2 | 118 | 5/24/2022 |
6.0.7 | 430 | 5/18/2022 |
6.0.6 | 433 | 4/28/2022 |
6.0.5 | 451 | 3/30/2022 |
6.0.5-beta.20 | 115 | 4/27/2022 |
6.0.5-beta.19 | 128 | 4/25/2022 |
6.0.5-beta.18 | 130 | 4/22/2022 |
6.0.5-beta.17 | 138 | 4/16/2022 |
6.0.5-beta.16 | 137 | 4/8/2022 |
6.0.5-beta.15 | 121 | 4/8/2022 |
6.0.5-beta.14 | 129 | 4/7/2022 |
6.0.5-beta.13 | 127 | 4/7/2022 |
6.0.5-beta.12 | 120 | 4/6/2022 |
6.0.5-beta.11 | 127 | 4/6/2022 |
6.0.5-beta.10 | 125 | 3/31/2022 |
6.0.5-beta.9 | 146 | 3/26/2022 |
6.0.5-beta.8 | 141 | 3/22/2022 |
6.0.5-beta.7 | 121 | 3/21/2022 |
6.0.5-beta.6 | 139 | 3/14/2022 |
6.0.5-beta.5 | 130 | 3/2/2022 |
6.0.5-beta.4 | 131 | 2/22/2022 |
6.0.5-beta.3 | 128 | 2/18/2022 |
6.0.5-beta.2 | 126 | 2/18/2022 |
6.0.5-beta.1 | 128 | 2/16/2022 |
6.0.4 | 423 | 2/10/2022 |
6.0.3 | 444 | 2/9/2022 |
6.0.3-beta.9 | 120 | 2/10/2022 |
6.0.3-beta.7 | 153 | 1/27/2022 |
6.0.3-beta.6 | 160 | 1/19/2022 |
6.0.3-beta.5 | 144 | 1/18/2022 |