package com.yuchen.saas.message.api.feign.rocketMq;


import com.yuchen.saas.message.api.dto.RocketMqDTO;
import com.yuchen.saas.message.api.feign.ue4.UE4MessageFeignServer;
import com.yuchen.saas.message.api.param.MessageParam;
import feign.hystrix.FallbackFactory;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.stereotype.Component;

;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/11/16 11:40
 * @Description: TODO
 * @Version: 1.0
 */
@Component
public class RocketMqFeignFallback implements FallbackFactory<RocketMqFeignServer> {

    @Override
    public RocketMqFeignServer create(Throwable cause) {
        return new RocketMqFeignServer() {

            @Override
            public R sendMessage(RocketMqDTO param) {
                return R.fail("远程调用失败");
            }


        };
    }
}