KafkaSendFallback.java 505 字节
package com.tianbo.messagebus.myinterface;


import com.tianbo.messagebus.controller.response.ResultJson;
import com.tianbo.messagebus.model.MSGS;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service("myKafkaSend")
public class KafkaSendFallback implements KafkaSendApi {

    @Override
    public ResultJson send(MSGS msgs) {
        log.info("发送消息失败");
        return new ResultJson<>("400","发送消息失败");
    }
}