我正在学习MassTransit,所以我下载了他们拥有的示例,但是它似乎不适用于我,当我尝试启动该服务时,我得到了以下错误:
An exception occurred
MassTransit.RabbitMqTransport.RabbitMqConnectionException: Connect failed: igor@localhost:5672/test ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=530, text="NOT_ALLOWED - vhost test not found", classId=10, methodId=40, cause=
at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)当我尝试使用其他使用较早版本的MassTransit的示例时,它们工作得很好。
发布于 2018-06-05 11:50:32
该示例使用一个RMQ,其中包括test虚拟主机。因为您还没有创建它,所以您的代码会失败,并且它实际上告诉您这个--没有找到虚拟主机test。
下面是该示例中的app.config:
<appSettings>
<add key="RabbitMQHost" value="rabbitmq://localhost/test"/>
<add key="ServiceQueueName" value="request_service"/>
</appSettings>因此,客户端使用相同的URI, (因此两者都会失败)将无法启动。
https://stackoverflow.com/questions/50698343
复制相似问题