コード例 #1
0
 public RabbitTunnelWithPriorityQueuesSupport(IConsumerManager consumerManager,
                                              IRabbitWatcher watcher,
                                              IRouteFinder routeFinder,
                                              IDurableConnection connection,
                                              ISerializer serializer,
                                              ICorrelationIdGenerator correlationIdGenerator,
                                              bool setPersistent)
     : base(consumerManager, watcher, routeFinder, connection, serializer, correlationIdGenerator, setPersistent)
 {
     _priorityConsumerManager = new PriorityConsumerManager(watcher, consumerManager.MessageHandlerFactory, serializer);
 }
コード例 #2
0
        /// <summary>
        /// Create a tunnel by <see cref="IConsumerManager"/>, <see cref="IRouteFinder"/>, <see cref="IDurableConnection"/>, <see cref="ISerializer"/> and <see cref="ICorrelationIdGenerator"/>
        /// </summary>
        /// <param name="consumerManager"></param>
        /// <param name="watcher"></param>
        /// <param name="routeFinder"></param>
        /// <param name="connection"></param>
        /// <param name="serializer"></param>
        /// <param name="correlationIdGenerator"></param>
        /// <param name="setPersistent"></param>
        public RabbitTunnel(IConsumerManager consumerManager,
                            IRabbitWatcher watcher,
                            IRouteFinder routeFinder,
                            IDurableConnection connection,
                            ISerializer serializer,
                            ICorrelationIdGenerator correlationIdGenerator,
                            bool setPersistent)
        {
            if (consumerManager == null)
            {
                throw new ArgumentNullException("consumerManager");
            }
            if (watcher == null)
            {
                throw new ArgumentNullException("watcher");
            }
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }
            if (correlationIdGenerator == null)
            {
                throw new ArgumentNullException("correlationIdGenerator");
            }

            _consumerManager        = consumerManager;
            _watcher                = watcher;
            _connection             = connection;
            _correlationIdGenerator = correlationIdGenerator;
            _observers              = new ConcurrentBag <IObserver <ISerializer> >();

            SetRouteFinder(routeFinder);
            SetSerializer(serializer);
            SetPersistentMode(setPersistent);

            _connection.Connected    += OpenTunnel;
            _connection.Disconnected += CloseTunnel;
            _subscribeActions         = new ConcurrentDictionary <Guid, Action>();
        }
 public RabbitTunnelWithPriorityQueuesSupportForTest(IConsumerManager consumerManager, IRabbitWatcher watcher, IRouteFinder routeFinder, IDurableConnection connection, ISerializer serializer, ICorrelationIdGenerator correlationIdGenerator, bool setPersistent)
     : base(consumerManager, watcher, routeFinder, connection, serializer, correlationIdGenerator, setPersistent)
 {
 }
コード例 #4
0
 public RabbitTunnelForTest(IConsumerManager consumerManager, IRabbitWatcher watcher, IRouteFinder routeFinder, IDurableConnection connection, ISerializer serializer, ICorrelationIdGenerator correlationIdGenerator, bool setPersistent) 
     : base(consumerManager, watcher, routeFinder, connection, serializer, correlationIdGenerator, setPersistent)
 {
 }
コード例 #5
0
 public InvoicesJob(ICorrelationIdGenerator correlationIdGenerator, IAppLogger appLogger, IInvoicesProcessor invoicesProcessor) : base(correlationIdGenerator, appLogger)
 {
     _invoicesProcessor = invoicesProcessor;
 }
コード例 #6
0
 public PaymentsJob(ICorrelationIdGenerator correlationIdGenerator, IAppLogger appLogger, IPaymentsProcessor paymentsProcessor) : base(correlationIdGenerator, appLogger)
 {
     _paymentsProcessor = paymentsProcessor;
 }
コード例 #7
0
 protected BaseJob(ICorrelationIdGenerator correlationIdGenerator, IAppLogger appLogger)
 {
     _correlationIdGenerator = correlationIdGenerator;
     _appLogger = appLogger;
 }