Exemple #1
0
        public Task <IMessageSubscriber> CreateSubscriberAsync(
            MessageSubscriberOptions options,
            CancellationToken cancellationToken = default)
        {
            IMessageSubscriber result = new InMemoryMessageSubscriber(_queue, _serializer);

            return(Task.FromResult(result));
        }
Exemple #2
0
 public RabbitMQTransportReceiver(
     MessageSubscriberOptions options,
     IRabbitMQBrokerConnector brokerConnector,
     ILoggerFactory loggerFactory)
 {
     _subscriberOptios = options;
     _brokerConnector  = brokerConnector;
     _logger           = loggerFactory.CreateLogger <RabbitMQTransportReceiver>();
 }
 public RabbitMQMessageSubscriber(
     MessageSubscriberOptions options,
     IRabbitMQBrokerConnector brokerConnector,
     IMessageSerializer serializer,
     ILoggerFactory loggerFactory)
 {
     CheckValue.NotNull(brokerConnector, nameof(brokerConnector));
     _transportReceiver = new RabbitMQTransportReceiver(options, brokerConnector, loggerFactory);
     _serializer        = serializer;
     _logger            = loggerFactory.CreateLogger <RabbitMQMessageSubscriber>();
 }
Exemple #4
0
        public Task <IMessageSubscriber> CreateSubscriberAsync(MessageSubscriberOptions options, CancellationToken cancellationToken = default)
        {
            IMessageSubscriber result = new RabbitMQMessageSubscriber(options, _connector, _serializer, _loggerFactory);

            return(Task.FromResult(result));
        }