package com.cim.idm.service.Impl;


import com.cim.idm.constants.RabbitMqConstants;
import com.cim.idm.service.RabbitMqService;
import com.cim.idm.utils.RabbitMqUtilsNew;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @param
 * @Description:
 * @Return:
 * @Author: Zgg
 * @Date: 2024/4/13 10:53*/


@Service
public class RabbitMqServiceNewImpl implements RabbitMqService {

    @Autowired
    private RabbitMqUtilsNew rabbitMqUtils;

//    @Override
//    public void sendMesToEq(String content) {
//        rabbitMqUtils.sendByRoutingKey(RabbitMqConstants.EXCHANGE_MEStoEQ,
//                RabbitMqConstants.TOPIC_MEStoEQ_ROUTINGKEY, content);
//    }

    @Override
    public void sendMesToEq(String content) {
        rabbitMqUtils.sendByRoutingKey("SDK.MES.CLINET.3.3.170.248.EXC", "SDK.MES.CLINET.3.3.170.248.KEY", content);
    }

    @Override
    public void sendMesToClient(String content,String routingKey) {
        rabbitMqUtils.sendByRoutingKey("", routingKey, content);
    }

    @Override
    public void sendMesToEqReply(String content, String correlationId) {
        rabbitMqUtils.sendReplyByRoutingKey(RabbitMqConstants.EXCHANGE_MEStoEQ,
                RabbitMqConstants.TOPIC_MEStoEQ_REPLY_ROUTINGKEY, content, correlationId);
    }
}
