upgrade-package: 升级RabbitMq依赖包2.0.9=>2.1.3
update:调整AddRabbitBoot中的初始化相关配置
This commit is contained in:
parent
96457adabe
commit
24859d393b
@ -26,9 +26,12 @@ public class TrackPushCompletedEventHandler : ITransientDependency, IRabbitHandl
|
|||||||
_trackPushRecordEsRepository = trackPushRecordEsRepository;
|
_trackPushRecordEsRepository = trackPushRecordEsRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Enable(ConsumeOptions options)
|
public ConsumeOptions Options()
|
||||||
{
|
{
|
||||||
return options.Queue == GlobalConst.TrackPushCompletedSubscribe;
|
return new ConsumeOptions()
|
||||||
|
{
|
||||||
|
Queue = GlobalConst.TrackPushCompletedSubscribe
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Handle(IServiceProvider sp, BasicDeliverEventArgs args, ConsumeOptions options)
|
public async Task Handle(IServiceProvider sp, BasicDeliverEventArgs args, ConsumeOptions options)
|
||||||
|
|||||||
@ -39,10 +39,12 @@ public class TrackRefreshEventHandler : ITransientDependency, IRabbitHandler
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConsumeOptions Options()
|
||||||
public bool Enable(ConsumeOptions options)
|
|
||||||
{
|
{
|
||||||
return options.Queue == GlobalConst.TrackRefreshSubscribe;
|
return new ConsumeOptions()
|
||||||
|
{
|
||||||
|
Queue = GlobalConst.TrackRefreshSubscribe,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Handle(IServiceProvider sp, BasicDeliverEventArgs args, ConsumeOptions options)
|
public async Task Handle(IServiceProvider sp, BasicDeliverEventArgs args, ConsumeOptions options)
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BSI.Stack.Rabbit" Version="2.0.9" />
|
<PackageReference Include="BSI.Stack.Rabbit" Version="2.1.3" />
|
||||||
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1"/>
|
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1"/>
|
||||||
<PackageReference Include="SJZY.Expand.AliyunOSS" Version="7.0.17" />
|
<PackageReference Include="SJZY.Expand.AliyunOSS" Version="7.0.17" />
|
||||||
<PackageReference Include="SJZY.InterfaceRelay.Application.Contracts" Version="7.2.3"/>
|
<PackageReference Include="SJZY.InterfaceRelay.Application.Contracts" Version="7.2.3"/>
|
||||||
|
|||||||
@ -140,6 +140,10 @@ public class SjzyTrackApplicationModule : AbpModule
|
|||||||
options.ConnectionString =
|
options.ConnectionString =
|
||||||
$"amqp://{configuration["RabbitMQ:UserName"]}:{configuration["RabbitMQ:Password"]}@{configuration["RabbitMQ:HostName"]}:{configuration["RabbitMQ:Port"]}";
|
$"amqp://{configuration["RabbitMQ:UserName"]}:{configuration["RabbitMQ:Password"]}@{configuration["RabbitMQ:HostName"]}:{configuration["RabbitMQ:Port"]}";
|
||||||
options.PoolSize = configuration.GetValue<int>("RabbitMQ:PoolSize");
|
options.PoolSize = configuration.GetValue<int>("RabbitMQ:PoolSize");
|
||||||
|
options.Declarations = new List<Action<IDeclaration>>()
|
||||||
|
{
|
||||||
|
o=>o.ExchangeDeclare(GlobalConst.TrackChangeExchange, ExchangeType.Topic, true),
|
||||||
|
};
|
||||||
options.Consumes = new List<ConsumeOptions>
|
options.Consumes = new List<ConsumeOptions>
|
||||||
{
|
{
|
||||||
new()
|
new()
|
||||||
@ -154,17 +158,6 @@ public class SjzyTrackApplicationModule : AbpModule
|
|||||||
o.QueueBind(GlobalConst.TrackRefreshSubscribe, GlobalConst.InterfaceRelayExchange,
|
o.QueueBind(GlobalConst.TrackRefreshSubscribe, GlobalConst.InterfaceRelayExchange,
|
||||||
GlobalConst.TrackRefreshSubscribe);
|
GlobalConst.TrackRefreshSubscribe);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
new()
|
|
||||||
{
|
|
||||||
//广播轨迹
|
|
||||||
Queue = GlobalConst.TrackRefreshSubscribe,
|
|
||||||
FetchCount = configuration.GetValue<ushort>("TrackApp:TrackRefreshFetchCount"),
|
|
||||||
FailedRequeue = false,
|
|
||||||
Declaration = o =>
|
|
||||||
{
|
|
||||||
o.ExchangeDeclare(GlobalConst.TrackChangeExchange, ExchangeType.Topic, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, typeof(SjzyTrackApplicationModule).Assembly);
|
}, typeof(SjzyTrackApplicationModule).Assembly);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user