{"id":102034,"date":"2026-09-08T03:42:52","date_gmt":"2026-09-07T19:42:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/102034.html"},"modified":"2026-09-08T03:42:52","modified_gmt":"2026-09-07T19:42:52","slug":"rabbitmq%e5%9c%a8springboot%e4%b8%ad%e7%9a%84%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/102034.html","title":{"rendered":"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528"},"content":{"rendered":"<p>\u4e4b\u524d\u4ecb\u7ecd\u7684RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u4e3b\u8981\u662f\u4f53\u73b0\u5176\u601d\u60f3,\u4e0b\u9762\u662f\u57fa\u4e8eSpringBoot\u6765\u9488\u5bf9RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u7684\u5f00\u53d1.<\/p>\n<h2>\u5de5\u4f5c\u6a21\u5f0f(work)<\/h2>\n<h3>\u4e00.\u5f15\u5165\u4f9d\u8d56<\/h3>\n<p>\u53ef\u4ee5\u901a\u8fc7Spring\u9879\u76ee\u521b\u5efa\u65f6\u76f4\u63a5\u52fe\u9009Spring for RabbitMQ,\u4e5f\u53ef\u4ee5\u624b\u52a8\u53bb\u4e2d\u592e\u4ed3\u5e93\u4e2d\u4e0b\u8f7d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1002\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907194250-6a9f13babbb67.png\" width=\"1472\" \/><\/p>\n<h3>\u4e8c.\u6dfb\u52a0\u914d\u7f6e<\/h3>\n<p>spring:<br \/>\n rabbitmq:<br \/>\n host: 110.41.51.65 RabbitMQ\u670d\u52a1\u5668\u6240\u5728\u7684\u670d\u52a1\u5668IP<br \/>\n port: 15673 #\u9ed8\u8ba4<br \/>\n username: admin<br \/>\n password: admin<br \/>\n virtual-host: zwl #\u9ed8\u8ba4\u503c\u4e3a\/<\/p>\n<h3>\u4e09.\u751f\u4ea7\u8005\u4ee3\u7801<\/h3>\n<h4>1.\u58f0\u660e\u961f\u5217<\/h4>\n<p>&#064;Configuration<br \/>\npublic class RabbitMQConfig {<br \/>\n    &#064;Bean(&#034;workQueue&#034;)<br \/>\n    public static Queue workQueue(){<br \/>\n        return QueueBuilder.durable(Constants.work_queue).build();<br \/>\n        \/\/\u58f0\u660e\u961f\u5217\u7684\u540d\u5b57\u72b6\u6001<br \/>\n    }<br \/>\n    }<\/p>\n<h4>2.\u58f0\u660e\u4ea4\u6362\u673a<\/h4>\n<p>\u6b64\u5904\u4f7f\u7528\u7684\u662f\u9ed8\u8ba4\u7684\u4ea4\u6362\u673a,\u6240\u4ee5\u4ea4\u6362\u673a\u540d\u79f0\u4e3a\u7a7a,rountingkey\u548c\u961f\u5217\u540c\u540d.<\/p>\n<h4>3.\u53d1\u9001\u6d88\u606f<\/h4>\n<p>\u53d1\u9001\u6d88\u606f\u9700\u8981\u4f7f\u7528RabbitTemplate\u8fd9\u4e2a\u5bf9\u8c61,\u5b83\u53ef\u4ee5\u76f4\u63a5\u6ce8\u5165\u4f7f\u7528.<\/p>\n<p>&#064;RequestMapping(&#034;\/request&#034;)<br \/>\n&#064;RestController<br \/>\npublic class ProducerController {<br \/>\n    &#064;Autowired<br \/>\n    public RabbitTemplate rabbitTemplate;<\/p>\n<p>    &#064;RequestMapping(&#034;\/work&#034;)<br \/>\n    public String ha(){<br \/>\n        rabbitTemplate.convertAndSend(&#034;&#034;, Constants.work_queue,&#034;\u6211\u662f\u6d88\u606f&#034;);<br \/>\n        return &#034;\u53d1\u9001\u6210\u529f&#034;;<br \/>\n    }<br \/>\n}<\/p>\n<h4>4.\u89c2\u5bdf\u7ed3\u679c<\/h4>\n<p>\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee\u5b8c\u540e,\u5c31\u53ef\u4ee5\u901a\u8fc7RabbitMQ\u53ef\u89c6\u5316\u754c\u9762\u8fdb\u884c\u89c2\u5bdf.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"640\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907194251-6a9f13bb31110.png\" width=\"1986\" \/><\/p>\n<h4>\u56db.\u6d88\u8d39\u8005\u4ee3\u7801<\/h4>\n<p>\u6d88\u8d39\u8005\u9700\u8981\u77e5\u9053RabbitListener\u8fd9\u4e2a\u76d1\u542c\u7c7b,\u6b64\u7c7b\u53ef\u4ee5\u76d1\u542c\u6307\u5b9a\u7684\u961f\u5217,\u4ece\u91cc\u9762\u62ff\u6d88\u606f.<\/p>\n<p>\u4f7f\u7528\u65f6RabbitListener\u65f6\u4f1a\u7acb\u523b\u6d88\u8d39\u6d88\u606f.<\/p>\n<p>&#064;Component<br \/>\npublic class FanoutListener {<br \/>\n    &#064;RabbitListener(queues &#061; Constants.fanout_queue1)<br \/>\n    \/\/\u6b64\u5904\u7684\u5f62\u53c2\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u4e3aMessage\u7c7b,\u63a5\u53d7\u5230\u7684\u5c31\u662f\u66f4\u52a0\u8be6\u7ec6\u7684\u6d88\u606f<br \/>\n    public void queueListener1(String message){<br \/>\n        System.out.println(&#034;\u63a5\u6536\u5230\u6d88\u606f::::::::::&#034;&#043;message);<br \/>\n    }<br \/>\n}<\/p>\n<h2>\u53d1\u5e03\u8ba2\u9605\u6a21\u5f0f(publish)<\/h2>\n<p>\u524d\u4e24\u6b65\u548c\u4e0a\u9762\u7684work\u4e00\u6837,\u53d1\u5e03\u8ba2\u9605\u6a21\u5f0f\u6709\u4e09\u79cd\u4e0d\u540c\u72b6\u6001\u7684\u4ea4\u6362\u673a,\u8fd9\u91cc\u6f14\u793a\u5176\u4e2d\u7684\u4e24\u79cd.<\/p>\n<h3>\u751f\u4ea7\u8005\u4ee3\u7801(fanout)<\/h3>\n<h4>1.\u58f0\u660e\u961f\u5217\u548c\u4ea4\u6362\u673a<\/h4>\n<p>&#064;Bean(&#034;fanoutQueue1&#034;)<br \/>\n    public static Queue fanoutQueue1(){<br \/>\n        return QueueBuilder.durable(Constants.fanout_queue1).build();<br \/>\n    }<\/p>\n<p>    &#064;Bean(&#034;fanoutQueue2&#034;)<br \/>\n    public static Queue fanoutQueue2(){<br \/>\n        return QueueBuilder.durable(Constants.fanout_queue2).build();<br \/>\n    }<\/p>\n<p>    &#064;Bean(&#034;fanoutExchange&#034;)<br \/>\n    public static FanoutExchange fanoutExchange(){<br \/>\n        return ExchangeBuilder.fanoutExchange(Constants.fanout_exchange).durable(true).build();<br \/>\n    }<\/p>\n<h4>2.\u5efa\u7acb\u8fde\u63a5<\/h4>\n<p>\u53d1\u5e03\u8ba2\u9605\u6a21\u5f0f\u9700\u8981\u5c06\u961f\u5217\u548c\u4ea4\u6362\u673a\u4e4b\u95f4\u5efa\u7acb\u8fde\u63a5,\u56e0\u4e3a\u662ffanout(\u5e7f\u64ad)\u6a21\u5f0f,\u6d88\u606f\u4f1a\u53d1\u7ed9\u548c\u4ea4\u6362\u673a\u7ed1\u5b9a\u6240\u6709\u7684\u961f\u5217.<\/p>\n<p> \/\/\u5efa\u7acb\u8fde\u63a5<br \/>\n    &#064;Bean(&#034;fanoutBinding1&#034;)\/\/\u5f62\u53c2\u4e2d\u9700\u8981\u58f0\u660e\u4ea4\u6362\u673a\u7684\u7c7b\u578b,\u52a0Qualifier\u6ce8\u89e3\u662f\u4e3a\u4e86\u8ba9Spring\u901a\u8fc7Bean\u7684\u540d\u79f0\u5bfb\u627eBean<br \/>\n    public Binding fanoutBinding1(&#064;Qualifier(&#034;fanoutExchange&#034;) FanoutExchange fanoutExchange,&#064;Qualifier(&#034;fanoutQueue1&#034;) Queue queue){<br \/>\n        return BindingBuilder.bind(queue).to(fanoutExchange);<br \/>\n    }<\/p>\n<p>    &#064;Bean(&#034;fanoutBinding2&#034;)<br \/>\n    public Binding fanoutBinding2(&#064;Qualifier(&#034;fanoutExchange&#034;) FanoutExchange fanoutExchange,&#064;Qualifier(&#034;fanoutQueue2&#034;) Queue queue){<br \/>\n        return BindingBuilder.bind(queue).to(fanoutExchange);<br \/>\n    }<\/p>\n<h4>3.\u53d1\u9001\u6d88\u606f<\/h4>\n<p> &#064;RequestMapping(&#034;\/fanout&#034;)<br \/>\n    public String ha1(){<br \/>\n\/\/\u4e09\u4e2a\u53c2\u6570\u662f\u4ea4\u6362\u673a\u540d\u79f0,Rountingkey,\u6d88\u606f\u6b63\u6587<br \/>\n        rabbitTemplate.convertAndSend(Constants.fanout_exchange, &#034;&#034;,&#034;\u6211\u662f\u6d88\u606f112121212&#034;);<\/p>\n<p>        return &#034;\u53d1\u9001\u6210\u529f&#034;;<br \/>\n    }<\/p>\n<h4>\u56db.\u6d88\u8d39\u8005\u4ee3\u7801<\/h4>\n<p>\u76d1\u542c\u4e24\u4e2a\u961f\u5217\u8fdb\u884c\u6d88\u8d39.<\/p>\n<p>&#064;Component<br \/>\npublic class FanoutListener {<br \/>\n    &#064;RabbitListener(queues &#061; Constants.fanout_queue1)<br \/>\n    public void queueListener1(String message){<br \/>\n        System.out.println(&#034;\u63a5\u6536\u5230\u6d88\u606f::::::::::&#034;&#043;message);<br \/>\n    }<br \/>\n    &#064;RabbitListener(queues &#061; Constants.fanout_queue2)<br \/>\n    public void queueListener2(String message){<br \/>\n        System.out.println(&#034;\u63a5\u6536\u5230\u6d88\u606f????????????????????&#034;&#043;message);<br \/>\n    }<\/p>\n<p>}<\/p>\n<h3>\u751f\u4ea7\u8005\u4ee3\u7801(Direct)<\/h3>\n<h4>1.\u58f0\u660e\u4ea4\u6362\u673a\u548c\u961f\u5217<\/h4>\n<p>&#064;Bean(&#034;directQueue1&#034;)<br \/>\n    public static Queue directQueue1(){<br \/>\n        return QueueBuilder.durable(Constants.direct_queue1).build();<br \/>\n    }<\/p>\n<p>    &#064;Bean(&#034;directQueue2&#034;)<br \/>\n    public static Queue directQueue2(){<br \/>\n        return QueueBuilder.durable(Constants.direct_queue2).build();<br \/>\n    }<br \/>\n    &#064;Bean(&#034;directExchange&#034;)<br \/>\n    public static DirectExchange directExchange(){<br \/>\n        return ExchangeBuilder.directExchange(Constants.direct_exchange).durable(true).build();<br \/>\n    }<\/p>\n<h4>2.\u5efa\u7acb\u8fde\u63a5<\/h4>\n<p>\u5efa\u7acb\u8fde\u63a5\u65f6\u9700\u8981\u6307\u5b9a\u8fde\u63a5\u7684\u65b9\u5f0f,\u8fd9\u91cc\u4f7f\u7528\u8fd9\u6837\u7684\u8fde\u63a5\u65b9\u5f0f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"434\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907194251-6a9f13bb98185.png\" width=\"1644\" \/><\/p>\n<p> &#064;Bean(&#034;directBinding1&#034;)<br \/>\n    public Binding directBinding1(&#064;Qualifier(&#034;directExchange&#034;) DirectExchange directExchange,&#064;Qualifier(&#034;directQueue1&#034;) Queue queue){<br \/>\n        return BindingBuilder.bind(queue).to(directExchange).with(&#034;orange&#034;);<br \/>\n    }<\/p>\n<p>    &#064;Bean(&#034;directBinding2&#034;)<br \/>\n    public Binding directBinding2(&#064;Qualifier(&#034;directExchange&#034;) DirectExchange directExchange,&#064;Qualifier(&#034;directQueue2&#034;) Queue queue){<br \/>\n        return BindingBuilder.bind(queue).to(directExchange).with(&#034;black&#034;);<br \/>\n    }<br \/>\n    &#064;Bean(&#034;directBinding3&#034;)<br \/>\n    public Binding directBinding3(&#064;Qualifier(&#034;directExchange&#034;) DirectExchange directExchange,&#064;Qualifier(&#034;directQueue2&#034;) Queue queue){<br \/>\n        return BindingBuilder.bind(queue).to(directExchange).with(&#034;orange&#034;);<br \/>\n    }<\/p>\n<h4>3.\u53d1\u9001\u6d88\u606f<\/h4>\n<p>&#064;RequestMapping(&#034;\/direct\/{ha}&#034;)<br \/>\n    public String directProduct(&#064;PathVariable(&#034;ha&#034;) String routingKey){<br \/>\n        \/\/routingKey\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012<br \/>\n        rabbitTemplate.convertAndSend(Constants.direct_exchange,<br \/>\n                routingKey,&#034;hello spring boot: direct &#034;&#043;routingKey);<br \/>\n        System.out.println(&#034;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#043;&#034;);<br \/>\n        return &#034;\u53d1\u9001\u6210\u529f&#034;;<br \/>\n    }<\/p>\n<h3>\u6d88\u8d39\u8005\u4ee3\u7801<\/h3>\n<p>&#064;RabbitListener(queues &#061; Constants.direct_queue1)<br \/>\n    public void queueListener1(String message){<br \/>\n        System.out.println(&#034;\u63a5\u6536\u5230\u6d88\u606f\u961f\u52171::::::::::&#034;&#043;message);<br \/>\n    }<br \/>\n    &#064;RabbitListener(queues &#061; Constants.direct_queue2)<br \/>\n    public void queueListener2(String message){<br \/>\n        System.out.println(&#034;\u63a5\u6536\u5230\u6d88\u606f\u961f\u52172????????????????????&#034;&#043;message);<br \/>\n    }<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u4ecb\u7ecd\u7684RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u4e3b\u8981\u662f\u4f53\u73b0\u5176\u601d\u60f3,\u4e0b\u9762\u662f\u57fa\u4e8eSpringBoot\u6765\u9488\u5bf9RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u7684\u5f00\u53d1.\u5de5\u4f5c\u6a21\u5f0f(work)\u4e00.\u5f15\u5165\u4f9d\u8d56\u53ef\u4ee5\u901a\u8fc7Spring\u9879\u76ee\u521b\u5efa\u65f6\u76f4\u63a5\u52fe\u9009Spring for RabbitMQ,\u4e5f\u53ef\u4ee5\u624b\u52a8\u53bb\u4e2d\u592e\u4ed3\u5e93\u4e2d\u4e0b\u8f7d.\u4e8c.\u6dfb\u52a0\u914d\u7f6espring:rabbitmq:host: 110.41.51.65 RabbitMQ\u670d\u52a1\u5668\u6240\u5728\u7684\u670d\u52a1\u5668IPport: 15673 #\u9ed8\u8ba4username: adminpassword: admin<\/p>\n","protected":false},"author":2,"featured_media":102031,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3303,663,98],"topic":[],"class_list":["post-102034","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java-rabbitmq","tag-rabbitmq","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/102034.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e4b\u524d\u4ecb\u7ecd\u7684RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u4e3b\u8981\u662f\u4f53\u73b0\u5176\u601d\u60f3,\u4e0b\u9762\u662f\u57fa\u4e8eSpringBoot\u6765\u9488\u5bf9RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u7684\u5f00\u53d1.\u5de5\u4f5c\u6a21\u5f0f(work)\u4e00.\u5f15\u5165\u4f9d\u8d56\u53ef\u4ee5\u901a\u8fc7Spring\u9879\u76ee\u521b\u5efa\u65f6\u76f4\u63a5\u52fe\u9009Spring for RabbitMQ,\u4e5f\u53ef\u4ee5\u624b\u52a8\u53bb\u4e2d\u592e\u4ed3\u5e93\u4e2d\u4e0b\u8f7d.\u4e8c.\u6dfb\u52a0\u914d\u7f6espring:rabbitmq:host: 110.41.51.65 RabbitMQ\u670d\u52a1\u5668\u6240\u5728\u7684\u670d\u52a1\u5668IPport: 15673 #\u9ed8\u8ba4username: adminpassword: admin\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/102034.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-07T19:42:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907194250-6a9f13babbb67.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/102034.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/102034.html\",\"name\":\"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-07T19:42:52+00:00\",\"dateModified\":\"2026-09-07T19:42:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/102034.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/102034.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/102034.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/102034.html","og_locale":"zh_CN","og_type":"article","og_title":"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e4b\u524d\u4ecb\u7ecd\u7684RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u4e3b\u8981\u662f\u4f53\u73b0\u5176\u601d\u60f3,\u4e0b\u9762\u662f\u57fa\u4e8eSpringBoot\u6765\u9488\u5bf9RabbitMQ\u7684\u51e0\u79cd\u5de5\u4f5c\u6a21\u5f0f\u7684\u5f00\u53d1.\u5de5\u4f5c\u6a21\u5f0f(work)\u4e00.\u5f15\u5165\u4f9d\u8d56\u53ef\u4ee5\u901a\u8fc7Spring\u9879\u76ee\u521b\u5efa\u65f6\u76f4\u63a5\u52fe\u9009Spring for RabbitMQ,\u4e5f\u53ef\u4ee5\u624b\u52a8\u53bb\u4e2d\u592e\u4ed3\u5e93\u4e2d\u4e0b\u8f7d.\u4e8c.\u6dfb\u52a0\u914d\u7f6espring:rabbitmq:host: 110.41.51.65 RabbitMQ\u670d\u52a1\u5668\u6240\u5728\u7684\u670d\u52a1\u5668IPport: 15673 #\u9ed8\u8ba4username: adminpassword: admin","og_url":"https:\/\/www.wsisp.com\/helps\/102034.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-07T19:42:52+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907194250-6a9f13babbb67.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/102034.html","url":"https:\/\/www.wsisp.com\/helps\/102034.html","name":"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-07T19:42:52+00:00","dateModified":"2026-09-07T19:42:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/102034.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/102034.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/102034.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"RabbitMQ\u5728SpringBoot\u4e2d\u7684\u5e94\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/102034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=102034"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/102034\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/102031"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=102034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=102034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=102034"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=102034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}