这个异常是在使用EasyNetQ时,遇到的问题,找了两个小时.
详细错误
Error:System.TimeoutException: The operation requested on PersistentChannel timed out. 在 EasyNetQ.Producer.ClientCommandDispatcherSingleton.Invoke[T](Func`2 channelAction) 在 EasyNetQ.Producer.ClientCommandDispatcher.Invoke[T](Func`2 channelAction) 在 EasyNetQ.RabbitAdvancedBus.QueueDeclare(String name, Boolean passive, Boolean durable, Boolean exclusive, Boolean autoDelete, Nullable`1 perQueueMessageTtl, Nullable`1 expires, Nullable`1 maxPriority, String deadLetterExchange, String deadLetterRoutingKey, Nullable`1 maxLength, Nullable`1 maxLengthBytes) 在 EasyNetQ.Producer.SendReceive.<>c__DisplayClass12_0.<DeclareQueue>b__0(String key) 在 System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory) 在 EasyNetQ.Producer.SendReceive.DeclareQueue(String queueName) 在 EasyNetQ.Producer.SendReceive.Send[T](String queue, T message) 在 EasyNetQ.RabbitBus.Send[T](String queue, T message)
原因是
var bus = RabbitHutch.CreateBus("host=localhost;username=guest;password=guest");
这里面=必须直接接值,不能有空格,不能有空格,不能有空格
这作者也是够坑