{"id":290693,"date":"2024-04-02T21:31:53","date_gmt":"2024-04-02T13:31:53","guid":{"rendered":"https:\/\/lrxjmw.cn\/lfwqwhdrjmxx.html"},"modified":"2024-04-02T21:31:53","modified_gmt":"2024-04-02T13:31:53","slug":"lfwqwhdrjmxx","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lfwqwhdrjmxx.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u7ef4\u62a4\u8fbe\u4eba\u63ed\u79d8\uff1a\u6d88\u606f\u961f\u5217MQ\u914d\u7f6e\u5168\u653b\u7565"},"content":{"rendered":"

\u8eab\u4e3a\u6770\u51fa\u7684Linux<\/a>\u670d\u52a1\u5668\u7ef4\u62a4\u4e13\u5bb6\uff0c\u6df1\u8c19\u6d88\u606f\u961f\u5217\uff08MQ\uff09\u914d\u5236\u4e4b\u9053\u5b9e\u4e3a\u91cd\u4e2d\u4e4b\u91cd\u3002\u672c\u7bc7\u6587\u7ae0\u5bf9Linux\u73af\u5883\u4e0b MQ \u90e8\u7f72\u52a0\u4ee5\u7ec6\u81f4\u9610\u8ff0\uff0c\u5305\u62ec\u524d\u671f\u51c6\u5907\u63aa\u65bd\u3001\u5404\u7c7bMQ\u8f6f\u4ef6\u89e3\u6790\u3001\u8be6\u5c3d\u5b89\u88c5\u6b65\u9aa4\u53ca\u6280\u672f\u8c03\u6574\u91cd\u70b9\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u5bf9\u7b56\u7b49\u5173\u952e\u5185\u5bb9\u3002<\/p>\n

1.\u51c6\u5907\u5de5\u4f5c<\/b><\/p>\n

\u5728\u5b89\u88c5Linux\u6d88\u606f\u961f\u5217\u524d\uff0c\u9700\u7cbe\u5fc3\u505a\u8db3\u5145\u5206\u51c6\u5907\u5de5\u4f5c\u3002\u6b64\u8fc7\u7a0b\u5e94\u5305\u62ec\u8bc4\u4f30\u64cd\u4f5c\u7cfb\u7edf<\/a>\u548c\u786c\u4ef6\u662f\u5426\u6ee1\u8db3\u9700\u6c42linux mq \u5b89\u88c5<\/strong>\uff0c\u786e\u8ba4\u7f51\u7edc\u73af\u5883\u53ca\u9632\u706b\u5899\u8bbe\u5b9a\u65e0\u8bef\u3002\u540c\u65f6\uff0c\u5bf9\u9009\u53d6\u7684\u6d88\u606f\u961f\u5217\u8f6f\u4ef6\u6709\u6df1\u5165\u7406\u89e3\uff0c\u8fd9\u6837\u6709\u52a9\u4e8e\u672a\u6765\u7cfb\u7edf\u6784\u5efa\u4e0e\u914d\u7f6e\u7684\u6d41\u7545\u5b8c\u6210\u3002<\/p>\n

\u786e\u4fdd\u6d88\u606f\u6392\u961f\u8f6f\u4ef6\u7a33\u5065\u8fd0\u884c\uff0c\u9996\u8981\u6b65\u9aa4\u662f\u786e\u8ba4\u6240\u7528\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u5904\u4e8e\u5176\u652f\u6301\u8303\u56f4\u5185\uff1b\u540c\u6837\u91cd\u8981\u7684\u662f\u4fdd\u8bc1\u8ba1\u7b97\u673a\u6709\u8db3\u591f\u7684\u5185\u5b58\u53ca\u786c\u76d8\u5b58\u50a8\u7a7a\u95f4\u3002\u6b64\u5916\uff0c\u9632\u8303\u5899\u5728\u4fdd\u969c\u961f\u5217\u901a\u8baf\u7545\u901a\u65b9\u9762\u53d1\u6325\u5173\u952e\u4f5c\u7528\uff0c\u9700\u914c\u60c5\u8bbe\u5b9a\u6216\u5f00\u901a\u9002\u5f53\u7684\u901a\u9053\u3002<\/p>\n

linux mq \u5b89\u88c5_linux mq \u5b89\u88c5_linux mq \u5b89\u88c5<\/p>\n

2. MQ\u8f6f\u4ef6\u4ecb\u7ecd<\/b><\/p>\n

Linux\u73af\u5883\u4e0b\u6709\u591a\u79cd\u6d88\u606f\u961f\u5217\u6280\u672f\u53ef\u9009\uff0c\u5982RabbitMQ\uff08AMQP\u5b98\u65b9\u5f00\u6e90<\/a>\u5b9e\u8df5\uff09\u3001ActiveMQ\uff08Apache\u57fa\u91d1\u4f1a\u81f4\u529b\u4e8e\u5f00\u53d1\u7684\u5f00\u6e90\u9879\u76ee\uff09\u4ee5\u53caKafka\u7b49\u7b49\u3002RabbitMQ\u63d0\u4f9b\u4e30\u5bcc\u7684\u7f16\u7a0b\u8bed\u8a00\u652f\u6301\uff0c\u800cActiveMQ\u5219\u4e13\u6ce8\u4e8e\u6ee1\u8db3JMS\u89c4\u8303\u9700\u6c42\u3002\u6700\u540e\uff0cKafka\u4f5c\u4e3a\u4e00\u4e2a\u62e5\u6709\u6781\u9ad8\u541e\u5410\u91cf\u7684\u5206\u5e03\u5f0f\u53d1\u5e03\/\u8ba2\u9605\u6d88\u606f\u7cfb\u7edf\uff0c\u65e0\u7591\u662f\u60a8\u503c\u5f97\u4fe1\u8d56\u7684\u9996\u9009\u3002<\/p>\n

\u8003\u8651\u9009\u7528\u4f55\u79cd\u6d88\u606f\u961f\u5217\u8f6f\u4ef6\u65f6\uff0c\u9700\u4ee5\u5b9e\u9645\u4e1a\u52a1\u9700\u6c42\u4e0e\u6280\u672f\u5806\u6808\u4e3a\u6807\u51c6\uff0c\u8fdb\u884c\u6df1\u5165\u6743\u8861\uff1b\u4e14\u5bf9\u5404\u7c7b\u8f6f\u4ef6\u6709\u5145\u5206\u7684\u8ba4\u8bc6\u4f3c\u5c24\u4e3a\u5173\u952e\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u67b6\u6784\u3001\u529f\u80fd\u7279\u6027\u53ca\u6027\u80fd\u8868\u73b0\u7b49\u5404\u4e2a\u65b9\u9762\u3002<\/p>\n

linux mq \u5b89\u88c5_linux mq \u5b89\u88c5_linux mq \u5b89\u88c5<\/p>\n

3.\u5b89\u88c5\u6b65\u9aa4<\/b><\/p>\n

\u8fd0\u7528Linux\u5185\u6838\u8f6f\u4ef6LMQ\u8fdb\u884c\u5b89\u88c5\uff0c\u7701\u53bb\u7e41\u7410\u6b65\u9aa4\uff0c\u64cd\u4f5c\u7b80\u4fbf\u5feb\u6377\u3002\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u4ec5\u9700\u501f\u52a9\u73b0\u6210\u7684\u5305\u7ba1\u7406\u5de5\u5177\u6216\u8005\u662f\u5b98\u65b9\u53d1\u5e03\u7684\u5b89\u88c5\u5305\u5c31\u80fd\u8f7b\u6613\u5b8c\u6210\u6b64\u8fc7\u7a0b\u3002\u4ee5Ubuntu\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u8fdb\u884cRabbitMQ\u670d\u52a1\u5668\u7684\u5b89\u88c5\u53ea\u9700\u8f93\u5165\"sudo apt-get install rabbitmq-server\"\u6307\u4ee4\uff1b\u800c\u5bf9\u4e8eCentOS\u7cfb\u7edf\uff0c\u540c\u6837\u7b80\u5355\u5730\u6267\u884c\"sudo yum install rabbitmq-server\"\u5c31\u53ef\u5b8c\u6210\u914d\u7f6e\u4e86\u3002<\/p>\n

\u5728\u5168\u90e8\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u52a1\u5fc5\u8981\u542f\u52a8\u76f8\u5173\u7684\u670d\u52a1\uff0c\u5e76\u786e\u4fdd\u5b83\u4eec\u80fd\u5b9e\u73b0\u81ea\u52a8\u542f\u52a8\u7684\u80fd\u529b\u3002\u4e3a\u8fbe\u6b64\u76ee\u7684\uff0c\u63a8\u8350\u4f9d\u7167\u4e0b\u5217\u6307\u793a\u8fdb\u884c\u64cd\u4f5c\uff1a\u901a\u8fc7\u6267\u884c`sudo systemctl start rabbitmq-server`\u53ca`sudo systemctl enable rabbitmq-server`\u547d\u4ee4<\/a>\uff0c\u5373\u53ef\u542f\u52a8\u4e0e\u914d\u7f6eRabbitMQ-Server\u7684\u9ed8\u8ba4\u5f00\u673a\u542f\u52a8\u529f\u80fd\u3002<\/p>\n

4.\u914d\u7f6e\u65b9\u6cd5<\/b><\/p>\n

\u5728Ubuntu\u73af\u5883\u4e0b\uff0c\u6709\u6548\u5730\u8fd0\u7528\u4efb\u52a1\u961f\u5217\u7ba1\u7406\u5de5\u5177\u5bf9\u4e8e\u4fdd\u8bc1\u7cfb\u7edf\u7a33\u5b9a\u6027\u4e0e\u63a8\u52a8\u516c\u53f8\u4e1a\u52a1\u53d1\u5c55\u5177\u6709\u6838\u5fc3\u610f\u4e49\u3002\u5173\u4e8e\u6b64\u9879\u5b9e\u65bd\u8fc7\u7a0b\u4e2d\u7684\u5173\u952e\u8981\u7d20\uff0c\u503c\u5f97\u6211\u4eec\u7740\u91cd\u5173\u6ce8\u7684\u6709\u76d1\u542c\u5730\u5740\u3001\u7aef\u53e3\u987a\u4f4d\u3001\u8ba4\u8bc1<\/a>\u673a\u5236\u4ee5\u53ca\u865a\u62df\u4e3b\u673a\u7b49\u65b9\u9762\u3002<\/p>\n

\u5728RabbitMQ\u73af\u5883\u5185\uff0c\u8c03\u8282\u5404\u9879\u914d\u7f6e\u53ea\u9700\u4fee\u6539`\/etc\/rabbitmq\/rabbitmq.config`\u914d\u7f6e\u6587\u4ef6\u5373\u53ef\u3002\u8be5\u6587\u4ef6\u5168\u9762\u7ba1\u7406\u76d1\u542c\u5730\u5740\u53ca\u7aef\u53e3\u7b49\u6838\u5fc3\u8bbe\u5b9a\uff0c\u4fbf\u4e8e\u6dfb\u52a0\u7528\u6237\u5e76\u8d4b\u4e88\u76f8\u5e94\u6743\u9650\uff0c\u4ee5\u6b64\u5b9e\u73b0\u6570\u636e\u5b89\u5168\u9632\u62a4\u3002<\/p>\n

linux mq \u5b89\u88c5_linux mq \u5b89\u88c5_linux mq \u5b89\u88c5<\/p>\n

5.\u5e38\u89c1\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/b><\/p>\n

\u5728\u4f7f\u7528Linux\u6d88\u606f\u961f\u5217\u5de5\u5177\u8fc7\u7a0b\u4e2d\uff0c\u7528\u6237\u53ef\u80fd\u4f1a\u9047\u5230\u5982\u65ad\u8fde\u3001\u6743\u9650\u5f02\u5e38\u548c\u6027\u80fd\u95ee\u9898\u7b49\u8bf8\u591a\u6311\u6218\uff0c\u6b64\u65f6\uff0c\u5177\u5907\u5f3a\u5927\u7684\u6545\u969c\u6392\u9664\u548c\u8c03\u8bd5\u6280\u80fd\u5c31\u663e\u5f97\u5c24\u4e3a\u5173\u952e\u4e86linux mq \u5b89\u88c5<\/strong>RED HAT LINUX 9.0\uff0c\u53ea\u6709\u8fd9\u6837\u624d\u80fd\u591f\u5b9e\u73b0\u5feb\u901f\u800c\u7cbe\u51c6\u7684\u95ee\u9898\u89e3\u51b3\u3002<\/p>\n

\u5728\u5e94\u5bf9Kafka\u6027\u80fd\u6b20\u4f73\u7684\u60c5\u51b5\u4e0b\u786c\u76d8\u5b89\u88c5linux\uff0c\u9002\u5ea6\u6269\u5c55\u8282\u70b9\u5e76\u8c03\u6574\u76f8\u5173\u53c2\u6570\u80fd\u663e\u8457\u6539\u5584\u6027\u80fd\u8868\u73b0\u3002\u9488\u5bf9ActiveMQ\u7684\u8fde\u63a5\u6570\u9650\u5236\uff0c\u5408\u7406\u8c03\u8282\u914d\u7f6e\u540c\u6837\u80fd\u591f\u589e\u5927\u9053\u6b49\u6570\u91cf\u7684\u9650\u5236\uff0c\u8fdb\u800c\u5f97\u5230\u9ad8\u6548\u89e3\u51b3\u3002<\/p>\n

6.\u603b\u7ed3\u4e0e\u5c55\u671b<\/b><\/p>\n

\u672c\u7a3f\u8be6\u7ec6\u8ba8\u8bbaLinux Message Queue (MQ)\u7684\u5bf9\u88c5\u8bbe\u7f6e\uff0c\u65e8\u5728\u6df1\u5316\u8bf8\u4f4d\u5bf9\u76f8\u5173\u6280\u672f\u7684\u8ba4\u77e5\u53ca\u5e94\u7528\u80fd\u529b\u3002\u671f\u671b\u8bfb\u8005\u4eec\u901a\u8fc7\u6301\u7eed\u52a0\u5f3a\u81ea\u6211\u5b66\u4e60\u5b9e\u4e60\uff0c\u5c06\u6b64\u9879\u6280\u672f\u5a34\u719f\u8fd0\u7528\u4e8e\u4f01\u4e1a\u5b9e\u8df5\uff0c\u4ece\u800c\u63d0\u9ad8\u5de5\u4f5c\u6548\u80fd\u3002<\/p>\n

\u5728\u957f\u65f6\u95f4\u7684Linux\u6d88\u606f\u961f\u5217\u5b9e\u8df5\u4e2d\uff0c\u4f60\u6709\u6ca1\u6709\u9047\u5230\u590d\u6742\u95ee\u9898?\u53c8\u662f\u5982\u4f55\u6210\u529f\u653b\u514b\u8fd9\u4e9b\u96be\u9898\u7684\u5462\uff1f\u5e0c\u671b\u5728\u4e0b\u65b9\u5206\u4eab\u4f60\u7684\u72ec\u7279\u89c1\u89e3\u4e0e\u5b9e\u6218\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

linux mq \u5b89\u88c5\u8eab\u4e3a\u6770\u51fa\u7684Linux\u670d\u52a1\u5668\u7ef4\u62a4\u4e13\u5bb6\uff0c\u6df1\u8c19\u6d88\u606f\u961f\u5217\uff08MQ\uff09\u914d\u5236\u4e4b\u9053\u5b9e\u4e3a\u91cd\u4e2d\u4e4b\u91cd\u3002\u540c\u65f6\uff0c\u5bf9\u9009\u53d6\u7684\u6d88\u606f\u961f\u5217\u8f6f\u4ef6\u6709\u6df1\u5165\u7406\u89e3\uff0c\u8fd9\u6837\u6709\u52a9\u4e8e\u672a\u6765\u7cfb\u7edf\u6784\u5efa\u4e0e\u914d\u7f6e\u7684\u6d41\u7545\u5b8c\u6210\u3002\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u4ec5\u9700\u501f\u52a9\u73b0\u6210\u7684\u5305\u7ba1\u7406\u5de5\u5177\u6216\u8005\u662f\u5b98\u65b9\u53d1\u5e03\u7684\u5b89\u88c5\u5305\u5c31\u80fd\u8f7b\u6613\u5b8c\u6210\u6b64\u8fc7\u7a0b\u3002<\/p>\n","protected":false},"author":1,"featured_media":290694,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-290693","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=290693"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290693\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/290694"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=290693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=290693"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=290693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}