Robert Sundström
Robert Sundström

Reputation: 355

Requests failing with a timeout, why?

I have configured MassTransit with RabbitMQ as transport. And I just use an instance of generic IRequestClient to send requests to a consumer that then should return a response.

My problem is that every other request fails with a TimeoutException. Execute it once, the next time it fails, and then it works again.

The Consumer is not even invoked when failed.

What can be the reason for this?

I have other services share a similar name in their requests and consumers. I have tried to figure out if that is the problem.

Upvotes: 0

Views: 365

Answers (1)

Chris Patterson
Chris Patterson

Reputation: 33278

You should post the configuration code of your application using the request client and the one configuring the consumer.

If you have other consumers with the same name, it's likely they're on the same queue if you're using ConfigureEndpoints, which could be the root cause of the issue.

Since it's every-other-message that times out, that would make sense since RabbitMQ will load balance the queue across the different services with the same queue name.

Upvotes: 1

Related Questions