We use NServiceBus in our web application and have recently found that at times there have been a few messages that just sit in the outbound queue despite a connected state however never leave. The quickest solution to remove them is to restart the MSMQ service. A problem I came across with this was that when restarting or stopping the MSMQ service the CPU jumps to 100%.
Has anyone come across this and find a way to prevent this high load. I don't like the idea of an outage just due to stopping a service? One way I know is to use send only mode however this isn't ideal.
UPDATE: Configuration code used within the global.asax application start:
IBus bus = Configure
.With()
.DefaultBuilder()
.FileShareDataBus("c:\\storage")
.XmlSerializer()
.MsmqTransport()
.IsTransactional(false)
.PurgeOnStartup(false)
.UnicastBus()
.ImpersonateSender(false)
.CreateBus()
.Start(() => Configure.Instance.ForInstallationOn<Windows>().Install());