package cn.edu.zjvtit.cloudstorage.apiservice.rabbitmq.topic;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sender {
    @Autowired//自动装配
    private RabbitTemplate rabbitTemplate;//定义私有的消息模板

    public void send(String filename) {
        this.rabbitTemplate.convertAndSend("dataServers", filename);
    }
    //确定data服务器获取到文件名
}
