简体   繁体   中英

MassTransit Request Response sample

I'm learning about MassTransit, so I downloaded the sample they have however it doesn't seem to be working for me, I'm getting the following error when I try to start the service:

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)

When I try to use other examples using older versions of MassTransit they are working fine.

The sample uses a RMQ URI, which includes the test virtual host. Since you have not created it, your code fails and it actually tells you exactly this - virtual host test is not found.

Here is the app.config from that sample:

<appSettings>
    <add key="RabbitMQHost" value="rabbitmq://localhost/test"/>
    <add key="ServiceQueueName" value="request_service"/>
</appSettings>

Hence that the client uses the same URI, so both of them will fail starting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM