diff --git a/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs b/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs index 242eff7..5843382 100644 --- a/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs +++ b/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs @@ -110,15 +110,15 @@ namespace DotNetCore.CAP.Processor var returnedProcessors = new List(); for (int i = 0; i < processorCount; i++) { - var messageProcessors = _provider.GetService(); + var messageProcessors = _provider.GetRequiredService(); _messageDispatchers.Add(messageProcessors); } returnedProcessors.AddRange(_messageDispatchers); - returnedProcessors.Add(_provider.GetService()); - returnedProcessors.Add(_provider.GetService()); + returnedProcessors.Add(_provider.GetRequiredService()); + returnedProcessors.Add(_provider.GetRequiredService()); - returnedProcessors.Add(_provider.GetService()); + returnedProcessors.Add(_provider.GetRequiredService()); return returnedProcessors.ToArray(); }