From 6ef5ba86cf9f0e6cdc34807bb1910d8dd9a679b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Wed, 10 Apr 2024 19:18:18 +0800 Subject: [PATCH] =?UTF-8?q?opt=EF=BC=9A=E5=BC=80=E5=90=AFcap=E5=A4=9A?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SJZY.Track.Application/SjzyTrackApplicationModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs index f9f5633a..26725fbd 100644 --- a/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs +++ b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs @@ -84,7 +84,13 @@ namespace SJZY.Track.Application configure.UserName = configuration["RabbitMQ:UserName"]!; configure.Password = configuration["RabbitMQ:Password"]!; configure.Port = configuration.GetValue("RabbitMQ:Port"); + configure.BasicQosOptions = + new RabbitMQOptions.BasicQos(configuration.GetValue("CAP:PrefetchCount")); }); + options.FailedRetryInterval = configuration.GetValue("CAP:FailedRetryInterval"); + options.FailedRetryCount = configuration.GetValue("CAP:FailedRetryCount"); + options.UseDispatchingPerGroup = configuration.GetValue("CAP:UseDispatchingPerGroup"); + options.ConsumerThreadCount = configuration.GetValue("CAP:ConsumerThreadCount"); // options.TopicNamePrefix = "v1"; options.SucceedMessageExpiredAfter = 6 * 60 * 60;