コード例 #1
0
 public MigrationUnsubscribeTerminator(IManageSubscriptions subscriptionManager, SubscriptionRouter subscriptionRouter, IDispatchMessages dispatcher, string replyToAddress, string endpoint)
 {
     this.subscriptionManager = subscriptionManager;
     this.subscriptionRouter  = subscriptionRouter;
     this.dispatcher          = dispatcher;
     this.replyToAddress      = replyToAddress;
     this.endpoint            = endpoint;
 }
コード例 #2
0
 public MigrationSubscribeTerminator(IManageSubscriptions subscriptionManager, SubscriptionRouter subscriptionRouter, IDispatchMessages dispatcher, string subscriberAddress, string subscriberEndpoint)
 {
     this.subscriptionManager = subscriptionManager;
     this.subscriptionRouter  = subscriptionRouter;
     this.dispatcher          = dispatcher;
     this.subscriberAddress   = subscriberAddress;
     this.subscriberEndpoint  = subscriberEndpoint;
 }
コード例 #3
0
 public RunningRawEndpointInstance(SettingsHolder settings, RawTransportReceiver receiver, TransportInfrastructure transportInfrastructure, IDispatchMessages dispatcher, IManageSubscriptions subscriptionManager, string localAddress)
 {
     this.settings = settings;
     this.receiver = receiver;
     this.transportInfrastructure = transportInfrastructure;
     this.dispatcher       = dispatcher;
     this.TransportAddress = localAddress;
     SubscriptionManager   = subscriptionManager;
 }
コード例 #4
0
 public StartableRawEndpoint(SettingsHolder settings, TransportInfrastructure transportInfrastructure, RawCriticalError criticalError, IPushMessages messagePump, IDispatchMessages dispatcher, IManageSubscriptions subscriptionManager, Func <MessageContext, IDispatchMessages, Task> onMessage, string localAddress)
 {
     this.criticalError           = criticalError;
     this.messagePump             = messagePump;
     this.dispatcher              = dispatcher;
     this.onMessage               = onMessage;
     this.localAddress            = localAddress;
     this.settings                = settings;
     this.transportInfrastructure = transportInfrastructure;
     SubscriptionManager          = subscriptionManager;
 }
コード例 #5
0
        public async Task <IStartableRawEndpoint> Initialize()
        {
            CreateCriticalErrorHandler();

            CreateStartupDiagnostics();

            var transportDefinition     = settings.Get <TransportDefinition>();
            var connectionString        = settings.GetConnectionString();
            var transportInfrastructure = transportDefinition.Initialize(settings, connectionString);

            settings.Set(transportInfrastructure);

            var mainInstance       = transportInfrastructure.BindToLocalEndpoint(new EndpointInstance(settings.EndpointName()));
            var baseQueueName      = settings.GetOrDefault <string>("BaseInputQueueName") ?? settings.EndpointName();
            var mainLogicalAddress = LogicalAddress.CreateLocalAddress(baseQueueName, mainInstance.Properties);
            var localAddress       = transportInfrastructure.ToTransportAddress(mainLogicalAddress);

            settings.SetDefault(mainLogicalAddress);

            IPushMessages        messagePump         = null;
            IManageSubscriptions subscriptionManager = null;

            if (!settings.GetOrDefault <bool>("Endpoint.SendOnly"))
            {
                RegisterReceivingComponent(settings, mainLogicalAddress, localAddress);

                var receiveInfrastructure = transportInfrastructure.ConfigureReceiveInfrastructure();
                var queueCreator          = receiveInfrastructure.QueueCreatorFactory();
                messagePump = receiveInfrastructure.MessagePumpFactory();
                var queueBindings = settings.Get <QueueBindings>();
                queueBindings.BindReceiving(localAddress);

                if (settings.GetOrDefault <bool>("NServiceBus.Raw.CreateQueue"))
                {
                    await queueCreator.CreateQueueIfNecessary(queueBindings, GetInstallationUserName()).ConfigureAwait(false);
                }

                if (transportInfrastructure.OutboundRoutingPolicy.Publishes == OutboundRoutingType.Multicast ||
                    transportInfrastructure.OutboundRoutingPolicy.Sends == OutboundRoutingType.Multicast)
                {
                    subscriptionManager = CreateSubscriptionManager(transportInfrastructure);
                }
            }

            var sendInfrastructure = transportInfrastructure.ConfigureSendInfrastructure();
            var dispatcher         = sendInfrastructure.DispatcherFactory();

            await transportInfrastructure.Start().ConfigureAwait(false);

            var startableEndpoint = new StartableRawEndpoint(settings, transportInfrastructure, CreateCriticalErrorHandler(), messagePump, dispatcher, subscriptionManager, onMessage, localAddress);

            return(startableEndpoint);
        }
コード例 #6
0
 public NativeSubscriptionForwarder(IManageSubscriptions subscriptionManager, RuntimeTypeGenerator typeGenerator, EndpointInstances endpointInstances)
 {
     this.subscriptionManager = subscriptionManager;
     this.typeGenerator       = typeGenerator;
     this.endpointInstances   = endpointInstances;
 }
コード例 #7
0
 public NativeSubscribeTerminator(IManageSubscriptions subscriptionManager)
 {
     this.subscriptionManager = subscriptionManager;
 }
コード例 #8
0
 public SubscribeToAllEvents(IManageSubscriptions subscriptionManager)
 {
     _subscriptionManager = subscriptionManager;
 }
コード例 #9
0
 public SettlePolicyTask(IManageSubscriptions subscriptionManager)
 {
     this.subscriptionManager = subscriptionManager;
 }
コード例 #10
0
 public NativeSubscribeRouter(ISubscriptionStorage subscriptionStorage, IManageSubscriptions subscriptionManager)
     : base(subscriptionStorage)
 {
     this.subscriptionManager = subscriptionManager;
 }
コード例 #11
0
 public ForwardUnsubscribeNativeRule(IManageSubscriptions subscriptionManager)
 {
     this.subscriptionManager = subscriptionManager;
 }