package com.kym.service.mq.producer;

import com.kym.entity.common.Exchanges;
import com.kym.entity.common.RoutingKeys;
import org.springframework.stereotype.Component;

@Component
public class UserCouponSender {

    private final MessageSender messageSender;

    public UserCouponSender(MessageSender messageSender) {
        this.messageSender = messageSender;
    }

    public void sendMessage(Object msg, int... delayTime) {
        messageSender.send(Exchanges.DELAY_EXCHANGE_NAME, RoutingKeys.DELAY_ROUTING_KEY, msg, delayTime);
    }
}
