Masstransit error queue is consuming, but still is not empty

半腔热情 提交于 2019-12-10 18:25:05

问题


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)

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:


This is not correct.

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

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

  3. 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.



来源:https://stackoverflow.com/questions/46128546/masstransit-error-queue-is-consuming-but-still-is-not-empty

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