Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NServiceBus failing to start up - MessageForwardinginCaseofFaultConfig is missing

Hi I am trying to get started with developing using NServiceBus however I am failing at the first step.

I have run RunMeFirst.bat /i from the command line and all dependencies are correct.

c:\Users\xxxxx\Desktop\NServiceBus.3.0.0>.\binaries\NServiceBus.Host.exe /installInfrastructure
Running infrastructure installers and exiting (ignoring other command line parameters if exist).
Starting installation of PerformanceCounters
Category NServiceBus already exist, going to delete first
Installation of PerformanceCounters successful.
Checking if MSMQ is installed.
MSMQ is installed.
Checking that only needed components are active.
Installation is good.
Checking that DTC is configured correctly.
DTC is configured correctly.
DTC is good.

However when I try to create a simple programme and invoce NServiceBus.exe from it, it fails with the following error

2012-08-02 10:19:48,922 [1] WARN  MessageForwardingInCaseOfFault [(null)] <(null)> - Could not find configuration sectio
n 'MessageForwardingInCaseOfFaultConfig'. Going to try to find the error queue defined in 'MsmqTransportConfig'.
2012-08-02 10:19:48,951 [1] FATAL NServiceBus.Hosting.GenericHost [(null)] <(null)> - System.Configuration.Configuration
ErrorsException: 'MessageForwardingInCaseOfFaultConfig' configuration section is missing and could not find backup confi
guration section 'MsmqTransportConfig' in order to locate the error queue.
   at NServiceBus.ConfigureFaultsForwarder.MessageForwardingInCaseOfFault(Configure config) in d:\BuildAgent-03\work\nsb
.masterbuild0\src\impl\faults\NServiceBus.Faults.Forwarder.Config\ConfigureFaultsForwarder.cs:line 44
   at NServiceBus.Hosting.Windows.Profiles.Handlers.ProductionProfileHandler.NServiceBus.Hosting.Profiles.IHandleProfile
.ProfileActivated() in d:\BuildAgent-03\work\nsb.masterbuild0\src\hosting\NServiceBus.Hosting.Windows\Profiles\Handlers\
ProductionProfileHandler.cs:line 19

Any help to resolve this will be much appreciated!

Thanks

like image 702
dopplesoldner Avatar asked Dec 15 '22 21:12

dopplesoldner


1 Answers

When a message fails, NSB will retry the message and then forward it to another queue so it can continue processing. You will need to add the following to your config file:

<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />

<MessageForwardingInCaseOfFaultConfig ErrorQueue="nservicebus_error" />
like image 129
Adam Fyles Avatar answered May 01 '23 14:05

Adam Fyles