Masstransit错误队列正在消耗,但仍然不为空 [英] Masstransit error queue is consuming, but still is not empty

查看:141
本文介绍了Masstransit错误队列正在消耗,但仍然不为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Mastransit 3.5.0与RabbitMq一起使用.如果队列使用方抛出异常,则默认情况下将处理它的MoveExceptionToTransportFilter并将其移到_error队列.对于_error队列,我有单独的使用者: Consume(ConsumeContext>上下文)

I am using Mastransit 3.5.0 with RabbitMq. If queue consumers throws exception, its is handled by default MoveExceptionToTransportFilter and moved to _error queue. For _error queue I have seperate consumer: Consume(ConsumeContext> context)

故障的行为是完全不同的.处理了一部分错误并将其从_error队列中删除,但是错误消息的一部分仍保留在错误队列中,并且未被此使用者使用.据我了解,如果我有故障使用者,那么_error队列应该为空.

Behavior of Fault is rather different. Part of errors are handled and removed from _error queue, but part of error message still remain in error queue and do not consumed by this consumer. As I understand If I have Fault consumer then _error queue should be empty.

我找不到解释,为什么错误仍在排队.也许是因为这些错误曾经被消耗掉了,但是我无法在标题中找到任何指示,否则在哪里?

I can not find explanation, why errors are still in queue. Maybe because these faults were once consumed, but I cant find any indication in the headers or else where?

推荐答案

这是不正确的.

  1. 您不应从错误队列中消耗资源.错误队列会累积使消费者崩溃的消息,以进行诊断.

  1. You should not consume from the error queue. Error queue accumulates messages that crashed their consumers, for diagnostics purposes.

Faut<T>消息是发布的一部分,用于将消息移至错误队列.这两件事是不相关的.

Faut<T> messages are published in addition to moving messages to the error queue. These two things are unrelated.

如果您拥有FaultFault<T>事件的使用者,则只需这样做-消耗这些事件.它与错误队列中的消息无关.

If you have a consumer of Fault or Fault<T> events, you just do that - consume these events. It has nothing to do with messages in the error queue.

这篇关于Masstransit错误队列正在消耗,但仍然不为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆