103天
行百里者半九十,想要在一个行业里成为顶尖人才,一定满足一万小时定律,要想学好JAVA,需要持之以恒不断地努力,每天都要勤思考+善于询问+解决问题!
知识温故而知新>>>>>>
Linux中tar.gz文件和.rpm文件的区别
image.pngrabbitmq安装教程
1111.png今天学到的知识>>>>>>
rabbitmq中相关注解的含义
image.pngRabbitMQ内容分析
原理图
image.png222.png
Direct 交换器
Consumer 的配置文件
spring.application.name=springcloud-mq
spring.rabbitmq.host=192.168.194.129
spring.rabbitmq.port=5672
spring.rabbitmq.username=anlan
spring.rabbitmq.password=xianyu
#\u8bbe\u7f6e\u4ea4\u6362\u5668\u7684\u540d\u79f0
mq.config.exchange=log.direct
#info\u961f\u5217\u540d\u79f0
mq.config.queue.info=log.info
#info\u8def\u7531\u952e
mq.config.queue.info.routing.key=log.info.routing.key
#error\u961f\u5217\u540d\u79f0
mq.config.queue.error=log.error
#error\u8def\u7531\u952e
mq.config.queue.error.routing.key=log.error.routing.key
provider配置文件
spring.application.name=springcloud-mq
spring.rabbitmq.host=192.168.194.129
spring.rabbitmq.port=5672
spring.rabbitmq.username=anlan
spring.rabbitmq.password=xianyu
#\u8bbe\u7f6e\u4ea4\u6362\u5668\u7684\u540d\u79f0
mq.config.exchange=log.direct
#info\u8def\u7531\u952e
mq.config.queue.info.routing.key=log.info.routing.key
#error\u961f\u5217\u540d\u79f0
mq.config.queue.error=log.error
Topic 交换器
Consumer 的配置文件
spring.application.name=springcloud-mq
spring.rabbitmq.host=192.168.194.129
spring.rabbitmq.port=5672
spring.rabbitmq.username=anlan
spring.rabbitmq.password=xianyu
#\u8bbe\u7f6e\u4ea4\u6362\u5668\u7684\u540d\u79f0
mq.config.exchange=log.direct
#info\u8def\u7531\u952e
mq.config.queue.info.routing.key=log.info.routing.key
#error\u961f\u5217\u540d\u79f0
mq.config.queue.error=log.error
provider配置文件
spring.application.name=springcloud-mq
spring.rabbitmq.host=192.168.194.129
spring.rabbitmq.port=5672
spring.rabbitmq.username=anlan
spring.rabbitmq.password=xianyu
#\u8bbe\u7f6e\u4ea4\u6362\u5668\u7684\u540d\u79f0
mq.config.exchange=log.topic
Fanout 交换器
Consumer 的配置文件
spring.application.name=springcloud-mq
spring.rabbitmq.host=192.168.194.129
spring.rabbitmq.port=5672
spring.rabbitmq.username=anlan
spring.rabbitmq.password=xianyu
#\u8bbe\u7f6e\u4ea4\u6362\u5668\u7684\u540d\u79f0
mq.config.exchange=order.fanout
#\u77ed\u4fe1\u670d\u52a1\u961f\u5217\u540d\u79f0
mq.config.queue.sms=order.sms
#push\u670d\u52a1\u961f\u5217\u540d\u79f0
mq.config.queue.push=order.push
provider配置文件
spring.application.name=springcloud-mq
spring.rabbitmq.host=192.168.194.129
spring.rabbitmq.port=5672
spring.rabbitmq.username=anlan
spring.rabbitmq.password=xianyu
#\u8bbe\u7f6e\u4ea4\u6362\u5668\u7684\u540d\u79f0
mq.config.exchange=order.fanout
网友评论