public RabbitMqDomainEventPublisher( IRabbitMqPublisher rabbitMqPublisher, IRabbitMqMessageFactory rabbitMqMessageFactory) { _rabbitMqPublisher = rabbitMqPublisher; _rabbitMqMessageFactory = rabbitMqMessageFactory; }
private static async Task SendMessagesAsync( IRabbitMqPublisher rabbitMqPublisher, int count, Exchange exchange, RoutingKey routingKey, ConcurrentBag <Exception> exceptions) { var guid = Guid.NewGuid(); try { for (var i = 0; i < count; i++) { var rabbitMqMessage = new RabbitMqMessage( $"{guid}-{i}", new Metadata(), exchange, routingKey, new MessageId(Guid.NewGuid().ToString("D"))); await rabbitMqPublisher.PublishAsync(CancellationToken.None, rabbitMqMessage).ConfigureAwait(false); } } catch (Exception e) { exceptions.Add(e); } }
public ExchangeHealthControlService( IExchangeCache exchangeCache, IExchangeConnectorService exchangeConnectorService, IRabbitMqPublisher <ExchangeHealthControlReport> exchangeHealthControlReportPublisher, IExchangeHealthControlResultRepository exchangeHealthControlResultRepository, IReloadingManager <ExchangeHealthControlJobSettings> settings, ILog log) { _exchangeCache = exchangeCache; _exchangeConnectorService = exchangeConnectorService; _exchangeHealthControlReportPublisher = exchangeHealthControlReportPublisher; _exchangeHealthControlResultRepository = exchangeHealthControlResultRepository; _settings = settings; _log = log; _failMessageThrottlingPeriodSec = _settings.CurrentValue.FailMessageThrottlingPeriodSeconds; }
public ExchangePollingService( IExchangeCache exchangeCache, IQuoteService quoteService, IExchangeConnectorService exchangeConnectorService, IRabbitMqPublisher <ExecutionReport> executionReportPublisher, IReloadingManager <ExchangePollingJobSettings> settings, ILog log) { _exchangeCache = exchangeCache; _quoteService = quoteService; _exchangeConnectorService = exchangeConnectorService; _executionReportPublisher = executionReportPublisher; _settings = settings; _log = log; }
public RpcConsumer( ILogger <RpcConsumer> logger, IRabbitMqPublisher rabbitMqPublisher, IRabbitMqSubscriber rabbitMqSubscriber) { _logger = logger; _rabbitMqPublisher = rabbitMqPublisher; _rabbitMqSubscriber = rabbitMqSubscriber; }
public RpcClient( ILogger <RpcClient> logger, IRabbitMqPublisher rabbitMqPublisher, IRabbitMqSubscriber rabbitMqSubscriber) { _logger = logger; _rabbitMqPublisher = rabbitMqPublisher; _rabbitMqSubscriber = rabbitMqSubscriber; _pendingMessages = new ConcurrentDictionary <string, TaskCompletionSource <string> >(); }
public MessageController(IRabbitMqPublisher <SendMessageRequestDTO, SendMessageResponseDTO> sendMessagePublisher) { _sendMessagePublisher = sendMessagePublisher; }
private static void SendMessages( IRabbitMqPublisher rabbitMqPublisher, int count, Exchange exchange, RoutingKey routingKey, ConcurrentBag<Exception> exceptions) { var guid = Guid.NewGuid(); try { for (var i = 0; i < count; i++) { var rabbitMqMessage = new RabbitMqMessage( $"{guid}-{i}", new Metadata(), exchange, routingKey, new MessageId(Guid.NewGuid().ToString("D"))); rabbitMqPublisher.PublishAsync(CancellationToken.None, rabbitMqMessage).Wait(); } } catch (Exception e) { exceptions.Add(e); } }
public RmqController(IRabbitMqPublisher publisher, IRpcClient <TestRequest, TestReply> rpcClient) { _publisher = publisher; _rpcClient = rpcClient; _client = new HttpClient(); }
public Publisher(IRabbitMqPublisher publisher) { _publisher = publisher; }