I'm starting at RabbitMq and I'm having trouble starting my API. This error occurred: System.TimeoutException: 'The requested operation on PersistentChannel has timed out'.
I am using EasyNetQ.
RabbitMq is running in a Docker container that is configured as settings: http: 15672 and ampq: 56712. Click here to access Rabbitmq without any problems in the browser.
Below is the code (for now the hardcode) of the settings. Try to pass the username and password as well, but without success, according to the code.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
_bus = RabbitHutch.CreateBus("host=localhost:5672;username=guest;password=guest");
_bus.RespondAsync<UsuarioRegistradoIntegrationEvent, ResponseMessage>(async request =>
new ResponseMessage(await RegistrarCliente(request)));
return Task.CompletedTask;
}
ou
protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
_bus = RabbitHutch.CreateBus("host=localhost:5672");
_bus.RespondAsync<UsuarioRegistradoIntegrationEvent, ResponseMessage>(async request =>
new ResponseMessage(await RegistrarCliente(request)));
return Task.CompletedTask;
}
ou
protected override Task ExecuteAsync(CancellationToken stoppingToken)
{
_bus = RabbitHutch.CreateBus("host=localhost");
_bus.RespondAsync<UsuarioRegistradoIntegrationEvent, ResponseMessage>(async request =>
new ResponseMessage(await RegistrarCliente(request)));
return Task.CompletedTask;
}