public IActionResult Send(MessageToSendDto messageToSend) { List <MessageToSendDto> messages = new List <MessageToSendDto>(); messages.Add(messageToSend); IResult result = _publisherService.AddQueue(messages, "Message"); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Message)); }