{"id":4238,"date":"2024-04-20T14:16:42","date_gmt":"2024-04-20T06:16:42","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-boot%e6%95%b4%e5%90%88rabbitmq\/"},"modified":"2024-04-20T14:16:42","modified_gmt":"2024-04-20T06:16:42","slug":"spring-boot%e6%95%b4%e5%90%88rabbitmq","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-boot%e6%95%b4%e5%90%88rabbitmq\/","title":{"rendered":"Spring Boot\u6574\u5408RabbitMQ"},"content":{"rendered":"<div class='wxsyncmain'>\n<h1 cid=\"n0\" mdtype=\"heading\" style=\"margin-top: 1rem;margin-bottom: 1rem;padding-bottom: 0.3em;outline: 0px;font-weight: bold;letter-spacing: 0.544px;white-space: pre-wrap;color: rgb(34, 34, 34);background-color: rgb(255, 255, 255);line-height: 1.2;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);width: inherit;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start;visibility: visible;\"><span style=\"outline: 0px;color: rgb(178, 178, 178);visibility: visible;\">\u5982\u679c\u6587\u7ae0\u4e2d\u4ee3\u7801\u4e0d\u4fbf\u4e8e\u9605\u8bfb\uff0c\u8bf7\u4f7f\u7528\u7535\u8111\u67e5\u770b\u6216\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u3002\u6e90\u7801\u8be6\u89c1\uff1a<\/span><\/h1>\n<p style=\"outline: 0px;font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-wrap: wrap;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"outline: 0px;color: rgb(178, 178, 178);visibility: visible;\"><span style=\"outline: 0px;font-weight: 700;color: rgb(77, 77, 77);font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif;font-size: 16px;font-variant-ligatures: no-common-ligatures;letter-spacing: normal;text-align: start;visibility: visible;\">GitHub\uff1ahttps:\/\/github.com\/dkbnull\/SpringBootDemo<\/span><span style=\"outline: 0px;font-weight: 700;color: rgb(77, 77, 77);font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif;font-size: 16px;font-variant-ligatures: no-common-ligatures;letter-spacing: normal;text-align: start;visibility: visible;\">Gitee\uff1ahttps:\/\/gitee.com\/dkbnull\/SpringBootDemo<\/span><\/span><\/p>\n<h1 cid=\"n0\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">0 \u5f00\u53d1\u73af\u5883<\/span><\/h1>\n<ul class=\"list-paddingleft-1\" cid=\"n2\" mdtype=\"list\" data-mark=\"-\" style=\"margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\">\n<li>\n<p cid=\"n4\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">JDK\uff1a1.8<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n6\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">Spring Boot\uff1a2.7.18<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n8\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">RabbitMQ\uff1a3.13.1<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n10\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">Erlang\uff1a26.2.4<\/span><\/p>\n<\/li>\n<\/ul>\n<h1 cid=\"n11\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1 \u5b89\u88c5RabbitMQ<\/span><\/h1>\n<h2 cid=\"n12\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1.1 \u5b89\u88c5RabbitMQ<\/span><\/h2>\n<p cid=\"n13\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e0b\u8f7d\u5730\u5740\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/www.rabbitmq.com\/docs\/download<\/span><\/span><\/p>\n<p cid=\"n14\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">Windows\u4e0b\u8f7d\u5730\u5740\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/github.com\/rabbitmq\/rabbitmq-server\/releases\/download\/v3.13.1\/rabbitmq-server-3.13.1.exe<\/span><\/span><\/p>\n<p cid=\"n15\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u56e0\u4e3aRabbitMQ\u4f9d\u8d56Erlang\uff0c\u6240\u4ee5\u4e0b\u8f7d\u5b8c\u6210\u540e\u5148\u4e0d\u8981\u5b89\u88c5\uff0c\u5148\u5728 <\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/www.rabbitmq.com\/docs\/which-erlang<\/span><\/span><span md-inline=\"plain\"> \u67e5\u770b\u6240\u9700\u7684Erlang\u7248\u672c\uff0c\u4e0b\u8f7d\u5bf9\u5e94Erlang\u5b89\u88c5\u5305<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000623\" data-ratio=\"0.5805555555555556\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1080\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151830966.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000623\" data-ratio=\"0.5805555555555556\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1080\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151830966.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n17\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1.2 \u5b89\u88c5Erlang<\/span><\/h2>\n<p cid=\"n18\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">Erlang\u4e0b\u8f7d\u5730\u5740\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/www.erlang.org\/downloads<\/span><\/span><\/p>\n<p cid=\"n19\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4f9d\u6b21\u5b89\u88c5Erlang\u3001RabbitMQ<\/span><\/p>\n<p cid=\"n20\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8ba1\u7b97\u673a\u670d\u52a1\u4e2d\u4f1a\u51fa\u73b0RabbitMQ\u670d\u52a1\uff0c\u76f4\u63a5\u53f3\u952e\u542f\u52a8\u5373\u53ef\u3002<\/span><\/p>\n<p cid=\"n21\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e5f\u53ef\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\u627e\u5230<\/span><span md-inline=\"strong\"><strong>RabbitMQ Server\u76ee\u5f55<\/strong><\/span><span md-inline=\"plain\">\uff0c\u70b9\u51fb<\/span><span md-inline=\"strong\"><strong>RabbitMQ Service - start<\/strong><\/span><span md-inline=\"plain\">\u542f\u52a8<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000624\" data-ratio=\"0.715\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1000\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151834355.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000624\" data-ratio=\"0.715\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1000\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151834355.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n23\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1.3 \u542f\u7528RabbitMQ\u7ba1\u7406\u754c\u9762<\/span><\/h2>\n<p cid=\"n24\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cRabbitMQ\u6ca1\u6709\u542f\u7528web\u7aef\u5ba2\u6237\u7aef\u63d2\u4ef6\uff0c\u9700\u8981\u542f\u7528\u624d\u53ef\u4ee5\u751f\u6548<\/span><\/p>\n<p cid=\"n25\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u53c2\u8003\u6587\u6863\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/www.rabbitmq.com\/docs\/management<\/span><\/span><\/p>\n<p cid=\"n26\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fdb\u5165\u5230RabbitMQ\u5b89\u88c5\u76ee\u5f55\u4e0b <\/span><span md-inline=\"strong\"><strong>RabbitMQ Serverrabbitmq_server-3.13.1sbin<\/strong><\/span><span md-inline=\"plain\"> \u6267\u884c\u547d\u4ee4<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"bat\" cid=\"n27\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">rabbitmq-plugins enable rabbitmq_management<\/span><\/pre>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000626\" data-ratio=\"0.3296296296296296\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1080\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151838382.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000626\" data-ratio=\"0.3296296296296296\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1080\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151838382.png\"  \/><\/noscript><\/p>\n<p cid=\"n29\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5b89\u88c5\u6210\u529f\uff0c<\/span><span md-inline=\"strong\"><strong>\u91cd\u542fRabbitMQ\u670d\u52a1<\/strong><\/span><span md-inline=\"plain\">\uff0c\u6d4f\u89c8\u5668\u8bbf\u95ee <\/span><span md-inline=\"strong\"><strong>127.0.0.1:15672<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000627\" data-ratio=\"0.45719489981785066\" data-s=\"300,640\"  data-type=\"png\" data-w=\"549\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151841992.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000627\" data-ratio=\"0.45719489981785066\" data-s=\"300,640\"  data-type=\"png\" data-w=\"549\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151841992.png\"  \/><\/noscript><\/p>\n<p cid=\"n31\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u9ed8\u8ba4\u8d26\u53f7\u5bc6\u7801\u90fd\u662f<\/span><span md-inline=\"strong\"><strong>guest<\/strong><\/span><span md-inline=\"plain\">\uff0c\u767b\u5f55\u6210\u529f\u540e\u754c\u9762\u5982\u4e0b<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000625\" data-ratio=\"0.7967914438502673\" data-s=\"300,640\"  data-type=\"png\" data-w=\"935\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151843816.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000625\" data-ratio=\"0.7967914438502673\" data-s=\"300,640\"  data-type=\"png\" data-w=\"935\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151843816.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n33\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2 \u5e7f\u64ad\u6a21\u5f0fFanout<\/span><\/h1>\n<p cid=\"n34\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">Fanout\uff0c\u53d1\u5e03\u8ba2\u9605\u6a21\u5f0f\uff0c\u662f\u4e00\u79cd\u5e7f\u64ad\u673a\u5236\uff0c\u662f\u6ca1\u6709\u8def\u7531key\u7684\u6a21\u5f0f\u3002<\/span><\/p>\n<h2 cid=\"n35\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1 \u65b0\u5efa\u751f\u4ea7\u8005<\/span><\/h2>\n<p cid=\"n36\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u65b0\u5efamodule <\/span><span md-inline=\"strong\"><strong>spring-boot-rabbitmq-producer<\/strong><\/span><\/p>\n<h3 cid=\"n37\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1.1 \u5f15\u5165\u4f9d\u8d56<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"xml\" cid=\"n38\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>org.springframework.boot<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>spring-boot-starter-amqp<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><\/pre>\n<h3 cid=\"n39\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1.2 \u914d\u7f6eRabbitMQ<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"yml\" cid=\"n40\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">server<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">8090<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">#<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">#\u914d\u7f6eRabbitMQ\u670d\u52a1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">spring<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  rabbitmq<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   username<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>guest<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   password<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>guest<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   virtual-host<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>\/<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   host<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">127.0.0.1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">5672<\/span><\/span><\/pre>\n<h3 cid=\"n41\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1.3 \u65b0\u5efa\u914d\u7f6e\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n42\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Configuration<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">RabbitMqFanoutConfig<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* Fanout \u4ea4\u6362\u673a<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">FanoutExchange<\/span> <span style=\"color: rgb(0, 0, 0);\">fanoutExchange<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">FanoutExchange<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"fanout_user_exchange\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>, <span style=\"color: rgb(34, 17, 153);\">false<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53d1\u9001\u77ed\u4fe1\u961f\u5217<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 0);\">smsQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/durable    \u662f\u5426\u6301\u4e45\u5316\uff0c\u9ed8\u8ba4\u4e3afalse<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/exclusive   \u662f\u5426\u53ea\u80fd\u88ab\u5f53\u524d\u521b\u5efa\u7684\u8fde\u63a5\u4f7f\u7528\uff0c\u9ed8\u8ba4\u4e3afalse<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/autoDelete   \u662f\u5426\u81ea\u52a8\u5220\u9664\uff0c\u9ed8\u8ba4\u4e3afalse<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u4e00\u822c\u8bbe\u7f6e\u961f\u5217\u7684\u6301\u4e45\u5316\uff0c\u5176\u4f59\u4e24\u4e2a\u9ed8\u8ba4false<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"sms.fanout.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53d1\u9001\u90ae\u4ef6\u961f\u5217<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 0);\">emailQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"email.fanout.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53d1\u9001\u5fae\u4fe1\u961f\u5217<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 0);\">wechatQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"wechat.fanout.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u5c06\u961f\u5217\u548c\u4ea4\u6362\u673a\u7ed1\u5b9a<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 0);\">smsBindingFanout<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">smsQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">fanoutExchange<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 0);\">emailBindingFanout<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">emailQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">fanoutExchange<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 0);\">wechatBindingFanout<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">wechatQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">fanoutExchange<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n43\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1.4 \u65b0\u5efa\u751f\u4ea7\u8005\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n44\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">UserService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">RabbitTemplate<\/span> <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">register<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>, <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">password<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6a21\u62df\u7528\u6237\u6ce8\u518c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">UUID<\/span>.<span style=\"color: rgb(0, 0, 0);\">randomUUID<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/saveUser(user);<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u7528\u6237\u4fe1\u606f\u7ed9RabbitMQ fanout<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">convertAndSend<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"fanout_user_exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n45\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.1.5 \u65b0\u5efa\u6d4b\u8bd5\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n46\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">RabbitMqProducerApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">RabbitMqProducerApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">UserService<\/span> <span style=\"color: rgb(0, 0, 0);\">userService<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoads<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">userService<\/span>.<span style=\"color: rgb(0, 0, 0);\">register<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e09\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"zhangsan\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n47\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u6d4b\u8bd5\u7c7b\uff0c\u6267\u884c\u6210\u529f\uff0c\u67e5\u770bRabbitMQ Web\u9875\u9762\uff0c\u6210\u529f\u7ed1\u5b9a\uff0c\u4e14\u5404\u5b58\u5728\u4e00\u6761\u6d88\u606f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000628\" data-ratio=\"0.5742471443406023\" data-s=\"300,640\"  data-type=\"png\" data-w=\"963\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151846217.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000628\" data-ratio=\"0.5742471443406023\" data-s=\"300,640\"  data-type=\"png\" data-w=\"963\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151846217.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n49\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2 \u65b0\u5efa\u6d88\u8d39\u8005<\/span><\/h2>\n<p cid=\"n50\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u65b0\u5efamodule <\/span><span md-inline=\"strong\"><strong>spring-boot-rabbitmq-consumer<\/strong><\/span><\/p>\n<h3 cid=\"n51\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2.1 \u5f15\u5165\u4f9d\u8d56<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"xml\" cid=\"n52\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>org.springframework.boot<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>spring-boot-starter-amqp<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><\/pre>\n<h3 cid=\"n53\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2.2 \u914d\u7f6eRabbitMQ<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"yml\" cid=\"n54\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">server<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">8090<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">#<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">#\u914d\u7f6eRabbitMQ\u670d\u52a1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">spring<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  rabbitmq<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   username<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>guest<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   password<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>guest<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   virtual-host<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>\/<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   host<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">127.0.0.1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">5672<\/span><\/span><\/pre>\n<h3 cid=\"n55\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2.3 \u65b0\u5efa\u77ed\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n56\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"sms.fanout.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">FanoutSmsService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u77ed\u4fe1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"sms.fanout\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n57\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2.4 \u65b0\u5efa\u90ae\u4ef6\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n58\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"email.fanout.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">FanoutEmailService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u90ae\u4ef6<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"email.fanout\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n59\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.2.5 \u65b0\u5efa\u5fae\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n60\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"wechat.fanout.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">FanoutWechatService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u63a8\u9001\u5fae\u4fe1\u6d88\u606f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"wechat.fanout\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n61\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2.3 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n62\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u65b0\u5efa\u542f\u52a8\u7c7b\uff0c\u542f\u52a8\u670d\u52a1\uff0c\u63a7\u5236\u53f0\u8f93\u51fa\u5982\u4e0b\uff0c\u6d88\u8d39\u8005\u6210\u529f\u63a5\u6536\u5230\u6d88\u606f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000631\" data-ratio=\"0.3222811671087533\" data-s=\"300,640\"  data-type=\"png\" data-w=\"754\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151848165.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000631\" data-ratio=\"0.3222811671087533\" data-s=\"300,640\"  data-type=\"png\" data-w=\"754\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151848165.png\"  \/><\/noscript><\/p>\n<p cid=\"n64\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">RabitMQ\u4e2d\u6d88\u606f\u4e3a0<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000629\" data-ratio=\"0.4258064516129032\" data-s=\"300,640\"  data-type=\"png\" data-w=\"930\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151850928.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000629\" data-ratio=\"0.4258064516129032\" data-s=\"300,640\"  data-type=\"png\" data-w=\"930\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151850928.png\"  \/><\/noscript><\/p>\n<p cid=\"n66\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u518d\u6b21\u6267\u884c\u751f\u4ea7\u8005\u6d4b\u8bd5\u7c7b\u53d1\u9001\u65b0\u7684\u6d88\u606f\uff0c\u6d88\u8d39\u8005\u6210\u529f\u63a5\u6536\u5e76\u6253\u5370<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000630\" data-ratio=\"0.44462540716612375\" data-s=\"300,640\"  data-type=\"png\" data-w=\"614\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151853301.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000630\" data-ratio=\"0.44462540716612375\" data-s=\"300,640\"  data-type=\"png\" data-w=\"614\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151853301.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n68\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3 \u8def\u7531\u6a21\u5f0fDirect<\/span><\/h1>\n<p cid=\"n69\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6709routing-key\u7684\u5339\u914d\u6a21\u5f0f\uff0cDirect\u6a21\u5f0f\u662fFanout\u6a21\u5f0f\u4e0a\u7684\u4e00\u79cd\u53e0\u52a0\uff0c\u589e\u52a0\u4e86\u8def\u7531RoutingKey\u7684\u6a21\u5f0f\u3002<\/span><\/p>\n<h2 cid=\"n70\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1 \u6d88\u8d39\u8005<\/span><\/h2>\n<h3 cid=\"n71\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1.1 \u65b0\u5efa\u77ed\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<p cid=\"n72\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fd9\u91cc\uff0c\u6211\u4eec\u4e0d\u5728\u751f\u4ea7\u8005\u4e2d\u4f7f\u7528\u914d\u7f6e\u7c7b\u6765\u7ed1\u5b9a\u4ea4\u6362\u673a\u548c\u961f\u5217\u4e86\uff0c\u76f4\u63a5\u5728\u6d88\u8d39\u8005\u4e2d\u4f7f\u7528\u6ce8\u89e3\u6765\u7ed1\u5b9a<\/span><\/p>\n<p cid=\"n73\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4f7f\u7528 <\/span><span md-inline=\"strong\"><strong>@RabbitListener(bindings = @QueueBinding())<\/strong><\/span><span md-inline=\"plain\"> \u6ce8\u89e3\u6765\u7ed1\u5b9a\u4ea4\u6362\u673a\u548c\u961f\u5217<\/span><\/p>\n<ul class=\"list-paddingleft-1\" cid=\"n74\" mdtype=\"list\" data-mark=\"*\" style=\"margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\">\n<li>\n<p cid=\"n76\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">bindings \u7528\u6765\u786e\u5b9a\u961f\u5217\u548c\u4ea4\u6362\u673a\u7684\u7ed1\u5b9a\u5173\u7cfb<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n78\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">value  \u961f\u5217\u540d\u79f0\uff0c\u4e0e\u751f\u4ea7\u8005\u5bf9\u5e94<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n80\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">exchange \u4ea4\u6362\u673a\u540d\u79f0\uff0c\u4e0e\u751f\u4ea7\u8005\u5bf9\u5e94\uff1btype\u8bbe\u7f6eRabbitMQ\u6a21\u5f0f\uff0c\u9ed8\u8ba4\u4e3adirect<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n82\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">key   \u8def\u7531key<\/span><\/p>\n<\/li>\n<\/ul>\n<p cid=\"n83\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4f46\u6709\u4e9b\u9ad8\u7ea7\u7528\u6cd5\uff0c\u8fd8\u662f\u63a8\u8350\u4f7f\u7528\u914d\u7f6e\u7c7b<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n84\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">bindings<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@QueueBinding<\/span>(<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@Queue<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"sms.direct.queue\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">durable<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"true\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">autoDelete<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"false\"<\/span>),<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">exchange<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@Exchange<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"direct_user_exchange\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">type<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ExchangeTypes<\/span>.<span style=\"color: rgb(0, 0, 0);\">DIRECT<\/span>),<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">key<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"sms\"<\/span>))<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">DirectSmsService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u77ed\u4fe1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"sms.direct\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n85\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1.2 \u65b0\u5efa\u90ae\u4ef6\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n86\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">bindings<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@QueueBinding<\/span>(<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@Queue<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"email.direct.queue\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">durable<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"true\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">autoDelete<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"false\"<\/span>),<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">exchange<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@Exchange<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"direct_user_exchange\"<\/span>),<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">key<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"email\"<\/span>))<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">DirectEmailService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u90ae\u4ef6<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"email.direct\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n87\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.1.3 \u65b0\u5efa\u5fae\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n88\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">bindings<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@QueueBinding<\/span>(<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@Queue<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"wechat.direct.queue\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">durable<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"true\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">autoDelete<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"false\"<\/span>),<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">exchange<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(85, 85, 85);\">@Exchange<\/span>(<span style=\"color: rgb(0, 0, 0);\">value<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"direct_user_exchange\"<\/span>),<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">key<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"wechat\"<\/span>))<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">DirectWechatService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u63a8\u9001\u5fae\u4fe1\u6d88\u606f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"wechat.direct\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n89\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.2 \u751f\u4ea7\u8005<\/span><\/h2>\n<h3 cid=\"n90\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.2.1 \u8c03\u6574\u670d\u52a1\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n91\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">UserService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">RabbitTemplate<\/span> <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">registerDirect<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>, <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">password<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6a21\u62df\u7528\u6237\u6ce8\u518c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">UUID<\/span>.<span style=\"color: rgb(0, 0, 0);\">randomUUID<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/saveUser(user);<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">convertAndSend<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"direct_user_exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"sms\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">convertAndSend<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"direct_user_exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"email\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n92\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.2.2 \u8c03\u6574\u6d4b\u8bd5\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n93\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">RabbitMqProducerApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">RabbitMqProducerApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">UserService<\/span> <span style=\"color: rgb(0, 0, 0);\">userService<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoads<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">userService<\/span>.<span style=\"color: rgb(0, 0, 0);\">register<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e09\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"zhangsan\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsDirect<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">userService<\/span>.<span style=\"color: rgb(0, 0, 0);\">registerDirect<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u674e\u56db\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"lisi\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n94\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3.3 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n95\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u6d88\u8d39\u8005\u670d\u52a1\uff0c\u6267\u884c\u751f\u4ea7\u8005\u6d4b\u8bd5\u7c7bcontextLoadsDirect\uff0c\u6d88\u8d39\u8005\u6210\u529f\u6536\u5230\u6d88\u606f\u5e76\u6253\u5370<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000632\" data-ratio=\"0.35575485799701045\" data-s=\"300,640\"  data-type=\"png\" data-w=\"669\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151855296.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000632\" data-ratio=\"0.35575485799701045\" data-s=\"300,640\"  data-type=\"png\" data-w=\"669\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151855296.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n97\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4 \u4e3b\u9898\u6a21\u5f0fTopic<\/span><\/h1>\n<p cid=\"n98\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6a21\u7cca\u7684routing-key\u7684\u5339\u914d\u6a21\u5f0f\uff0cTopic\u6a21\u5f0f\u662fDirect\u6a21\u5f0f\u4e0a\u7684\u4e00\u79cd\u53e0\u52a0\uff0c\u589e\u52a0\u4e86\u6a21\u7cca\u8def\u7531RoutingKey\u7684\u6a21\u5f0f\u3002<\/span><\/p>\n<h2 cid=\"n99\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.1 \u6d88\u8d39\u8005<\/span><\/h2>\n<h3 cid=\"n100\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.1.1 \u65b0\u5efa\u914d\u7f6e\u7c7b<\/span><\/h3>\n<p cid=\"n101\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e00\u822c\u5728\u751f\u4ea7\u4e2d\uff0c\u5148\u542f\u52a8\u6d88\u8d39\u8005\u670d\u52a1\uff0c\u518d\u542f\u52a8\u751f\u4ea7\u8005\u670d\u52a1\uff0c\u56e0\u6b64\u6211\u4eec\u901a\u5e38\u628a\u914d\u7f6e\u7c7b\u653e\u5728\u6d88\u8d39\u8005\u670d\u52a1\u4e2d\uff0c\u5426\u5219\u53ef\u80fd\u5bfc\u81f4\u65e0\u961f\u5217\u76d1\u542c\u800c\u670d\u52a1\u542f\u52a8\u5931\u8d25\u6216\u62a5\u9519<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n102\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Configuration<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">RabbitMqTopicConfig<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* Topic \u4ea4\u6362\u673a<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">TopicExchange<\/span> <span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">TopicExchange<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"topic_user_exchange\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>, <span style=\"color: rgb(34, 17, 153);\">false<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53d1\u9001\u77ed\u4fe1\u961f\u5217<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 0);\">smsQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/durable    \u662f\u5426\u6301\u4e45\u5316\uff0c\u9ed8\u8ba4\u4e3afalse<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/exclusive   \u662f\u5426\u53ea\u80fd\u88ab\u5f53\u524d\u521b\u5efa\u7684\u8fde\u63a5\u4f7f\u7528\uff0c\u9ed8\u8ba4\u4e3afalse<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/autoDelete   \u662f\u5426\u81ea\u52a8\u5220\u9664\uff0c\u9ed8\u8ba4\u4e3afalse<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u4e00\u822c\u8bbe\u7f6e\u961f\u5217\u7684\u6301\u4e45\u5316\uff0c\u5176\u4f59\u4e24\u4e2a\u9ed8\u8ba4false<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"sms.topic.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53d1\u9001\u90ae\u4ef6\u961f\u5217<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 0);\">emailQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"email.topic.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u53d1\u9001\u5fae\u4fe1\u961f\u5217<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 0);\">wechatQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"wechat.topic.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u5c06\u961f\u5217\u548c\u4ea4\u6362\u673a\u7ed1\u5b9a, \u5e76\u8bbe\u7f6e\u7528\u4e8e\u5339\u914d\u952e<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 0);\">smsBindingTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">smsQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>()).<span style=\"color: rgb(0, 0, 0);\">with<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"*.sms.#\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 0);\">emailBindingTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">emailQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>()).<span style=\"color: rgb(0, 0, 0);\">with<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"#.email.#\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 0);\">wechatBindingTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">wechatQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>()).<span style=\"color: rgb(0, 0, 0);\">with<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"#.wechat.*\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n103\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.1.2 \u65b0\u5efa\u77ed\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n104\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"sms.topic.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">TopicSmsService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u77ed\u4fe1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"sms.topic\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n105\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.1.3 \u65b0\u5efa\u90ae\u4ef6\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n106\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"email.topic.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">TopicEmailService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u90ae\u4ef6<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"email.topic\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h3 cid=\"n107\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.1.4 \u65b0\u5efa\u5fae\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n108\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"wechat.topic.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">TopicWechatService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u63a8\u9001\u5fae\u4fe1\u6d88\u606f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"wechat.topic\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n109\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.2 \u751f\u4ea7\u8005<\/span><\/h2>\n<h3 cid=\"n110\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.2.1 \u8c03\u6574\u670d\u52a1\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n111\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">registerTopic<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>, <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">password<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6a21\u62df\u7528\u6237\u6ce8\u518c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">UUID<\/span>.<span style=\"color: rgb(0, 0, 0);\">randomUUID<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/saveUser(user);<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">convertAndSend<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"topic_user_exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"*.sms.email.*\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h3 cid=\"n112\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.2.2 \u8c03\u6574\u6d4b\u8bd5\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n113\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">userService<\/span>.<span style=\"color: rgb(0, 0, 0);\">registerTopic<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u738b\u4e94\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"wangwu\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h2 cid=\"n114\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.3 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n115\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u6d88\u8d39\u8005\u670d\u52a1\uff0c\u6267\u884c\u751f\u4ea7\u8005\u6d4b\u8bd5\u7c7bcontextLoadsTopic\uff0c\u6d88\u8d39\u8005\u6210\u529f\u6536\u5230\u6d88\u606f\u5e76\u6253\u5370<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000633\" data-ratio=\"0.46608695652173915\" data-s=\"300,640\"  data-type=\"png\" data-w=\"575\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151857374.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000633\" data-ratio=\"0.46608695652173915\" data-s=\"300,640\"  data-type=\"png\" data-w=\"575\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151857374.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n117\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">5 \u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4<\/span><\/h1>\n<h2 cid=\"n118\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">5.1 \u8c03\u6574\u6d88\u8d39\u8005\u914d\u7f6e\u7c7b<\/span><\/h2>\n<p cid=\"n119\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u8c03\u6574RabbitMqTopicConfig<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n120\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* durable     \u521b\u5efa\u6301\u4e45\u5316\u961f\u5217phone.topic.queue<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* withArgument   \u8bbe\u7f6e\u6d88\u606f\u8fc7\u671f\u65f6\u95f460000\u6beb\u79d2<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @return<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 255);\">phoneQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">QueueBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">durable<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"phone.topic.queue\"<\/span>).<span style=\"color: rgb(0, 0, 0);\">withArgument<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"x-message-ttl\"<\/span>, <span style=\"color: rgb(17, 102, 68);\">60000<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 255);\">phoneBindingTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">phoneQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>()).<span style=\"color: rgb(0, 0, 0);\">with<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"#.phone.#\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h2 cid=\"n121\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">5.2 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n122\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u670d\u52a1\uff0cRabitMQ\u4e2d\u961f\u5217\u5982\u4e0b\uff0c\u961f\u5217\u6807\u8bc6\u4e3aTTL<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000640\" data-ratio=\"0.3783783783783784\" data-s=\"300,640\"  data-type=\"png\" data-w=\"962\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151859284.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000640\" data-ratio=\"0.3783783783783784\" data-s=\"300,640\"  data-type=\"png\" data-w=\"962\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151859284.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n124\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6 \u6d88\u606f\u786e\u8ba4\u673a\u5236<\/span><\/h1>\n<p cid=\"n125\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u4ee5\u4e0b\u5747\u4e3a\u751f\u4ea7\u8005module\u7684\u8c03\u6574<\/strong><\/span><\/p>\n<h2 cid=\"n126\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.1 \u8c03\u6574\u751f\u4ea7\u8005yml<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"yml\" cid=\"n127\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">server<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">8090<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">#<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">#\u914d\u7f6eRabbitMQ\u670d\u52a1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">spring<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">  rabbitmq<\/span><span style=\"color: rgb(85, 85, 85);\">:<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   username<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>guest<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   password<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>guest<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   virtual-host<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>\/<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   host<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">127.0.0.1<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   port<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(17, 102, 68);\">5672<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">#none \u7981\u7528\u53d1\u5e03\u786e\u8ba4\u6a21\u5f0f\uff0c\u9ed8\u8ba4\u503c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">#correlated \u6d88\u606f\u6210\u529f\u53d1\u5e03\u5230\u4ea4\u6362\u673a\u540e\u4f1a\u89e6\u53d1\u56de\u8c03\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">   publisher-confirm-type<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span>correlated<\/span><\/pre>\n<h2 cid=\"n128\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.2 \u65b0\u5efa\u56de\u8c03\u65b9\u6cd5<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n129\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">MessageConfirmCallback<\/span> <span style=\"color: rgb(119, 0, 136);\">implements<\/span> <span style=\"color: rgb(0, 0, 0);\">RabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">ConfirmCallback<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Override<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">confirm<\/span>(<span style=\"color: rgb(0, 0, 0);\">CorrelationData<\/span> <span style=\"color: rgb(0, 0, 0);\">correlationData<\/span>, <span style=\"color: rgb(0, 136, 85);\">boolean<\/span> <span style=\"color: rgb(0, 0, 0);\">b<\/span>, <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">s<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">if<\/span> (<span style=\"color: rgb(0, 0, 0);\">b<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u6d88\u606f\u786e\u8ba4\u6210\u529f\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     } <span style=\"color: rgb(119, 0, 136);\">else<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u6d88\u606f\u786e\u8ba4\u5931\u8d25\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n130\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.3 \u8c03\u6574\u670d\u52a1\u7c7b<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n131\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">registerTopicCallback<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>, <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">password<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6a21\u62df\u7528\u6237\u6ce8\u518c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">UUID<\/span>.<span style=\"color: rgb(0, 0, 0);\">randomUUID<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/saveUser(user);<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u8bbe\u7f6e\u6d88\u606f\u786e\u8ba4<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">setConfirmCallback<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">MessageConfirmCallback<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">convertAndSend<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"topic_user_exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"*.sms.email.*\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h2 cid=\"n132\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.4 \u8c03\u6574\u6d4b\u8bd5\u7c7b<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n133\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsTopicCallback<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">userService<\/span>.<span style=\"color: rgb(0, 0, 0);\">registerTopicCallback<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5468\u516d\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"zhouliu\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n134\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6267\u884c\u6d4b\u8bd5\u7c7bcontextLoadsTopicCallback\uff0c\u6210\u529f\u8fdb\u5165\u56de\u8c03\u65b9\u6cd5<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000634\" data-ratio=\"0.2366412213740458\" data-s=\"300,640\"  data-type=\"png\" data-w=\"655\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151901141.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000634\" data-ratio=\"0.2366412213740458\" data-s=\"300,640\"  data-type=\"png\" data-w=\"655\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151901141.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n136\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7 \u6b7b\u4fe1\u961f\u5217<\/span><\/h1>\n<p cid=\"n137\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">DLX\uff08Dead-Letter-Exchange\uff09\uff0c\u79f0\u4e3a\u6b7b\u4fe1\u4ea4\u6362\u673a\u6216\u6b7b\u4fe1\u90ae\u7bb1\u3002<\/span><\/p>\n<p cid=\"n138\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5f53\u6d88\u606f\u5728\u4e00\u4e2a\u961f\u5217\u4e2d\u53d8\u6210\u6b7b\u4fe1\uff08dead message\uff09\u4e4b\u540e\uff0c\u5b83\u80fd\u88ab\u91cd\u65b0\u53d1\u9001\u5230\u53e6\u4e00\u4e2a\u4ea4\u6362\u673a\u4e2d\uff0c\u8fd9\u4e2a\u4ea4\u6362\u673a\u5c31\u662fDLX \uff0c\u7ed1\u5b9aDLX\u7684\u961f\u5217\u5c31\u662f\u6b7b\u4fe1\u961f\u5217\u3002<\/span><\/p>\n<p cid=\"n139\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d88\u606f\u53d8\u6210\u6b7b\u4fe1\uff0c\u53ef\u80fd\u662f\u7531\u4e8e\u4ee5\u4e0b\u7684\u539f\u56e0\uff1a<\/span><\/p>\n<ul class=\"list-paddingleft-1\" cid=\"n140\" mdtype=\"list\" data-mark=\"-\" style=\"margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\">\n<li>\n<p cid=\"n142\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">\u6d88\u606f\u88ab\u62d2\u7edd<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n144\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">\u6d88\u606f\u8fc7\u671f<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n146\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">\u961f\u5217\u8fbe\u5230\u6700\u5927\u957f\u5ea6<\/span><\/p>\n<\/li>\n<\/ul>\n<p cid=\"n147\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">DLX\u4e5f\u662f\u4e00\u4e2a\u6b63\u5e38\u7684\u4ea4\u6362\u673a\uff0c\u548c\u4e00\u822c\u7684\u4ea4\u6362\u673a\u6ca1\u6709\u533a\u522b\uff0c\u5b83\u80fd\u5728\u4efb\u4f55\u7684\u961f\u5217\u4e0a\u88ab\u6307\u5b9a\uff0c\u5b9e\u9645\u4e0a\u5c31\u662f\u8bbe\u7f6e\u67d0\u4e00\u4e2a\u961f\u5217\u7684\u5c5e\u6027\u3002<\/span><\/p>\n<p cid=\"n148\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5f53\u8fd9\u4e2a\u961f\u5217\u4e2d\u5b58\u5728\u6b7b\u4fe1\u65f6\uff0cRabbitMQ\u5c31\u4f1a\u81ea\u52a8\u5c06\u8fd9\u4e2a\u6d88\u606f\u91cd\u65b0\u53d1\u5e03\u5230\u8bbe\u7f6e\u7684DLX\u4e0a\u53bb\uff0c\u8fdb\u800c\u88ab\u8def\u7531\u5230\u53e6\u4e00\u4e2a\u961f\u5217\uff0c\u5373\u6b7b\u4fe1\u961f\u5217\u3002<\/span><\/p>\n<p cid=\"n149\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5728\u5b9a\u4e49\u961f\u5217\u7684\u65f6\u5019\u8bbe\u7f6e\u961f\u5217\u53c2\u6570 <\/span><span md-inline=\"code\" spellcheck=\"false\"><code style=\"font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;\">x-dead-letter-exchange<\/code><\/span><span md-inline=\"plain\"> \u6307\u5b9a\u4ea4\u6362\u673a\u5373\u53ef\u8bbe\u7f6e\u4e3a\u6b7b\u4fe1\u961f\u5217\u3002<\/span><\/p>\n<h2 cid=\"n150\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.1 \u8c03\u6574\u6d88\u8d39\u8005\u914d\u7f6e\u7c7b<\/span><\/h2>\n<p cid=\"n151\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u8c03\u6574RabbitMqTopicConfig<\/strong><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n152\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 255);\">dlxQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"dlx.topic.queue\"<\/span>, <span style=\"color: rgb(34, 17, 153);\">true<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Queue<\/span> <span style=\"color: rgb(0, 0, 255);\">vipQueue<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">QueueBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">durable<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"vip.topic.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">withArgument<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"x-message-ttl\"<\/span>, <span style=\"color: rgb(17, 102, 68);\">60000<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">withArgument<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"x-dead-letter-exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"dlx.topic.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 255);\">dlxBindingTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">dlxQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>()).<span style=\"color: rgb(0, 0, 0);\">with<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"#.#\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">Binding<\/span> <span style=\"color: rgb(0, 0, 255);\">vipBindingTopic<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">BindingBuilder<\/span>.<span style=\"color: rgb(0, 0, 0);\">bind<\/span>(<span style=\"color: rgb(0, 0, 0);\">vipQueue<\/span>()).<span style=\"color: rgb(0, 0, 0);\">to<\/span>(<span style=\"color: rgb(0, 0, 0);\">topicExchange<\/span>()).<span style=\"color: rgb(0, 0, 0);\">with<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"#.vip.#\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h2 cid=\"n153\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.2 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n154\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\u670d\u52a1\uff0cRabitMQ\u4e2d\u961f\u5217\u5982\u4e0b\uff0c\u961f\u5217\u6807\u8bc6\u4e3aDLX<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000635\" data-ratio=\"0.42099898063200814\" data-s=\"300,640\"  data-type=\"png\" data-w=\"981\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151903115.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000635\" data-ratio=\"0.42099898063200814\" data-s=\"300,640\"  data-type=\"png\" data-w=\"981\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151903115.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n156\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.3 \u8c03\u6574\u751f\u4ea7\u8005\u670d\u52a1\u7c7b<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n157\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">registerTopicDlx<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>, <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">password<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6a21\u62df\u7528\u6237\u6ce8\u518c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">UUID<\/span>.<span style=\"color: rgb(0, 0, 0);\">randomUUID<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/saveUser(user);<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">rabbitTemplate<\/span>.<span style=\"color: rgb(0, 0, 0);\">convertAndSend<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"topic_user_exchange\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"*.vip.*\"<\/span>, <span style=\"color: rgb(0, 0, 0);\">userId<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h2 cid=\"n158\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.4 \u8c03\u6574\u751f\u4ea7\u8005\u6d4b\u8bd5\u7c7b<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n159\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsTopicDlx<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">userService<\/span>.<span style=\"color: rgb(0, 0, 0);\">registerTopicDlx<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u94b1\u4e03\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"qianqi\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<h2 cid=\"n160\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.5 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n161\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong>\u5173\u95ed\u6d88\u8d39\u8005\u670d\u52a1<\/strong><\/span><span md-inline=\"plain\">\uff0c\u6267\u884c\u751f\u4ea7\u8005\u6d4b\u8bd5\u7c7bcontextLoadsTopicDlx<\/span><\/p>\n<p cid=\"n162\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u672a\u8fc7\u671f\u524d<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000636\" data-ratio=\"0.41623843782117165\" data-s=\"300,640\"  data-type=\"png\" data-w=\"973\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151906789.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000636\" data-ratio=\"0.41623843782117165\" data-s=\"300,640\"  data-type=\"png\" data-w=\"973\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151906789.png\"  \/><\/noscript><\/p>\n<p cid=\"n164\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fc7\u671f\u540e<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000637\" data-ratio=\"0.4108606557377049\" data-s=\"300,640\"  data-type=\"png\" data-w=\"976\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151909843.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000637\" data-ratio=\"0.4108606557377049\" data-s=\"300,640\"  data-type=\"png\" data-w=\"976\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151909843.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n166\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.6 \u65b0\u5efa\u6b7b\u4fe1\u6d88\u8d39\u670d\u52a1<\/span><\/h2>\n<p cid=\"n167\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d88\u8d39\u8005\u65b0\u5efa<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n168\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@RabbitListener<\/span>(<span style=\"color: rgb(0, 0, 0);\">queues<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(170, 17, 17);\">\"dlx.topic.queue\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Service<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">TopicDlxService<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/**<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* \u6d88\u606f\u63a5\u6536\u7684\u65b9\u6cd5<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">* @param message<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   <span style=\"color: rgb(170, 85, 0);\">*\/<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@RabbitHandler<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">receiveMessage<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"dlx.topic\uff1a\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">message<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h2 cid=\"n169\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">7.7 \u6d4b\u8bd5<\/span><\/h2>\n<p cid=\"n170\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u518d\u542f\u52a8\u6d88\u8d39\u8005\u670d\u52a1\uff0c\u6210\u529f\u63a5\u6536\u6b7b\u4fe1\u961f\u5217\u4e2d\u6d88\u606f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000639\" data-ratio=\"0.1742957746478873\" data-s=\"300,640\"  data-type=\"png\" data-w=\"568\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151911277.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000639\" data-ratio=\"0.1742957746478873\" data-s=\"300,640\"  data-type=\"png\" data-w=\"568\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151911277.png\"  \/><\/noscript><\/p>\n<p cid=\"n172\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">RabbitMQ\u4e2d\u6d88\u606f\u961f\u5217\u5982\u4e0b<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000638\" data-ratio=\"0.4183142559833507\" data-s=\"300,640\"  data-type=\"png\" data-w=\"961\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151913396.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000638\" data-ratio=\"0.4183142559833507\" data-s=\"300,640\"  data-type=\"png\" data-w=\"961\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151913396.png\"  \/><\/noscript><\/p>\n<p cid=\"n174\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u81f3\u6b64\uff0cSpringBoot\u6210\u529f\u6574\u5408RabbitMQ\u4e14\u6d4b\u8bd5\u901a\u8fc7\uff0c\u96c6\u7fa4\u3001\u5206\u5e03\u5f0f\u4e8b\u52a1\u7b49\u7528\u6cd5\u656c\u8bf7\u7b49\u5f85\u540e\u7eed\u3002<\/span><\/p>\n<p cid=\"n175\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\">\n<hr style=\"box-sizing: content-box;height: 2px;margin-top: 16px;margin-bottom: 16px;border-width: 0px;border-style: none;border-color: initial;background-color: rgb(231, 231, 231);\"  \/>\n<p cid=\"n178\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">CSDN\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/blog.csdn.net\/dkbnull\/article\/details\/137995945<\/span><\/span><\/p>\n<hr style=\"box-sizing: content-box;height: 2px;margin-top: 16px;margin-bottom: 16px;border-width: 0px;border-style: none;border-color: initial;background-color: rgb(231, 231, 231);\"  \/>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7a0b\u5e8f\u5458null              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u6587\u7ae0\u4e2d\u4ee3\u7801\u4e0d\u4fbf\u4e8e\u9605\u8bfb\uff0c\u8bf7\u4f7f\u7528\u7535\u8111\u67e5\u770b\u6216\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u3002\u6e90\u7801\u8be6\u89c1\uff1a GitHub\uff1ahttps:\/\/github.com\/dkbnu &#8230;<\/p>\n","protected":false},"author":1,"featured_media":4217,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[31,7],"tags":[],"class_list":["post-4238","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rabbitmq","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151826141-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151830966.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151826141-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151826141-1024x435.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151830966.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151826141-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151826141-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151826141.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151830966.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151830966.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151834355.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151834355.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151838382.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151838382.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151841992.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151841992.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151843816.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151843816.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151846217.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151846217.png","id":"image11"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151848165.png","id":"image12"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151848165.png","id":"image13"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151850928.png","id":"image14"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151850928.png","id":"image15"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151853301.png","id":"image16"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151853301.png","id":"image17"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151855296.png","id":"image18"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151855296.png","id":"image19"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151857374.png","id":"image20"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151857374.png","id":"image21"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151859284.png","id":"image22"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151859284.png","id":"image23"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151901141.png","id":"image24"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151901141.png","id":"image25"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151903115.png","id":"image26"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151903115.png","id":"image27"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151906789.png","id":"image28"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151906789.png","id":"image29"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151909843.png","id":"image30"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151909843.png","id":"image31"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151911277.png","id":"image32"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151911277.png","id":"image33"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151913396.png","id":"image34"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524151913396.png","id":"image35"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"RabbitMQ","post_date":"2024-04-20","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":587,"next_post_id":3935,"next_post_title":"springboot\u6574\u5408mqtt\u5b9e\u73b0\u6d88\u606f\u53d1\u9001\u548c\u6d88\u8d39\uff0c\u4ee5\u53ca\u5ba2\u6237\u7aef\u65ad\u7ebf\u91cd\u8fde\u4e4b\u540e\u7684\u6d88\u606f\u6062\u590d","previous_post_id":3958,"previous_post_title":"\u5904\u7406\u8bf7\u6c42\u5934\uff1a@RequestHeader\u6ce8\u89e3\u7684\u4f7f\u7528","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4238"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4238\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/4217"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}