Commit bb695c9a authored by Savorboard's avatar Savorboard

Update readme to add azure service bus description.

parent 1cc4d2e5
...@@ -30,11 +30,12 @@ You can run the following command to install the CAP in your project. ...@@ -30,11 +30,12 @@ You can run the following command to install the CAP in your project.
PM> Install-Package DotNetCore.CAP PM> Install-Package DotNetCore.CAP
``` ```
CAP supports RabbitMQ and Kafka as message queue, select the packages you need to install: CAP supports RabbitMQ,Kafka and AzureService as message queue, select the packages you need to install:
``` ```
PM> Install-Package DotNetCore.CAP.Kafka PM> Install-Package DotNetCore.CAP.Kafka
PM> Install-Package DotNetCore.CAP.RabbitMQ PM> Install-Package DotNetCore.CAP.RabbitMQ
PM> Install-Package DotNetCore.CAP.AzureServiceBus
``` ```
CAP supports SqlServer, MySql, PostgreSql,MongoDB as event log storage. CAP supports SqlServer, MySql, PostgreSql,MongoDB as event log storage.
...@@ -65,7 +66,7 @@ public void ConfigureServices(IServiceCollection services) ...@@ -65,7 +66,7 @@ public void ConfigureServices(IServiceCollection services)
// If you are using EF, you need to add the configuration: // If you are using EF, you need to add the configuration:
x.UseEntityFramework<AppDbContext>(); //Options, Notice: You don't need to config x.UseSqlServer(""") again! CAP can autodiscovery. x.UseEntityFramework<AppDbContext>(); //Options, Notice: You don't need to config x.UseSqlServer(""") again! CAP can autodiscovery.
// If you are using Dapper, you need to add the configuration // If you are using ADO.NET, choose to add configuration you needed
x.UseSqlServer("Your ConnectionStrings"); x.UseSqlServer("Your ConnectionStrings");
x.UseMySql("Your ConnectionStrings"); x.UseMySql("Your ConnectionStrings");
x.UsePostgreSql("Your ConnectionStrings"); x.UsePostgreSql("Your ConnectionStrings");
...@@ -73,11 +74,10 @@ public void ConfigureServices(IServiceCollection services) ...@@ -73,11 +74,10 @@ public void ConfigureServices(IServiceCollection services)
// If you are using MongoDB, you need to add the configuration: // If you are using MongoDB, you need to add the configuration:
x.UseMongoDB("Your ConnectionStrings"); //MongoDB 4.0+ cluster x.UseMongoDB("Your ConnectionStrings"); //MongoDB 4.0+ cluster
// If you are using RabbitMQ, you need to add the configuration: // CAP support RabbitMQ,Kafka,AzureService as the MQ, choose to add configuration you needed:
x.UseRabbitMQ("localhost"); x.UseRabbitMQ("ConnectionString");
x.UseKafka("ConnectionString");
// If you are using Kafka, you need to add the configuration: x.UseAzureServiceBus("ConnectionString");
x.UseKafka("localhost");
}); });
} }
......
...@@ -35,11 +35,12 @@ CAP 采用的是和当前数据库集成的本地消息表的方案来解决在 ...@@ -35,11 +35,12 @@ CAP 采用的是和当前数据库集成的本地消息表的方案来解决在
PM> Install-Package DotNetCore.CAP PM> Install-Package DotNetCore.CAP
``` ```
CAP 支持 Kafka 或者 RabbitMQ 消息队列,你可以选择下面的包进行安装: CAP 支持 Kafka、RabbitMQ、AzureServiceBus 等消息队列,你可以按需选择下面的包进行安装:
``` ```
PM> Install-Package DotNetCore.CAP.Kafka PM> Install-Package DotNetCore.CAP.Kafka
PM> Install-Package DotNetCore.CAP.RabbitMQ PM> Install-Package DotNetCore.CAP.RabbitMQ
PM> Install-Package DotNetCore.CAP.AzureServiceBus
``` ```
CAP 提供了 Sql Server, MySql, PostgreSQL,MongoDB 的扩展作为数据库存储: CAP 提供了 Sql Server, MySql, PostgreSQL,MongoDB 的扩展作为数据库存储:
...@@ -66,19 +67,20 @@ public void ConfigureServices(IServiceCollection services) ...@@ -66,19 +67,20 @@ public void ConfigureServices(IServiceCollection services)
services.AddCap(x => services.AddCap(x =>
{ {
//如果你使用的 EF 进行数据操作,你需要添加如下配置: //如果你使用的 EF 进行数据操作,你需要添加如下配置:
x.UseEntityFramework<AppDbContext>(); //可选项,你不需要再次配置 x.UseSqlServer 了 x.UseEntityFramework<AppDbContext>(); //可选项,你不需要再次配置 x.UseSqlServer 了
//如果你使用的Ado.Net,根据数据库选择进行配置: //如果你使用的ADO.NET,根据数据库选择进行配置:
x.UseSqlServer("数据库连接字符串"); x.UseSqlServer("数据库连接字符串");
x.UseMySql("Your ConnectionStrings"); x.UseMySql("数据库连接字符串");
x.UsePostgreSql("Your ConnectionStrings"); x.UsePostgreSql("数据库连接字符串");
//如果你使用的 MongoDB,你可以添加如下配置: //如果你使用的 MongoDB,你可以添加如下配置:
x.UseMongoDB("Your ConnectionStrings"); //注意,仅支持MongoDB 4.0+集群 x.UseMongoDB("ConnectionStrings"); //注意,仅支持MongoDB 4.0+集群
//如果你使用的 RabbitMQ 或者 Kafka 作为MQ,根据使用选择配置: //CAP支持 RabbitMQ、Kafka、AzureServiceBus 等作为MQ,根据使用选择配置:
x.UseRabbitMQ("localhost"); x.UseRabbitMQ("ConnectionStrings");
x.UseKafka("localhost"); x.UseKafka("ConnectionStrings");
x.UseAzureServiceBus("ConnectionStrings");
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment