# springboot-rabbitmq **Repository Path**: jonluo/springboot-rabbitmq ## Basic Information - **Project Name**: springboot-rabbitmq - **Description**: springboot实现rabbitmq的使用 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 1 - **Created**: 2017-10-11 - **Last Updated**: 2021-06-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # springboot-rabbitmq springboot实现rabbitmq的使用 ------- * 首先安装rabbitmq(不会的,自己百度,谷歌) * rabbitmq重点知识点 * Queue 队列:用来储存消息,消费消息 * RoutingKey 路由键:用来通过交换机匹配队列 * Exchange 交换机: * DirectExchange:处理路由键。需要将一个队列绑定到交换机上,要求该消息与一个特定的路由键完全匹配 (没有绑定交换机的队列默认是一种特殊的DirectExchange) * Fanout Exchange:不处理路由键,交换机的消息都会被转发到与该交换机绑定的所有队列上, 转发消息是最快的(类似广播) * Topic Exchange:将路由键和某模式进行匹配,此时队列需要绑定要一个模式上。符号“#”匹配一个或多个词, 符号“\*”匹配一个词,例如:“audit.#”能够匹配到“audit.irs.corporate”,但是“audit.\*” 只会匹配到“audit.irs” * 运行项目 * 单生产者-单消费者:http://localhost:8080/rabbit/oneToOne * 单生产者-多消费者:http://localhost:8080/rabbit/oneToMany * 多生产者-多消费者:http://localhost:8080/rabbit/manyToMany * 实体类传输: http://localhost:8080/rabbit/user * TopicExchange类型: http://localhost:8080/rabbit/topic * FanoutExchange类型: http://localhost:8080/rabbit/fanout