Example #1
0
 public RabbitEnvelopeSender(
     ITopologyService topologyService,
     IRabbitConnectionFactory connFactory)
 {
     _topologyService = topologyService;
     _connFactory     = connFactory;
 }
 public RabbitEnvelopeSender(
     ITopologyService topologyService,
     IRabbitConnectionFactory connFactory)
 {
     _topologyService = topologyService;
     _connFactory = connFactory;
 }
Example #3
0
        public RabbitEnvelopeReceiver(
            ITopologyService topologyService,
            IRabbitConnectionFactory connFactory)
        {
            _topologyService = topologyService;
            _connFactory     = connFactory;

            _listeners = new Dictionary <IRegistration, RabbitListener>();
        }
        public RabbitEnvelopeReceiver(
            ITopologyService topologyService,
            IRabbitConnectionFactory connFactory)
        {
            _topologyService = topologyService;
            _connFactory = connFactory;

            _listeners = new Dictionary<IRegistration, RabbitListener>();
        }
        public RabbitTransportProvider(
            ITopologyService topologyService,
            IRabbitConnectionFactory connFactory)
        {
            _topoSvc = topologyService;
            _connFactory = connFactory;

            _listeners = new Dictionary<IRegistration, RabbitListener>();

            _log = LogManager.GetLogger(this.GetType());
        }
Example #6
0
        public RabbitTransportProvider(
            ITopologyService topologyService,
            IRabbitConnectionFactory connFactory,
            IRoutingInfoCache routingInfoCache)
        {
            _topoSvc          = topologyService;
            _connFactory      = connFactory;
            _routingInfoCache = routingInfoCache;

            _listeners = new Dictionary <IRegistration, RabbitListener>();
        }
        public RabbitTransportProvider(
            ITopologyService topologyService,
            IRabbitConnectionFactory connFactory,
            IRoutingInfoCache routingInfoCache)
        {
            _topoSvc = topologyService;
            _connFactory = connFactory;
            _routingInfoCache = routingInfoCache;

            _listeners = new Dictionary<IRegistration, RabbitListener>();
        }
Example #8
0
        public RoutingInfo GetRoutingFromCacheOrService(
            IRoutingInfoCache cache,
            ITopologyService service,
            IDictionary <string, string> hints)
        {
            // if there are no hints, we have no idea what to do
            if ((null == hints) || (!hints.Any()))
            {
                return(null);
            }

            // pull the topic from the hints
            string topic = hints.GetMessageTopic();

            // first, check the cache
            RoutingInfo routing = cache.GetIfPresent(topic);

            // if nothing, use the service
            if (null == routing)
            {
                Log.Debug(string.Format("No routing information cache for {0}; using the topology service.", topic));

                routing = service.GetRoutingInfo(hints);

                // if we get something from the service, cache it
                if (null != routing)
                {
                    cache.Put(topic, routing);
                }
            }
            else
            {
                Log.Debug(string.Format("Routing information for {0} was found in the cache.", topic));
            }

            // whatever we end up with, return it
            return(routing);
        }
        public RoutingInfo GetRoutingFromCacheOrService(
            IRoutingInfoCache cache,
            ITopologyService service,
            IDictionary<string, string> hints)
        {
            // if there are no hints, we have no idea what to do
            if ((null == hints) || (!hints.Any()))
            {
                return null;
            }

            // pull the topic from the hints
            string topic = hints.GetMessageTopic();

            // first, check the cache
            RoutingInfo routing = cache.GetIfPresent(topic);

            // if nothing, use the service
            if (null == routing)
            {
                Log.Debug(string.Format("No routing information cache for {0}; using the topology service.", topic));

                routing = service.GetRoutingInfo(hints);

                // if we get something from the service, cache it
                if (null != routing)
                {
                    cache.Put(topic, routing);
                }
            }
            else
            {
                Log.Debug(string.Format("Routing information for {0} was found in the cache.", topic));
            }

            // whatever we end up with, return it
            return routing;
        }
        public void Append(ITopologyService topologyService)
        {
            LOG.DebugFormat("Appending topology service {0} to the composite topology service", topologyService.GetHashCode());

            _topologyManagers.Enqueue(topologyService);
        }