NServiceBus在c#中设置maxretries配置

时间:2015-01-08 17:21:04

标签: c# configuration nservicebus

我目前正在使用NServiceBus V5,我想在C#中设置MaxRetries设置,而不是我的端点的app.config。

我有以下代码

public abstract class AEndpointConfiguration : IConfigureThisEndpoint
{
    public void Customize(BusConfiguration configuration)
    {
        ConfigureLogging();

        configuration.DisableFeature<SecondLevelRetries>();
        configuration.Transactions().Enable();
        configuration.UseSerialization<XmlSerializer>();
        configuration.EnableFeature<NServiceBus.Features.Sagas>();
        configuration.UsePersistence<NHibernatePersistence>();
        configuration.UseContainer<AutofacBuilder>(b => b.ExistingLifetimeScope(ConfigureBuilder()));
        configuration.UsePersistence<MsmqPersistence>().For(NServiceBus.Persistence.Storage.Subscriptions);
        configuration.UseTransport<MsmqTransport>();
        configuration.PurgeOnStartup(false);
    }

我已阅读以下文章,但似乎只适用于V4

http://docs.particular.net/nservicebus/how-to-reduce-throughput-of-an-endpoint

仍在寻找如何做到这一点......

0 个答案:

没有答案