我创建了一个总线应用程序来封装所有订阅和发布到 RabbitMQ 代理。该总线然后用作我其他项目的 SDK。在运行这个项目后(对于使用我的 Bus sdk 通过 RabbitMQ 消息进行通信的应用程序来说,这是基本的),我意识到总线在本地方法 .CreateModel() 上抛出了一个 TimeOut 异常,如下所示:
System.TimeoutException: The operation has timed out.
at RabbitMQ.Util.BlockingCell.GetValue(TimeSpan timeout)
at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)
at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body)
at RabbitMQ.Client.Framing.Impl.Model._Private_ChannelOpen(String outOfBand)
at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.CreateNonRecoveringModel()
at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.CreateModel()
Run Code Online (Sandbox Code Playgroud)
以下是有关我的 RabbitMQ 代理的一些信息: 版本:3.7.2 Erlang:20.1 操作系统:Linux Ubuntu (AWS)
这是我的 RabbitMQConnection 类:
internal class RabbitMQConnection : IDisposable
{
private object __syncRoot__ { get; } = new object();
#region Private
private bool __disposed__ { get; set; }
private IConnectionFactory __rmqConnFactory__ { get; } …Run Code Online (Sandbox Code Playgroud)