示例#1
0
 public TransportInfrastructure(SettingsHolder settings, string connectionString)
 {
     connectionConfiguration = new ConnectionStringParser().Parse(connectionString);
     subscriptionManager     = new Lazy <SubscriptionManager>(() =>
     {
         var disableCaching = settings.GetOrDefault <bool>("NServiceBus.EventStore.DisableExchangeCaching");
         return(new SubscriptionManager(connectionConfiguration, settings.LocalAddress(), !disableCaching));
     });
     timeoutProcessor = new Lazy <TimeoutProcessor>(() =>
     {
         var uniqueId = settings.GetOrDefault <string>("NServiceBus.EventStore.TimeoutProcessorId") ?? Guid.NewGuid().ToString();
         return(new TimeoutProcessor(() => DateTime.UtcNow, uniqueId, connectionConfiguration));
     });
 }
示例#2
0
        IEnumerable <TransportReceiver> BuildPipelines()
        {
            var errorQueue = ErrorQueueSettings.GetConfiguredErrorQueue(settings);

            var dequeueLimitations         = GeDequeueLimitationsForReceivePipeline();
            var requiredTransactionSupport = settings.GetRequiredTransactionModeForReceives();

            var pushSettings = new PushSettings(settings.LocalAddress(), errorQueue, settings.GetOrDefault <bool>("Transport.PurgeOnStartup"), requiredTransactionSupport);

            yield return(BuildPipelineInstance(pipelineConfiguration.MainPipeline, "Main", pushSettings, dequeueLimitations));

            foreach (var satellitePipeline in pipelineConfiguration.SatellitePipelines)
            {
                var satellitePushSettings = new PushSettings(satellitePipeline.ReceiveAddress, errorQueue, settings.GetOrDefault <bool>("Transport.PurgeOnStartup"), satellitePipeline.RequiredTransportTransactionMode);

                yield return(BuildPipelineInstance(satellitePipeline, satellitePipeline.Name, satellitePushSettings, satellitePipeline.RuntimeSettings));
            }
        }
示例#3
0
 public override TransportSubscriptionInfrastructure ConfigureSubscriptionInfrastructure()
 {
     return(new TransportSubscriptionInfrastructure(() => new SubscriptionManager(connectionFactory, routingTopology, settings.LocalAddress())));
 }