package com.mortals.xhx.base.system.message.impl;

import com.alibaba.fastjson.JSON;
import com.mortals.xhx.base.system.message.MessageCallbackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.stereotype.Service;


@Service
@Slf4j
public class MessageCallbackServiceImpl implements MessageCallbackService {


    @Override
    public void confirm(CorrelationData correlationData, boolean ack, String cause) {
        log.debug("confirm,correlationData:{},ack:{},cause:{}", JSON.toJSONString(correlationData), ack, cause);
    }

    @Override
    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
        log.debug("returnedMessage,replyCode:{},replyText:{},exchange:{},routingKey:{}", replyCode, replyText, exchange, routingKey);
    }

}