package com.yeejoin.amos.boot.module.jxiop.biz.activemq;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;

import javax.jms.Queue;


/**
 * @description:
 * @author: tw
 * @createDate: 2023/6/7
 */
@Component
@EnableJms
public class ConfigBean {

    @Value("${myqueue}")
    private String myQueue;

    //创建一个队列
    @Bean
    public Queue queue(){
        return new ActiveMQQueue(myQueue);
    }

}
