<small id='iCh8E'></small><noframes id='iCh8E'>

<legend id='iCh8E'><style id='iCh8E'><dir id='iCh8E'><q id='iCh8E'></q></dir></style></legend>
    <i id='iCh8E'><tr id='iCh8E'><dt id='iCh8E'><q id='iCh8E'><span id='iCh8E'><b id='iCh8E'><form id='iCh8E'><ins id='iCh8E'></ins><ul id='iCh8E'></ul><sub id='iCh8E'></sub></form><legend id='iCh8E'></legend><bdo id='iCh8E'><pre id='iCh8E'><center id='iCh8E'></center></pre></bdo></b><th id='iCh8E'></th></span></q></dt></tr></i><div id='iCh8E'><tfoot id='iCh8E'></tfoot><dl id='iCh8E'><fieldset id='iCh8E'></fieldset></dl></div>
    • <bdo id='iCh8E'></bdo><ul id='iCh8E'></ul>

    <tfoot id='iCh8E'></tfoot>

        获取 MassTransit 消息重试次数

        时间:2023-08-24
        <legend id='gmpsz'><style id='gmpsz'><dir id='gmpsz'><q id='gmpsz'></q></dir></style></legend>
          <bdo id='gmpsz'></bdo><ul id='gmpsz'></ul>

              <small id='gmpsz'></small><noframes id='gmpsz'>

                <tbody id='gmpsz'></tbody>

              • <i id='gmpsz'><tr id='gmpsz'><dt id='gmpsz'><q id='gmpsz'><span id='gmpsz'><b id='gmpsz'><form id='gmpsz'><ins id='gmpsz'></ins><ul id='gmpsz'></ul><sub id='gmpsz'></sub></form><legend id='gmpsz'></legend><bdo id='gmpsz'><pre id='gmpsz'><center id='gmpsz'></center></pre></bdo></b><th id='gmpsz'></th></span></q></dt></tr></i><div id='gmpsz'><tfoot id='gmpsz'></tfoot><dl id='gmpsz'><fieldset id='gmpsz'></fieldset></dl></div>
              • <tfoot id='gmpsz'></tfoot>
                1. 本文介绍了获取 MassTransit 消息重试次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在使用 Masstransit+RabbitMQ.我的一位消费者实施了重试策略,我想知道一旦消息在错误队列中,是否有任何方法可以重试消息?

                  I'm using Masstransit+RabbitMQ. One of the my consumers implements retry policy and I'm wondering if there any way to get message's retries amout once message is in the error queue?

                  我还想知道 MT 计数是如何重试的,因为我没有使用 RabbitMq 服务器在消息头中查找任何相关信息.

                  Also I would like to know how MT counting retries because I didn't namage to find any related information in message's headers using RabbitMq server.

                  谢谢.

                  推荐答案

                  您可以在您的消费者中使用以下方法重试重试次数.

                  You can, in your consumer, use the following method to retry the retry attempt number.

                  consumeContext.GetRetryAttempt()
                  

                  如果当前处理尝试是重试,它应该返回 > 0.

                  It should return > 0 if the current processing attempt is a retry.

                  一旦达到重试限制,下一个版本的 MassTransit (v6) 将在错误队列 MT-Fault-RetryCount 中包含一个标头,其中包含已尝试的重试次数.此外,Fault<T> 消息将具有相同的可用标头.

                  Once the retry limit is reached, the next version of MassTransit (v6) will include a header in the error queue MT-Fault-RetryCount which will have the number of retries that were attempted. Also, Fault<T> messages will have that same header available.

                  这篇关于获取 MassTransit 消息重试次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:RabbitMQ + C# + SSL 下一篇:RabbitMQ C# 验证消息已发送

                  相关文章

                  最新文章

                  <legend id='gPJil'><style id='gPJil'><dir id='gPJil'><q id='gPJil'></q></dir></style></legend>

                  <small id='gPJil'></small><noframes id='gPJil'>

                    <bdo id='gPJil'></bdo><ul id='gPJil'></ul>
                  1. <tfoot id='gPJil'></tfoot>
                    <i id='gPJil'><tr id='gPJil'><dt id='gPJil'><q id='gPJil'><span id='gPJil'><b id='gPJil'><form id='gPJil'><ins id='gPJil'></ins><ul id='gPJil'></ul><sub id='gPJil'></sub></form><legend id='gPJil'></legend><bdo id='gPJil'><pre id='gPJil'><center id='gPJil'></center></pre></bdo></b><th id='gPJil'></th></span></q></dt></tr></i><div id='gPJil'><tfoot id='gPJil'></tfoot><dl id='gPJil'><fieldset id='gPJil'></fieldset></dl></div>