RabbitMQ generates _skipped queues which I want to ignore

北城以北 提交于 2019-12-08 08:26:21

问题


Can anyone guess what the problem can be because I'm clueless on how to solve this. RabbitMQ generates _skipped queues and I don't have a clue why it is generating those. It is being generated when doing a publish request response.

Request Client is created using following method in MassTransit.RequestClientExtensions

public static IRequestClient<TRequest, TResponse> CreatePublishRequestClient<TRequest, TResponse>(this IBus bus, TimeSpan timeout, TimeSpan? ttl = null, Action<SendContext<TRequest>> callback = null) where TRequest : class where TResponse : class
{
  return (IRequestClient<TRequest, TResponse>) new PublishRequestClient<TRequest, TResponse>(bus, timeout, ttl, callback);
}

And Request is done as follows:

TResponse response = TaskUtil.Await(() => requestClient.Request(request));

As you can see this is Request Response scenario where Request is being sent to all consumers. But because at the moment we have only one consumer it only is being sent to that consumer. deadletters appear easily if a publishrequestresponse is done to multiple consumers, once a consumer responds, the other consumer doesn't know where to respond and a deadletter is generated. But because we have one consumer here, we can eliminate this possibility.

So what could be other reasons for these skipped queues? Huge thanks for any help on how I can troubleshoot this...

I have to say, in the Consume method, in some condition, we raise a RequestTimeoutException and catch it in the requesting application. This is tested and this doesn't generate skipped queues.


回答1:


Skipped queue is a dead letter queue. It means that your endpoint queue has a binding to some message exchange but there is no consumer for that message any longer. Maybe you change the topology and moved the consumer. You can go to the RMQ management UI and check the bindings for your endpoint exchange. If you look at messages that ended up in the skipped queue, you will find out what message types to look for.

Exchanges are named after message types so it will be easy to find the obsolete binding.

Then, in the management UI, you can manually remove the binding that is obsolete and there will be no more messages coming to the skipped queue.



来源:https://stackoverflow.com/questions/52161172/rabbitmq-generates-skipped-queues-which-i-want-to-ignore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!