public async Task <IActionResult> Get() { _logger.LogInformation($"Sending messages with {typeof(IProducingService)}."); var message = new { message = "text" }; await _producingService.SendAsync(message, "consumption.exchange", "routing.key"); return(Ok(message)); }
private async Task RequeueMessage(BasicDeliverEventArgs eventArgs, int timeoutMilliseconds) { await _producingService.SendAsync(eventArgs.Body, eventArgs.BasicProperties, eventArgs.Exchange, eventArgs.RoutingKey, timeoutMilliseconds); _logger.LogInformation("The failed message has been re-queued"); }