broker维护时,服务端返回SERVICE_NOT_AVAILABLE,生产者自动使用下一个broker,重试消息发送
大石头 authored at 2023-05-25 14:29:38
441.00 B
NewLife.RocketMQ
namespace NewLife.RocketMQ.Protocol;

/// <summary>响应异常</summary>
public class ResponseException : Exception
{
    /// <summary>响应代码</summary>
    public ResponseCode Code { get; set; }

    /// <summary>实例化响应异常</summary>
    /// <param name="code"></param>
    /// <param name="message"></param>
    public ResponseException(ResponseCode code, String message) : base(code + ": " + message) => Code = code;
}