add:添加cap本地内存debug
This commit is contained in:
parent
4b0acb1978
commit
505d8e7dc1
@ -21,6 +21,8 @@
|
|||||||
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="8.1.2"/>
|
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="8.1.2"/>
|
||||||
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="8.1.2"/>
|
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="8.1.2"/>
|
||||||
<PackageReference Include="DotNetCore.CAP.MySql" Version="8.1.2"/>
|
<PackageReference Include="DotNetCore.CAP.MySql" Version="8.1.2"/>
|
||||||
|
<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="8.1.2"/>
|
||||||
|
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="7.0.0"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using DotNetCore.CAP;
|
using DotNetCore.CAP;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Savorboard.CAP.InMemoryMessageQueue;
|
||||||
using SJZY.Expand.ABP.Core.Localization;
|
using SJZY.Expand.ABP.Core.Localization;
|
||||||
using SJZY.Expand.ABP.Core.Logger;
|
using SJZY.Expand.ABP.Core.Logger;
|
||||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||||
@ -76,6 +77,10 @@ namespace SJZY.Track.Application
|
|||||||
context.Services.AddCapTableNameService();
|
context.Services.AddCapTableNameService();
|
||||||
context.Services.AddCap(options =>
|
context.Services.AddCap(options =>
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
options.UseInMemoryStorage();
|
||||||
|
options.UseInMemoryMessageQueue();
|
||||||
|
#else
|
||||||
options.UseMySql(configuration["ConnectionStrings:DefaultConnection"]!);
|
options.UseMySql(configuration["ConnectionStrings:DefaultConnection"]!);
|
||||||
options.UseRabbitMQ(configure =>
|
options.UseRabbitMQ(configure =>
|
||||||
{
|
{
|
||||||
@ -86,7 +91,7 @@ namespace SJZY.Track.Application
|
|||||||
configure.BasicQosOptions =
|
configure.BasicQosOptions =
|
||||||
new RabbitMQOptions.BasicQos(configuration.GetValue<ushort>("CAP:PrefetchCount"));
|
new RabbitMQOptions.BasicQos(configuration.GetValue<ushort>("CAP:PrefetchCount"));
|
||||||
});
|
});
|
||||||
// options.TopicNamePrefix = "v1";
|
#endif
|
||||||
options.FailedRetryInterval = configuration.GetValue<int>("CAP:FailedRetryInterval");
|
options.FailedRetryInterval = configuration.GetValue<int>("CAP:FailedRetryInterval");
|
||||||
options.FailedRetryCount = configuration.GetValue<int>("CAP:FailedRetryCount");
|
options.FailedRetryCount = configuration.GetValue<int>("CAP:FailedRetryCount");
|
||||||
options.SucceedMessageExpiredAfter = configuration.GetValue<int>("CAP:SucceedMessageExpiredAfter");
|
options.SucceedMessageExpiredAfter = configuration.GetValue<int>("CAP:SucceedMessageExpiredAfter");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user