首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MassTransit请求响应示例

MassTransit请求响应示例
EN

Stack Overflow用户
提问于 2018-06-05 10:54:50
回答 1查看 906关注 0票数 1

我正在学习MassTransit,所以我下载了他们拥有的示例,但是它似乎不适用于我,当我尝试启动该服务时,我得到了以下错误:

代码语言:javascript
复制
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的示例时,它们工作得很好。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-05 11:50:32

该示例使用一个RMQ,其中包括test虚拟主机。因为您还没有创建它,所以您的代码会失败,并且它实际上告诉您这个--没有找到虚拟主机test

下面是该示例中的app.config

代码语言:javascript
复制
<appSettings>
    <add key="RabbitMQHost" value="rabbitmq://localhost/test"/>
    <add key="ServiceQueueName" value="request_service"/>
</appSettings>

因此,客户端使用相同的URI, (因此两者都会失败)将无法启动。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50698343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档