Пример #1
0
 public NodeRegistration(MessagingSettings settings, INodeDiscovery nodes, JasperRuntime runtime,
                         IMessageLogger logger)
 {
     _settings = settings;
     _nodes    = nodes;
     _runtime  = runtime;
     _logger   = logger;
 }
Пример #2
0
 public ServiceBusActivator(BusSettings settings, IHandlerPipeline pipeline, IDelayedJobProcessor delayedJobs, SerializationGraph serialization, IEnumerable <ITransport> transports, UriAliasLookup lookups, INodeDiscovery nodes)
 {
     _settings      = settings;
     _pipeline      = pipeline;
     _delayedJobs   = delayedJobs;
     _serialization = serialization;
     _transports    = transports.ToArray();
     _lookups       = lookups;
     _nodes         = nodes;
 }
Пример #3
0
        public async Task FanOutSubscriptionChangedMessage(IServiceBus bus, INodeDiscovery discovery)
        {
            var peers = await discovery.FindPeers();

            foreach (var node in peers)
            {
                var destination = node.DetermineLocalUri();
                if (destination != null)
                {
                    await bus.Send(destination, new SubscriptionsChanged());
                }
            }
        }
Пример #4
0
        public ConsulNodeDiscoveryTests()
        {
            using (var client = new ConsulClient())
            {
                client.KV.DeleteTree(ConsulNodeDiscovery.TRANSPORTNODE_PREFIX).Wait();
            }

            var registry = new JasperRegistry
            {
                ServiceName = "ConsulTestApp"
            };

            registry.Services.ForSingletonOf <INodeDiscovery>().Use <ConsulNodeDiscovery>();

            _runtime = JasperRuntime.For(registry);

            theNodeDiscovery = _runtime.Get <INodeDiscovery>().As <ConsulNodeDiscovery>();
        }
Пример #5
0
 public SubscriptionChangeNotifier(IServiceBus bus, INodeDiscovery nodes)
 {
     _bus   = bus;
     _nodes = nodes;
 }
Пример #6
0
 public SubscriptionChangeNotifier(IMessageContext bus, INodeDiscovery nodes)
 {
     _bus   = bus;
     _nodes = nodes;
 }