Domanda

I have an NServiceBus publisher project that has ran successfully for months. It was using NServiceBus.Host version 3.2.2. I need to upgrade the version to 3.3.8. After the upgrade, I get the following exception notification:

Exception when starting endpoint, error has been logged. Reason: The requested service 'NServiceBus.Timeout.Core.IManageTimeouts' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

I have searched online to determine why NServiceBus.Host version 3.3.8 would not register IManageTimeouts object. I have also searched for documentation or examples using IsRegistered() and ResolveOptional(). No luck so far... (Maybe I need a semester at Google search university?)

Has any NServiceBus users out there experienced this exception?

Is the IManageTimeouts object new to NServiceBus.Host version 3.3.8?

Could someone provide an example how I could register the IManageTimeouts object with NServiceBus configuration?

Here are my current configuration settings:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" />
    <section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" />
    <section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
  </configSections>
  <MsmqTransportConfig ErrorQueue="PublisherError" NumberOfWorkerThreads="1" MaxRetries="5" />
  <UnicastBusConfig ForwardReceivedMessagesTo="">
    <MessageEndpointMappings></MessageEndpointMappings>
  </UnicastBusConfig>
  <MessageForwardingInCaseOfFaultConfig ErrorQueue="PublisherFault" />
/configuration>

configure = NServiceBus.Configure.With();
Bus = configure
         .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.EndsWith("EventPublisher.InternalMessages"))
         .DefineEndpointName("EventPublisher")    
         .Log4Net()                                                                                                                  
         .DefaultBuilder()
         .XmlSerializer()
         .MsmqTransport()
             .IsTransactional(true)
             .PurgeOnStartup(false)
         .UnicastBus()
             .LoadMessageHandlers()
             .ImpersonateSender(false)
         .CreateBus()
         .Start(() => Configure.Instance.ForInstallationOn<Windows>().Install());
È stato utile?

Soluzione

It looks like you need to explicitly enable TimeoutManager. To do that:

.UseRavenTimeoutPersister();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top