We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7f6371 commit 95d73dcCopy full SHA for 95d73dc
1 file changed
API/SOFTURE.MessageBroker.Rabbit/DependencyInjection.cs
@@ -45,7 +45,8 @@ public static IServiceCollection AddCommonPublisher<TSettings>(this IServiceColl
45
public static IServiceCollection AddCommonConsumers<TSettings>(
46
this IServiceCollection services,
47
Assembly assembly,
48
- int retryCount = 0)
+ int retryCount = 0,
49
+ int prefetchCount = 50)
50
where TSettings : IRabbitSettings
51
{
52
var consumerTypes = GetConsumers<IMessage>(assembly);
@@ -97,7 +98,7 @@ public static IServiceCollection AddCommonConsumers<TSettings>(
97
98
foreach (var type in bulkConsumerTypes)
99
100
c.ConfigureConsumer(ctx, type);
- c.PrefetchCount = 50;
101
+ c.PrefetchCount = prefetchCount;
102
103
if (retryCount != 0)
104
c.UseMessageRetry(r => r.Immediate(retryCount));
0 commit comments