示例#1
0
 public RabbitMQTransport(
     ILogger <RabbitMQTransport> logger,
     IConnectionChannelPool connectionChannelPool)
 {
     _logger = logger;
     _connectionChannelPool = connectionChannelPool;
     _exchange = _connectionChannelPool.Exchange;
 }
示例#2
0
 public RabbitMQConsumerFactory(RabbitMQOptions options,
                                IConnectionChannelPool connectionChannelPool,
                                ILoggerFactory loggerFactory)
 {
     _options = options;
     _connectionChannelPool = connectionChannelPool;
     _loggerFactory         = loggerFactory;
 }
示例#3
0
 public PublishQueueExecutor(ILogger <PublishQueueExecutor> logger, CapOptions options,
                             RabbitMQOptions rabbitMQOptions, IConnectionChannelPool connectionChannelPool, IStateChanger stateChanger)
     : base(options, stateChanger, logger)
 {
     _logger = logger;
     _connectionChannelPool = connectionChannelPool;
     _rabbitMQOptions       = rabbitMQOptions;
 }
 public RabbitMQPublishMessageSender(ILogger <RabbitMQPublishMessageSender> logger, CapOptions options,
                                     IStorageConnection connection, IConnectionChannelPool connectionChannelPool, IStateChanger stateChanger)
     : base(logger, options, connection, stateChanger)
 {
     _logger = logger;
     _connectionChannelPool = connectionChannelPool;
     _exchange      = _connectionChannelPool.Exchange;
     ServersAddress = _connectionChannelPool.HostAddress;
 }
示例#5
0
 public PublishService(ILogger logger, IEnumerable <IConnectionChannelPool> connectionList)
 {
     this.logger           = logger;
     connectionChannelPool = connectionList.FirstOrDefault(e => e.ConnectionKey == ConnectionKey);
     if (connectionChannelPool == null)
     {
         throw new Exception($"{ServiceKey}未找到相应的ConnectionChannelPool,请确保ConnectionKey是否匹配实现");
     }
 }
示例#6
0
 public RabbitMQConsumerClient(string queueName,
                               IConnectionChannelPool connectionChannelPool,
                               IOptions <RabbitMQOptions> options)
 {
     _queueName             = queueName;
     _connectionChannelPool = connectionChannelPool;
     _rabbitMQOptions       = options.Value;
     _exchangeName          = connectionChannelPool.Exchange;
 }
示例#7
0
 public RedisMQConsumerClient(string queueName,
                              IConnectionChannelPool connectionChannelPool,
                              IOptions <RedisMQOptions> options)
 {
     _queueName             = queueName;
     _connectionChannelPool = connectionChannelPool;
     _redisMQOptions        = options.Value;
     _channel             = connectionChannelPool.Rent();
     _redisReliableQueues = new List <RedisReliableQueue <string> >();
 }
示例#8
0
 public ZeroMQConsumerClient(string queueName,
                             IConnectionChannelPool connectionChannelPool,
                             IOptions <ZeroMQOptions> options)
 {
     _queueName             = queueName;
     _connectionChannelPool = connectionChannelPool;
     _ZeroMQOptions         = options.Value;
     _exchangeName          = connectionChannelPool.Exchange;
     HostAddress            = $"tcp://{_ZeroMQOptions.HostName}:{_ZeroMQOptions.SubPort}";
 }
示例#9
0
        public RabbitMQConsumerClient(string queueName,
                                      IConnectionChannelPool connectionChannelPool,
                                      RabbitMQOptions options)
        {
            _queueName             = queueName;
            _connectionChannelPool = connectionChannelPool;
            _rabbitMQOptions       = options;
            _exchageName           = options.ExchangeName;

            InitClient();
        }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:EasyCaching.Bus.RabbitMQ.DefaultRabbitMQBus"/> class.
 /// </summary>
 /// <param name="connectionChannelPool">Connection channel pool.</param>
 /// <param name="rabbitMQOptions">Rabbit MQO ptions.</param>
 /// <param name="serializer">Serializer.</param>
 /// <param name="localCachingProvider">Local caching provider.</param>
 public DefaultRabbitMQBus(
     IConnectionChannelPool connectionChannelPool,
     RabbitMQBusOptions rabbitMQOptions,
     IEasyCachingSerializer serializer,
     IEasyCachingProvider localCachingProvider)
 {
     this._rabbitMQBusOptions    = rabbitMQOptions;
     this._connectionChannelPool = connectionChannelPool;
     this._serializer            = serializer;
     this._localCachingProvider  = localCachingProvider;
 }
示例#11
0
 public RabbitMQConsumerClientFactory(RabbitMQOptions rabbitMQOptions, IConnectionChannelPool channelPool)
 {
     _rabbitMQOptions       = rabbitMQOptions;
     _connectionChannelPool = channelPool;
 }
示例#12
0
 public RedisMQConsumerClientFactory(IOptions <RedisMQOptions> rabbitMQOptions, IConnectionChannelPool channelPool)
 {
     _rabbitMQOptions       = rabbitMQOptions;
     _connectionChannelPool = channelPool;
 }
示例#13
0
 public ZeroMQConsumerClientFactory(IOptions <ZeroMQOptions> ZeroMQOptions, IConnectionChannelPool channelPool)
 {
     _ZeroMQOptions         = ZeroMQOptions;
     _connectionChannelPool = channelPool;
 }
 public PushMessageService(IConnectionChannelPool pool, PublicOptions options)
 {
     _pool    = pool;
     _options = options;
     Init();
 }