首页>代码>Spring Boot整合RabbitMQ发送点对点消息项目demo>/micai-springboot-rabbitmq-7/src/main/java/com/micai/springboot/mq/Receiver.java
package com.micai.springboot.mq; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; /** * 描述:消息消费者 * @RabbitListener注解定义该类对hello队列的监听, * 并用@RabbitHandler注解来指定对消息的处理方法。 * 所以,该消费者实现了对hello队列的消费,消费操作为输出消息的字符串内容 * Author: 赵新国 * Date: 2017/11/3 15:42 */ @Component public class Receiver extends BaseConfig{ // //监听器监听指定的Queue @RabbitListener(queues = QUEUE_KEY) public void process(String str) { System.out.println("接收MQ消息 : " + str); } }

youwuzuichen LV11
5月29日
安东尼online LV11
2024年1月8日
笛卡尔积 LV6
2022年11月25日
ewan007 LV30
2022年7月6日
chokkint LV12
2022年4月14日
ddqddqddq LV14
2021年5月31日
wufei006007 LV1
2021年5月26日
何松林 LV7
2021年4月23日
jaflkjlkfdjl LV6
2021年4月12日
荒唐的羊 LV27
2021年1月29日

youwuzuichen LV11
5月29日
安东尼online LV11
2024年1月8日
yhwyhw1 LV2
2023年12月21日
ゆ 、 Hurt° LV2
2023年10月17日
1358849392 LV21
2023年6月9日
wxm4252 LV12
2023年5月29日
crosa_Don LV18
2023年5月19日
guviva LV6
2023年3月15日
笛卡尔积 LV6
2022年11月25日
zhang5955243 LV1
2022年10月10日