小编pix*_*ger的帖子

如何解决此错误:RabbitMQ.Client.Exceptions.BrokerUnreachableException: 'None of the specified endpoints arereachable'

我在 eshop 订单篮项目中工作。我需要帮助解决此代码中的rabbitmq错误:

using Microsoft.Extensions.Logging; 
using Polly; 
using Polly.Retry; 
using RabbitMQ.Client; 
using RabbitMQ.Client.Events; 
using RabbitMQ.Client.Exceptions; 
using System; 
using System.IO; 
using System.Net.Sockets; 

namespace InfiniteWorx.MRU.BuildingBlocks.EventBusRabbitMQ 
{ 
    public class DefaultRabbitMQPersistentConnection 
       : IRabbitMQPersistentConnection 
    { 
        private readonly IConnectionFactory _connectionFactory;  
        private readonly ILogger<DefaultRabbitMQPersistentConnection> _logger; 
        private readonly int _retryCount; 
        IConnection _connection; 
        bool _disposed; 
        object sync_root = new object(); 
        public DefaultRabbitMQPersistentConnection(IConnectionFactory 
connectionFactory, ILogger<DefaultRabbitMQPersistentConnection> logger, int 
retryCount = 5) 
        { 
            _connectionFactory = connectionFactory ?? throw new 
ArgumentNullException(nameof(connectionFactory)); 
            _logger = logger ?? throw new 
ArgumentNullException(nameof(logger)); 
            _retryCount = retryCount; 
        } 
        public …
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net rabbitmq

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

asp.net ×1

c# ×1

rabbitmq ×1