首页>代码>springboot集成rabbitmq生产者消费者模型>/springboot-rabbitmq/src/main/java/com/simon/springbootrabbitmq/config/RabbitMqConfig.java
package com.simon.springbootrabbitmq.config;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Simon
*/
@Configuration
public class RabbitMqConfig {
public static final String QUEUE_KEY = "hello_world";
@Bean
public Queue queue() {
// durable: true 标识开启消息队列持久化 (队列当中的消息在重启rabbitmq服务的时候还会存在)
return new Queue(QUEUE_KEY, true);
}
}
最近浏览更多
xp95323 LV15
6月10日
haitianjiaoyu0 LV8
5月27日
qinzhifang LV1
3月15日
笛卡尔积 LV6
2023年9月25日
duon12 LV1
2023年9月25日
gaoxin222 LV14
2023年6月16日
1529860026 LV24
2023年6月1日
3054069007 LV1
2023年5月29日
陆程江 LV2
2023年5月29日
北。 LV6
2023年4月28日

最近下载
