public SimpleDataPersisterEngine( IConfigurationSection configurationSection, IRmqConsumer rmqConsumer, IDbDataWriter dbDataWriter) { this.configurationSection = configurationSection; this.rmqConsumer = rmqConsumer; this.dbDataWriter = dbDataWriter; }
public virtual Task StartAsync(CancellationToken cancellationToken) { _consumer = CreateConsumer(); _consumer.OnMessageAsync += HandleMessageAsync; _consumer.Subscribe(); return(Task.CompletedTask); }
public DeploymentServiceChirushin( IRmqConsumer rmqConsumer, IDeploymentManagerWrapper serviceFabricClientHandler, IComponentDetailsReader componentDetailsReader, IConfigurationSection configurationSection) { this.rmqConsumer = rmqConsumer; this.serviceFabricClientHandler = serviceFabricClientHandler; this.componentDetailsReader = componentDetailsReader; this.configurationSection = configurationSection; }
public CsvToJsonConverterEngine( IConfigurationSection configurationSection, IRmqConsumer rmqConsumer, IRmqPublisher rmqPublisher, ICsvConverter csvToJsonParser) { this.configurationSection = configurationSection; this.rmqConsumer = rmqConsumer; this.rmqPublisher = rmqPublisher; this.csvToJsonParser = csvToJsonParser; }
public TextExtractorEngine( IConfigurationSection configurationSection, IRmqConsumer rmqConsumer, IRmqPublisher rmqPublisher, IExtractionMethods extractionMethods, ILoggerServiceSerilog loggerService) { this.loggerService = loggerService; this.configurationSection = configurationSection; this.rmqConsumer = rmqConsumer; this.rmqPublisher = rmqPublisher; this.extractionMethods = extractionMethods; }
private Task HandleMessageAsync(byte[] body, BasicDeliverEventArgs eventArgs, IRmqConsumer consumer) { var block = JsonConvert.DeserializeObject <BlockInfo>(Encoding.UTF8.GetString(body)); return(HandleMessageAsync(block, eventArgs, consumer)); }
protected abstract Task HandleMessageAsync(BlockInfo message, BasicDeliverEventArgs eventArgs, IRmqConsumer consumer);
protected async override Task HandleMessageAsync(BlockInfo message, BasicDeliverEventArgs eventArgs, IRmqConsumer consumer) { try { await _subscriber.HandleNotification(message, default); } catch (Exception e) { _logger.LogError("BbpsServiceSubscriber Callback error", e); } }