{"id":8449,"date":"2022-11-11T13:54:33","date_gmt":"2022-11-11T05:54:33","guid":{"rendered":"http:\/\/123.57.164.21\/?p=8449"},"modified":"2022-11-24T13:38:02","modified_gmt":"2022-11-24T05:38:02","slug":"apache-camel%e7%ae%80%e4%bb%8b%e4%bb%a5%e5%8f%8a%e4%bd%bf%e7%94%a8%e5%9c%ba%e6%99%af","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=8449","title":{"rendered":"Apache Camel\u7b80\u4ecb\u4ee5\u53ca\u4f7f\u7528\u573a\u666f"},"content":{"rendered":"\n<p><strong>\u6211\u4eec\u8981\u89e3\u51b3\u7684\u95ee\u9898<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-1024x673.png\" alt=\"\" class=\"wp-image-8450\" width=\"462\" height=\"304\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-1024x673.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-300x197.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-768x505.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-830x545.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-230x151.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-350x230.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164-480x315.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-164.png 1400w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u5b8c\u6210\u7ec4\u7ec7\u5185\u5916\u7684\u5404\u79cd\u5f02\u6784\u7cfb\u7edf\u3001\u5e94\u7528\u3001\u6570\u636e\u6e90\u4e4b\u95f4\u5171\u4eab\u548c\u4ea4\u6362\u4fe1\u606f\u3002<\/li><li>\u4f18\u5316\u73b0\u6709\u7ed3\u6784\uff0c\u4f7f\u6574\u4e2a\u7cfb\u7edf\u6613\u4e8e\u62d3\u5c55\u548c\u7ef4\u62a4\u3002<\/li><li>\u4fdd\u8bc1\u591a\u4e2a\u7cfb\u7edf\u5404\u81ea\u72ec\u7acb\u4e92\u4e0d\u5e72\u6270\u3002<\/li><\/ul>\n\n\n\n<p>\u603b\u7ed3\u53d1\u73b0\u6211\u4eec\u5b9e\u9645\u8981\u89e3\u51b3\u7684\u95ee\u9898\u662f\uff1a<strong>\u4f01\u4e1a\u5e94\u7528\u96c6\u6210\uff08Enterprise Application Integration\uff0cEAI\uff09<\/strong> \u662f\u5b8c\u6210\u5728\u7ec4\u7ec7\u5185\u3001\u5916\u7684\u5404\u79cd\u5f02\u6784\u7cfb\u7edf\uff0c\u5e94\u7528\u548c\u6570\u636e\u6e90\u4e4b\u95f4\u5171\u4eab\u548c\u4ea4\u6362\u4fe1\u606f\u548c\u534f\u4f5c\u7684\u9014\u5f84\uff0c\u65b9\u6cd5\u5b66\uff0c\u6807\u51c6\u548c\u6280\u672f\u3002<\/p>\n\n\n\n<p><strong>EAI\u7684\u5e38\u7528\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><a rel=\"noreferrer noopener\" target=\"_blank\"><\/a>SOA\u67b6\u6784\u6a21\u578b<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-1024x707.png\" alt=\"\" class=\"wp-image-8451\" width=\"371\" height=\"255\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-1024x707.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-300x207.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-768x530.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-830x573.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-230x159.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-350x242.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165-480x331.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-165.png 1364w\" sizes=\"(max-width: 371px) 100vw, 371px\" \/><\/figure><\/div>\n\n\n\n<p><strong>SOA\uff08Service Oriented Architecture\uff09<\/strong> \u4e2d\u6587\u91ca\u4e49\u4e3a \u201c\u9762\u5411\u670d\u52a1\u7684\u67b6\u6784\u201d\u5b83\u662f\u4e00\u79cd\u8bbe\u8ba1\u7406\u5ff5\uff0c\u5176\u4e2d\u5305\u542b\u591a\u4e2a\u670d\u52a1\uff0c \u670d\u52a1\u4e4b\u95f4\u901a\u8fc7\u76f8\u4e92\u4f9d\u8d56\u6700\u7ec8\u63d0\u4f9b\u4e00\u7cfb\u5217\u5b8c\u6574\u7684\u529f\u80fd\u3002\u5404\u4e2a\u670d\u52a1\u901a\u5e38\u4ee5\u72ec\u7acb\u7684\u5f62\u5f0f\u90e8\u7f72\u8fd0\u884c\uff0c\u670d\u52a1\u4e4b\u95f4\u901a\u8fc7\u7f51\u7edc\u8fdb\u884c\u8c03\u7528\u3002\u8981\u6c42\u5404\u4e2a\u670d\u52a1\u9075\u5faa\u7edf\u4e00\u7684\u89c4\u8303\u548c\u5951\u7ea6\u3002<\/p>\n\n\n\n<p>ESB\u4f01\u4e1a\u670d\u52a1\u603b\u7ebf<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-1024x715.png\" alt=\"\" class=\"wp-image-8452\" width=\"341\" height=\"238\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-1024x715.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-300x209.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-768x536.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-830x579.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-230x161.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-350x244.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166-480x335.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-166.png 1318w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/figure><\/div>\n\n\n\n<p><strong>ESB\uff08Enterprise Service Bus\uff0c\u5373\u4f01\u4e1a\u670d\u52a1\u603b\u7ebf\uff09<\/strong> \u5c31\u662f\u4e00\u6839\u7ba1\u9053\uff0c\u7528\u6765\u8fde\u63a5\u5404\u4e2a\u670d\u52a1\u8282\u70b9\u3002ESB\u7684\u5b58\u5728\u662f\u4e3a\u4e86\u96c6\u6210\u57fa\u4e8e\u4e0d\u540c\u534f\u8bae\u7684\u4e0d\u540c\u670d\u52a1\uff0cESB \u505a\u4e86\u6d88\u606f\u7684\u8f6c\u5316\u3001\u89e3\u91ca\u4ee5\u53ca\u8def\u7531\u7684\u5de5\u4f5c\uff0c\u4ee5\u6b64\u6765\u8ba9\u4e0d\u540c\u7684\u670d\u52a1\u4e92\u8054\u4e92\u901a<\/p>\n\n\n\n<p><strong>\u5982\u4f55\u5b9e\u73b0ESB<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-1024x610.png\" alt=\"\" class=\"wp-image-8453\" width=\"433\" height=\"258\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-1024x610.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-300x179.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-768x457.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-830x494.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-230x137.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-350x208.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167-480x286.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-167.png 1404w\" sizes=\"(max-width: 433px) 100vw, 433px\" \/><\/figure><\/div>\n\n\n\n<p>\u5f53\u524d\u5b9e\u73b0ESB\u6bd4\u8f83\u6210\u719f\u7684\u6a21\u578b\u4e3a<strong>EIP\uff08Enterprise Integration Patterns\uff09<sup><a href=\"https:\/\/blog.csdn.net\/GuoDa_\/article\/details\/105947744#fn1\">1<\/a><\/sup><\/strong>\u3002\u4ed6\u7684\u5305\u542b\u5982\u4e0b\u89c4\u8303\uff1a<\/p>\n\n\n\n<ul><li>\u96c6\u6210\u65b9\u5f0f\uff08Integration Styles\uff09\uff1aEIP\u89c4\u5b9a\u6240\u6709\u96c6\u6210\u6a21\u5f0f\u8981\u57fa\u4e8e\u6d88\u606f\u4f20\u9001\u6a21\u5f0f\u3002<\/li><li>\u901a\u9053\u6a21\u5f0f\uff08Channel Patterns\uff09\uff1a\u6d88\u606f\u901a\u8fc7\u901a\u9053\u8fdb\u884c\u4f20\u9012\u3002<\/li><li>\u6d88\u606f\u4f53\u6a21\u5f0f\uff08Message Construction Patterns\uff09\uff1a\u63cf\u8ff0\u4e86\u5728\u6d88\u606f\u7cfb\u7edf\u4e2d\u4ea4\u4e92\u7684\u6d88\u606f\u7684\u89c4\u8303\u3002<\/li><li>\u8def\u7531\u6a21\u5f0f\uff08Routing Patterns\uff09\uff1a\u6d88\u606f\u5982\u4f55\u4ece\u53d1\u9001\u8005\u5206\u53d1\u5230\u6b63\u786e\u7684\u63a5\u6536\u8005\uff0c\u4e2d\u95f4\u4e00\u822c\u4e0d\u8fdb\u884c\u4fee\u6539\u3002<\/li><li>\u8f6c\u6362\u6a21\u5f0f\uff08Transformation Patterns\uff09\uff1a\u5c06\u6d88\u606f\u4f53\u7684\u5185\u5bb9\u4fee\u6539\u4e3a\u63a5\u6536\u8005\u53ef\u4ee5\u7406\u89e3\u7684\u7ed3\u6784\uff0c\u4e2d\u95f4\u53ef\u80fd\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u4fee\u6539\u6216\u8005\u7b5b\u9009\u3002<\/li><li>\u7ec8\u7aef\u6a21\u5f0f\uff08Endpoint Patterns\uff09\uff1a\u751f\u6210\u6216\u8005\u63a5\u6536\u6d88\u606f\u7684\u5ba2\u6237\u3002<\/li><li>\u7cfb\u7edf\u7ba1\u7406\u6a21\u5f0f\uff08System Management Patterns\uff09\uff1a\u63d0\u4f9b\u76d1\u63a7\u6574\u4e2a\u7cfb\u7edf\u72b6\u6001\u7684\u5de5\u5177\uff0c\u5305\u62ec\u9519\u8bef\u5904\u7406\uff0c\u538b\u529b\u6d4b\u8bd5\u6216\u8005\u76d1\u63a7\u7cfb\u7edf\u53d8\u5316\u3002<\/li><\/ul>\n\n\n\n<p><strong>\u4e3a\u4ec0\u4e48\u4f7f\u7528Camel<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5f53\u524d\u70ed\u95e8\u7684EIP\u96c6\u6210\u6846\u67b6\u5206\u522b\u6709\uff1aSpring Integration\u3001Mule ESB\u3001Apache Camel\u3002\u63a5\u4e0b\u6765\u5206\u522b\u5bf9\u4e09\u4e2a\u6846\u67b6\u8fdb\u884c\u5206\u6790\uff08\u6253\u5206\u4e3a\u535a\u4e3b\u7684\u8bc4\u4f30\uff0c\u4ec5\u4f9b\u53c2\u8003\uff09\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-168.png\" alt=\"\" class=\"wp-image-8454\" width=\"147\" height=\"163\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-168.png 716w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-168-271x300.png 271w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-168-230x255.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-168-350x388.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-168-480x532.png 480w\" sizes=\"(max-width: 147px) 100vw, 147px\" \/><\/figure><\/div>\n\n\n\n<p>Spring Integration\u53ea\u63d0\u4f9b\u4e86\u975e\u5e38\u57fa\u7840\u7684\u652f\u6301\uff0c\u5982\u6587\u4ef6\uff0cFTP\uff0cJMS\uff0cTCP\uff0cHTTP\u6216Web\u670d\u52a1\u3002\u96c6\u6210\u662f\u901a\u8fc7\u7f16\u5199\u5927\u91cf\u7684XML\u4ee3\u7801\uff08\u6ca1\u6709\u4e00\u4e2a\u771f\u6b63\u7684DSL\uff09\u5b9e\u73b0\u7684\u3002\u4f7f\u7528\u5b83\uff0c\u5bd3\u610f\u7740<strong>\u5927\u91cf\u7684XML\u7f16\u5199\u5de5\u4f5c<\/strong>\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-169.png\" alt=\"\" class=\"wp-image-8455\" width=\"124\" height=\"151\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-169.png 646w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-169-247x300.png 247w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-169-230x279.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-169-350x425.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-169-480x583.png 480w\" sizes=\"(max-width: 124px) 100vw, 124px\" \/><\/figure><\/div>\n\n\n\n<p>Mule ESB\u4e0d\u662f\u4ec5\u4ec5\u4e00\u4e2a\u96c6\u6210\u6846\u67b6\uff0c\u800c\u662f\u4e00\u4e2a\u5305\u62ec\u4e00\u4e9b\u989d\u5916\u529f\u80fd\u7684\u5b8c\u6574ESB\uff0c\u6bd4Spring\u96c6\u6210\u5b83\u66f4\u50cf\u662f\u4e00\u4e2aDSL\u3002<br>\u56e0\u4e3a\u662f\u4e00\u4e2a\u5b8c\u6574\u7684ESB\uff0c\u6240\u4ee5<strong>\u96c6\u6210\u903b\u8f91\u4f1a\u6bd4\u8f83\u590d\u6742<\/strong>\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-170.png\" alt=\"\" class=\"wp-image-8456\" width=\"151\" height=\"192\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-170.png 598w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-170-235x300.png 235w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-170-230x293.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-170-350x446.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-170-480x612.png 480w\" sizes=\"(max-width: 151px) 100vw, 151px\" \/><\/figure><\/div>\n\n\n\n<p>Apache Camel\u5b9e\u73b0\u4e86\u4f60\u80fd\u60f3\u5230\u7684\u51e0\u4e4e\u6bcf\u4e00\u4e2a\u6280\u672f\uff0c\u63d0\u4f9b\u5f88\u591a\u7ec4\u4ef6\uff0c\u540c\u65f6\u4f60\u53ef\u4ee5\u5f88\u5bb9\u6613\u7684\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u3002\u800c\u4e14Camel\u548cSpring\u7684\u96c6\u6210\u5f88\u5b8c\u5584\u3002<strong>Camel\u53ef\u4ee5\u5b9e\u73b0\u7528\u5230\u624d\u4f9d\u8d56\uff0c\u4e0d\u7528\u4e0d\u4f9d\u8d56\u3002<\/strong><\/p>\n\n\n\n<p><strong>Camel\u53ef\u4ee5\u505a\u4ec0\u4e48<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>Apache Camel\u7b80\u4ecb<\/strong><\/p>\n\n\n\n<p>apache camel \u662f\u8f7b\u91cf\u7ea7ESB\u6846\u67b6<\/p>\n\n\n\n<p>\u5b83\u6709\u51e0\u4e2a\u6bd4\u8f83\u91cd\u8981\u7684\u6982\u5ff5\u5c31\u662f\uff1a<\/p>\n\n\n\n<ul><li>endpoint,\u6240\u8c13\u7684endpoint,\u5c31\u662f\u4e00\u79cd\u53ef\u4ee5\u63a5\u6536\u6216\u53d1\u9001\u6570\u636e\u7684\u7ec4\u4ef6\u3002\u53ef\u4ee5\u652f\u6301\u591a\u79cd\u534f\u8bae\uff0c\u5982jms,http,file\u7b49\u3002<\/li><li>processor,\u5b83\u662f\u7528\u6765\u5904\u7406\u5177\u4f53\u4e1a\u52a1\u903b\u8f91\u7684\u7ec4\u4ef6\u3002<\/li><li>route,\u7528\u6765\u8def\u7531\uff0c\u6307\u793a\u6570\u636e\u4ece\u54ea\u91cc\u6765\u5230\u54ea\u91cc\u53bb\uff0c\u4e2d\u95f4\u7528\u54ea\u4e2aprocessor\u5904\u7406\u3002<\/li><\/ul>\n\n\n\n<p>\u800cprocessor\u4e4b\u95f4\u7528exchange\u5bf9\u8c61\u6765\u4f20\u9001\u6570\u636e\uff0c\u6709\u70b9\u50cfjms,\u901a\u4fd7\u4e00\u70b9\u5c31\u50cf\u4e0a\u5b66\u65f6\u4f20\u7684\u5c0f\u7eb8\u6761\u3002<\/p>\n\n\n\n<p>camel\u5c31\u662f\u4f01\u4e1a\u4fe1\u606f\u96c6\u6210\u6846\u67b6\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f88\u591a\u7b80\u5355\u597d\u7528\u800c\u53c8\u5f3a\u5927\u7684\u7ec4\u4ef6\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u573a\u666f\u6765\u9009\u62e9\u4e0d\u540c\u7684EIP\uff08\u4f01\u4e1a\u96c6\u6210\u6a21\u5f0f\uff09\u6765\u5b9e\u73b0\u81ea\u5df1\u7684\u9700\u6c42\uff0c\u4ee5\u54cd\u5e94\u5feb\u901f\u53d8\u5316\u7684\u4e1a\u52a1\u3002\u53ef\u4ee5\u628a\u5b83\u5f53\u6210\u4f01\u4e1a\u4fe1\u606f\u603b\u7ebf\uff08ESB\uff09\u7684\u8f7b\u91cf\u7ea7\u5b9e\u73b0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">camel\u662f\u4e00\u6b3e\u57fa\u4e8e\u89c4\u5219\u5feb\u901f\u5b9e\u73b0\u6d88\u606f\u6d41\u8f6c\u7684\u5f00\u53d1\u7ec4\u4ef6\uff0c\u96c6\u6210\u8be5\u7ec4\u4ef6\u540e\uff0c\u4f60\u7684\u7a0b\u5e8f\u53ef\u4ee5\u7f16\u5199\u6700\u5c11\u7684\u4ee3\u7801\u5b9e\u73b0\u590d\u6742\u7684\u6d88\u606f\u5728\u4e0d\u540c\u7684\u534f\u8bae\u89c4\u5219\u95f4\u6d41\u8f6c\u3002\n   \u4f8b\u5982\uff1a\u7a0b\u5e8f\u5b9e\u73b0\u4eceFtp\u83b7\u5f97.xml\u6587\u4ef6\uff0c\u7136\u540e\u5c06\u6536\u5230\u7684\u6587\u4ef6\u5185\u5bb9\u503c\u8f6c\u6362\u540e\uff0c\u53d1\u9001\u5230Jms Queue\u4e2d\uff0c\u5e76\u4e14\u5c06Request\u5199\u5165\u5230\u6570\u636e\u5e93log\u8868\u3002\n   Ftp\u7ec4\u4ef6-&gt;Jms\u7ec4\u4ef6-&gt;Db\u7ec4\u4ef6\n   \u53ea\u9700\u8981\u77ed\u77ed\u7684\u51e0\u884c\u4ee3\u7801\u5c31\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u6837\u4e00\u4e2a\u529f\u80fd\uff0c\u4f46\u662f\u5982\u679c\u7528\u5176\u4ed6\u6846\u67b6\u4e00\u4e2a\u4e2a\u529f\u80fd\u7684\u5199\uff0c\u5c06\u4f1a\u6709\u975e\u5e38\u591a\u7684\u4ee3\u7801\u91cf\u5e76\u4e14\u53ef\u80fd\u4f1a\u51fa\u73b0\u4e00\u4e9b\u7eb0\u6f0f\uff0c\u800ccamel\u5df2\u7ecf\u5c06\u8fd9\u4e9b\u529f\u80fd\u90fd\u5c01\u88c5\u5728camel\u7ec4\u4ef6\u4e2d\u4e86\uff0c\u8282\u7701\u5f00\u53d1\u6210\u672c\u3002\n   from(\"ftp:\/\/xxxxxxxxxxxxx\").bean(\"bean:JmsQueueCovertBean?method=convert\").to(\"jms:\/\/xxxxxxxxxxx\")..setBody(simple(\"insert into xxxxxxxxxxx\")).to(\"jdbc:testdb\");\n<\/pre>\n\n\n\n<p>Apache camel \u662f\u4e00\u4e2a\u57fa\u4e8eEIP\u7684\u5f00\u6e90\u6846\u67b6\u3002\u5b9e\u73b0\u4e86EIP\u5b9a\u4e49\u7684\u4e00\u4e9b\u4e0d\u540c\u5e94\u7528\u7cfb\u7edf\u4e4b\u95f4\u7684\u6d88\u606f\u4f20\u8f93\u6a21\u578b\uff0c\u5305\u62ec\u5e38\u89c1\u7684Point2Point\u3001Pub\/Sub\u6a21\u578b\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-1024x589.png\" alt=\"\" class=\"wp-image-8457\" width=\"440\" height=\"253\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-1024x589.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-300x173.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-768x442.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-830x478.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-230x132.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-350x201.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171-480x276.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-171.png 1390w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><\/figure><\/div>\n\n\n\n<p>Camel\u7684\u6d88\u606f\u4f20\u9012\u7cfb\u7edf\uff08Message System\uff09<sup><a rel=\"noreferrer noopener\" href=\"https:\/\/www.freesion.com\/article\/1267830277\/#fn2\" target=\"_blank\">2<\/a><\/sup>:<\/p>\n\n\n\n<ul><li>\u7ec8\u7aef\uff08Message Endpoint\uff09\uff1a\u53ef\u4ee5\u662f\u5f02\u6784\u7684\u4e1a\u52a1\u7cfb\u7edf\uff0c\u90fd\u9700\u8981\u63d0\u4f9bEndpoint\u5b9e\u73b0\u96c6\u6210\u3002<\/li><li>\u901a\u9053\uff08Message Channel\uff09\uff1a\u4e24\u4e2a\u5e94\u7528\u4e4b\u95f4\u8fdb\u884c\u4fe1\u606f\u901a\u8baf\u7684\u901a\u9053\u3002<\/li><li>\u6d88\u606f\uff08Message\uff09\uff1aEndpoint\u4e4b\u95f4\u4ea4\u4e92\u7684\u6807\u51c6\u5316\u5355\u4f4d\u3002<\/li><li>\u8def\u7531\uff08Message Router\uff09\uff1a\u6839\u636e\u4e00\u5b9a\u7684\u6761\u4ef6\uff0c\u5c06\u6d88\u606f\u4f20\u9012\u7ed9\u4e0d\u540c\u7684\u8fc7\u6ee4\u5668\u4ee5\u5b9e\u73b0\u5bf9\u5355\u4e2a\u5904\u7406\u6b65\u9aa4\u7684\u89e3\u8026\u3002<\/li><li>\u8f6c\u6362\u5668\uff08Message Translator\uff09\uff1a\u6d88\u606f\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u8f6c\u6362\u548c\u6570\u636e\u6620\u5c04\uff0c\u5305\u62ec\u62a5\u6587\u683c\u5f0f\u8f6c\u6362\u548c\u5185\u5bb9\u8f6c\u6362\u6620\u5c04\u3002<\/li><li>\u7ba1\u9053\u548c\u8fc7\u6ee4\u5668\uff08Pipes &amp; Filters\uff09\uff1a\u5728\u4fdd\u6301\u72ec\u7acb\u6027\u548c\u7075\u6d3b\u6027\u7684\u57fa\u7840\u4e0a\uff0c\u5bf9\u590d\u6742\u7684\u6d88\u606f\u8fdb\u884c\u5904\u7406\u3002<\/li><\/ul>\n\n\n\n<p><strong><a rel=\"noreferrer noopener\" target=\"_blank\"><\/a>Camel\u7684\u5e94\u7528\u573a\u666f<\/strong><\/p>\n\n\n\n<ul><li>\u6d88\u606f\u6c47\u805a\uff1a\u6bd4\u5982\u5c06\u6765\u81ea\u4e0d\u540c\u670d\u52a1\u5668\u7684\u6570\u636e\uff0c\u6709ActiveMQ\u3001RabbitMQ\u3001WebService\u7b49\u7684\u6570\u636e\u5408\u6210\u62a5\u8868\u3002<\/li><li>\u6d88\u606f\u5206\u53d1\uff1a\u5c06\u6d88\u606f\u4ece\u6d88\u606f\u751f\u4ea7\u8005\u8f6c\u53d1\u7ed9\u6d88\u606f\u63a5\u6536\u8005\uff0c\u5206\u53d1\u65b9\u5f0f\u5206\u4e3a\u4e24\u79cd\uff1a\u987a\u5e8f\u5206\u53d1&amp;\u5e76\u884c\u5206\u53d1\u3002<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from(\"amqp:queue:order\")\n.to(\"uri:validateBean\", \"uri:handleBean\", \"uri:emailBean\");\n\nfrom(\"amqp:queue:order\")\n.multicast()\n.to(\"uri:validateBean\", \"uri:handleBean\", \"uri:emailBean\");\n<\/pre>\n\n\n\n<p>\u6d88\u606f\u8f6c\u6362\uff1a\u5c06\u6d88\u606f\u5185\u5bb9\u8fdb\u884c\u8f6c\u6362\uff0c\u6bd4\u5982xml\u8f6c\u4e3ajson\u683c\u5f0f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from(\"amqp:queue:order\")\n.process(new XmlToJsonProcessor())\n.to(\"bean:orderHandler\");\n<\/pre>\n\n\n\n<p>\u89c4\u5219\u5f15\u64ce\uff1a\u53ef\u4ee5\u4f7f\u7528Spring XML\u914d\u7f6e\u6216DSL\u6765\u5b9a\u4e49route\u3002\u540c\u65f6camel\u63d0\u4f9b\u4e86\u5927\u91cf\u5185\u7f6eProcessor\uff0c\u7528\u4e8e\u903b\u8f91\u8fd0\u7b97\u3001\u8fc7\u6ee4\u7b49\uff0c\u8fd9\u6837\u66f4\u5bb9\u6613\u7075\u6d3b\u7684\u7ba1\u7406route\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;route>\n    &lt;from uri=\"amqp:queue:order\"\/>\n    &lt;multicast>\n        &lt;to uri=\"uri:validateBean\"\/>\n        &lt;to uri=\"uri:handleBean\"\/>\n        &lt;to uri=\"uri:emailBean\"\/>\n    &lt;\/multicast>\n&lt;\/route>\n<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from(\"amqp:queue:order\")\n.filter(header(\"foo\")\n.isEqualTo(\"bar\"))\n.choice()\n.when(xpath(\"\/person\/city = &amp;#39;London&amp;#39;\"))\n  .to(\"file:target\/messages\/uk\")\n.otherwise()\n  .to(\"file:target\/messages\/others\");\n<\/pre>\n\n\n\n<p><strong>Camel\u7684\u6838\u5fc3\u8981\u7d20<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-1024x384.png\" alt=\"\" class=\"wp-image-8458\" width=\"447\" height=\"168\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-1024x384.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-300x113.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-768x288.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-830x311.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-230x86.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-350x131.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172-480x180.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-172.png 1424w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/figure><\/div>\n\n\n\n<p>Camel\u6709\u4ee5\u4e0b\u4e94\u8981\u7d20\uff1a<\/p>\n\n\n\n<ul><li>Endpoint\uff1a\u7528\u4e8e\u6536\u53d1\u6d88\u606f\u3002<\/li><li>Exchange\uff1a\u6d88\u606f\u672c\u4f53\u3002<\/li><li>Processor\uff1a\u6d88\u606f\u5904\u7406\u5668\u3002<\/li><li>Routing\uff1a\u8def\u7531\u89c4\u5219\u3002<\/li><li>Service\uff1aCamel\u57fa\u7840\u6982\u5ff5\u3002<\/li><\/ul>\n\n\n\n<p><strong>Message<\/strong><\/p>\n\n\n\n<p>org.apache.camel.Message\u662fCamel\u4e2d\u4e00\u4e2a\u57fa\u672c\u7684\u5305\u542b\u6570\u636e\u548c\u8def\u7531\u7684\u5b9e\u4f53\uff0cMessages\u5305\u542b\u4e86<\/p>\n\n\n\n<ul><li>\u552f\u4e00\u7684\u8bc6\u522b\uff08Unique Identifier\uff09&#8211;java.lang.String\u7c7b\u578b<\/li><li>\u5934\u4fe1\u606f\uff08Headers\uff09&#8211;\u4f1a\u63d0\u4f9b\u4e00\u4e9b\u5185\u5bb9\u7684\u63d0\u793a\uff0c\u5934\u4fe1\u606f\u88ab\u7ec4\u7ec7\u6210\u540d\u503c\u5bf9\u7684\u5f62\u5f0f\uff0cstring&#8211;&gt;Object<\/li><li>\u5185\u5bb9\uff08body\uff09\u662f\u4e00\u4e2aObject\u7c7b\u578b\u7684\u5bf9\u8c61\uff0c\u8fd9\u5c31\u610f\u5473\u7740\uff0c\u4f60\u8981\u786e\u4fdd\u63a5\u6536\u5668\u80fd\u591f\u7406\u89e3\u6d88\u606f\u7684\u5185\u5bb9\u3002\u5f53\u6d88\u606f\u53d1\u9001\u5668\u548c\u63a5\u6536\u5668\u4f7f\u7528\u4e0d\u540c\u7684\u5185\u5bb9\u683c\u5f0f\u7684\u65f6\u5019\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Camel\u7684\u6570\u636e\u8f6c\u6362\u673a\u5236\u5c06\u5176\u8f6c\u6362\u4e3a\u4e00\u4e2a\u7279\u5b9a\u7684\u683c\u5f0f\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u9884\u5148\u5b9a\u4e49\u7c7b\u578b\u53ef\u4ee5\u88ab\u81ea\u52a8\u8f6c\u6362\u3002<\/li><li>\u9519\u8bef\u6807\u8bb0(fault flag)\u4f7f\u7528\u6765\u6807\u8bb0\u6b63\u5e38\u6216\u8005\u9519\u8bef\u7684\u6807\u8bb0\uff0c\u901a\u5e38\u7531\u4e00\u4e9b\u6807\u51c6\u7c7b\u5b9a\u4e49\uff0c\u4f8b\u5982\uff08WSDL\uff09<\/li><\/ul>\n\n\n\n<p><strong>Endpoint<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-1024x964.png\" alt=\"\" class=\"wp-image-8459\" width=\"323\" height=\"303\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-1024x964.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-300x282.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-768x723.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-830x781.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-230x217.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173-480x452.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-173.png 1264w\" sizes=\"(max-width: 323px) 100vw, 323px\" \/><\/figure><\/div>\n\n\n\n<p>\u662fCamel\u4e2d\u7684\u4e00\u4e2a\u57fa\u672c\u6982\u5ff5\uff0cEndpoint\u4f5c\u4e3aCamel\u7cfb\u7edf\u4e2d\u4e00\u4e2a\u901a\u9053\u7684\u7aef\u70b9\uff0c\u53ef\u4ee5\u53d1\u9001\u6216\u8005\u63a5\u53d7\u6d88\u606f\u3002\u5728Camel\u4e2dEndpoint\u4f7f\u7528URI\u6765\u914d\u7f6e\u3002\u5728\u8fd0\u884c\u65f6Camel\u901a\u8fc7URI\u6765\u67e5\u627e\u7aef\u70b9\u3002\u7aef\u70b9\u7684\u529f\u80fd\u5f3a\u5927\u3001\u5168\u9762\u800c\u4e14\u53c8\u53ef\u7ef4\u62a4\u3002\u6765\u770b\u4e00\u4e9b\u4f8b\u5b50\u3002<\/p>\n\n\n\n<ul><li>Endpoint\u662fCamel\u4e0e\u5176\u4ed6\u7cfb\u7edf\u8fdb\u884c\u901a\u4fe1\u7684\u8bbe\u5b9a\u70b9\u3002<\/li><li>Camel\u81ea\u8eab\u63d0\u4f9b\u4e86\u5e7f\u6cdb\u7684\u901a\u4fe1\u534f\u8bae\u652f\u6301\uff0c\u4f8b\u5982\uff1aRPC\u534f\u8bae\u3001HTTP\u534f\u8bae\u3001FTP\u534f\u8bae\u2026\u2026<\/li><li>Camel\u4e2d\u7684Endpoint\u4f7f\u7528URI\u63cf\u8ff0\u5bf9\u76ee\u6807\u7cfb\u7edf\u7684\u901a\u4fe1\u3002<\/li><li>\u5bf9Endpoint\u5b9e\u4f8b\u7684\u521b\u5efa\u901a\u8fc7\u5bf9Camel\u4e2dorg.apche.camel.Component\u63a5\u53e3\u7684\u5b9e\u73b0\u6765\u5b9e\u73b0\u7684\u3002<\/li><li>Camel\u901a\u8fc7Plug\u65b9\u5f0f\u63d0\u4f9b\u5bf9\u5404\u79cd\u534f\u8bae\u7684Endpoint\u652f\u6301\uff0c\u5982\u679c\u9700\u8981\u4f7f\u7528\u67d0\u79cdEndpoint\uff0c\u9700\u8981\u5f15\u5165\u54cd\u5e94\u7684plug\u3002\u4f8b\u5982\u8981\u4f7f\u7528Camel\u5bf9Netty4-Endpoint\u7684\u652f\u6301\uff0c\u8981\u5f15\u5165camel-netty4\u7684\u4f9d\u8d56\u5305\u3002<br><\/li><\/ul>\n\n\n\n<p><strong>Component<\/strong><\/p>\n\n\n\n<p>Component\u662f\u4e00\u4e9bEndpoints URI\u7684\u96c6\u5408\u3002\u4ed6\u4eec\u901a\u8fc7\u8fde\u63a5\u7801\u6765\u94fe\u63a5\uff08\u4f8b\u5982file:,jms:\uff09\uff0c\u800c\u4e14\u4f5c\u4e3a\u4e00\u4e2aendpoint\u7684\u5de5\u5382\u3002\u73b0\u5728Camel\u4e2d\u53c8\u8d85\u8fc780\u4e2aComponent\u3002\u5f53\u7136\u4f60\u4e00\u53ef\u4ee5\u901a\u8fc7\u6269\u5c55org.apache.camel.impl.DefaultComponent\u6765\u5b9e\u73b0\u81ea\u5df1\u7684Component<\/p>\n\n\n\n<p><strong>Exchange<\/strong><\/p>\n\n\n\n<p>org.apache.camel.Exchange \u662f\u4e00\u4e2a\u6d88\u606f\u4e4b\u95f4\u901a\u4fe1\u7684\u62bd\u8c61\u7684\u4f1a\u8bdd\u3002\u4e0b\u9762\u5217\u51fa\u7684\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u4f1a\u8bdd\uff0c\u4f7f\u5f97\u7ec4\u4ef6\u66f4\u4e3a\u5168\u9762<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-1024x867.png\" alt=\"\" class=\"wp-image-8461\" width=\"414\" height=\"350\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-1024x867.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-300x254.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-768x650.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-830x703.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-230x195.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-350x296.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174-480x407.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-174.png 1398w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><\/figure><\/div>\n\n\n\n<ul><li>Properties\uff1aExchange\u5bf9\u8c61\u8d2f\u7a7f\u6574\u4e2a\u8def\u7531\u6267\u884c\u8fc7\u7a0b\u4e2d\u7684\u63a7\u5236\u7aef\u70b9\u3001\u5904\u7406\u5668\u751a\u81f3\u8fd8\u6709\u8868\u8fbe\u5f0f\u3001\u8def\u7531\u6761\u4ef6\u5224\u65ad\u3002\u4e3a\u4e86\u8ba9\u8fd9\u4e9b\u5143\u7d20\u80fd\u591f\u5171\u4eab\u4e00\u4e9b\u5f00\u53d1\u4eba\u5458\u81ea\u5b9a\u4e49\u7684\u53c2\u6570\u914d\u7f6e\u4fe1\u606f\uff0cExchange\u4ee5K-V\u7ed3\u6784\u63d0\u4f9b\u4e86\u8fd9\u6837\u7684\u53c2\u6570\u914d\u7f6e\u4fe1\u606f\u5b58\u50a8\u65b9\u5f0f\u3002<\/li><li>Patterns\uff1aExchange\u4e2d\u7684pattern\u5c5e\u6027\u975e\u5e38\u91cd\u8981\uff0c\u5b83\u7684\u5168\u79f0\u662f\uff1aExchangePattern\uff08\u4ea4\u6362\u5668\u5de5\u4f5c\u6a21\u5f0f\uff09\u3002\u5176\u5b9e\u73b0\u662f\u4e00\u4e2a\u679a\u4e3e\u7c7b\u578b\uff1aorg.apache.camel.ExchangePattern\u3002\u53ef\u4ee5\u4f7f\u7528\u7684\u503c\u5305\u62ec\uff1aInOnly, RobustInOnly, InOut, InOptionalOut, OutOnly, RobustOutOnly, OutIn, OutOptionalIn\u3002\u4eceCamel\u5b98\u65b9\u5df2\u516c\u5e03\u7684\u6587\u6863\u6765\u770b\uff0c\u8fd9\u4e2a\u5c5e\u6027\u63cf\u8ff0\u4e86Exchange\u4e2d\u6d88\u606f\u7684\u4f20\u64ad\u65b9\u5f0f\u3002<\/li><li>Message IN\/OUT\uff1a\u5f53Endpoint\u548cProcessor\u3001Processor\u548cProcessor\u95f4\u7684Message\u5728Exchange\u4e2d\u4f20\u9012\u65f6\uff0cExchange\u4f1a\u81ea\u52a8\u5c06\u4e0a\u4e00\u4e2a\u5143\u7d20\u7684\u8f93\u51fa\u4f5c\u4e3a\u8fd9\u4e2a\u5143\u7d20\u7684\u8f93\u5165\u4f7f\u7528\u3002<br><\/li><\/ul>\n\n\n\n<p><strong>Processor<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175.png\" alt=\"\" class=\"wp-image-8462\" width=\"447\" height=\"307\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175.png 996w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175-300x207.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175-768x529.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175-830x572.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175-230x158.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175-350x241.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-175-480x331.png 480w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/figure><\/div>\n\n\n\n<p>Processor\u7528\u4e8e\u63a5\u53d7\u4eceEndpoint\u3001Routing\u6216\u8005\u53e6\u4e00\u4e2aProcessor\u7684Exchange\u4e2d\u4f20\u6765\u7684\u6d88\u606f\uff0c\u5e76\u8fdb\u884c\u5904\u7406\u3002<br>Camel\u6838\u5fc3\u5305\u548c\u5404\u4e2aPlugin\u7ec4\u4ef6\u90fd\u63d0\u4f9b\u4e86\u5f88\u591aProcessor\u7684\u5b9e\u73b0\uff0c\u5f00\u53d1\u4eba\u5458\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5b9e\u73b0org.apache.camel.Processor\u63a5\u53e3\u81ea\u5b9a\u4e49Processor\u3002<\/p>\n\n\n\n<p>org.apache.camel.Processor \u662f\u4e00\u4e2a\u6d88\u606f\u63a5\u53d7\u8005\u548c\u6d88\u606f\u901a\u4fe1\u7684\u5904\u7406\u5668\u3002\u5f53\u7136\uff0cProcessor\u662fRoute\u7684\u4e00\u4e2a\u5143\u7d20\uff0c\u53ef\u7528\u6765\u6d88\u606f\u683c\u5f0f\u8f6c\u6362\u6216\u8005\u5176\u4ed6\u7684\u4e00\u4e9b\u53d8\u6362\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u4e00\u4e2a\u81ea\u5b9a\u4e49\u5904\u7406\u5668\u7684\u5b9e\u73b0\npublic class OtherProcessor implements Processor {\n    @Override\n    public void process(Exchange exchange) throws Exception {\n        Message message = exchange.getIn();\n        String body = message.getBody().toString();\n        \/\/===============\n        \/\/ \u60a8\u53ef\u4ee5\u5728\u8fd9\u91cc\u8fdb\u884c\u6570\u636e\u683c\u5f0f\u8f6c\u6362\n        \/\/ \u5e76\u4e14\u5c06\u7ed3\u679c\u5b58\u50a8\u5230out message\u4e2d\n        \/\/===============\n        \/\/ \u5b58\u5165\u5230exchange\u7684out\u533a\u57df\n        if(exchange.getPattern() == ExchangePattern.InOut) {\n            Message outMessage = exchange.getOut();\n            outMessage.setBody(body + \" || other out\");\n        }\n    }\n}\n<\/pre>\n\n\n\n<p><strong>Routing<\/strong><\/p>\n\n\n\n<p><strong>Routing<\/strong>\u7528\u4e8e\u5904\u7406Endpoint\u548cProcessor\u4e4b\u95f4\u3001Processor\u548cProcessor\u4e4b\u95f4\u7684\u8def\u7531\u8df3\u8f6c\u3002<br>Camel\u4e2d\u652f\u6301\u7684\u8def\u7531\u89c4\u5219\u975e\u5e38\u4e30\u5bcc\uff0c\u5305\u62ec\u57fa\u4e8e\u5185\u5bb9\u3001\u63a5\u6536\u8005\u5217\u8868\u3001\u5faa\u73af\u52a8\u6001\u8def\u7531\u7b49\u3002<\/p>\n\n\n\n<p>\u987e\u540d\u601d\u4e49\uff0cRoute\uff0c\u5c31\u662f\u8def\u7531\uff0c\u5b83\u5b9a\u4e49\u4e86Message\u5982\u4f55\u5728\u4e00\u4e2a\u7cfb\u7edf\u4e2d\u4f20\u8f93\u7684\u771f\u5b9e\u8def\u5f84\u6216\u8005\u901a\u9053\u3002\u8def\u7531\u5f15\u64ce\u81ea\u8eab\u5e76\u4e0d\u66b4\u9732\u7ed9\u5f00\u53d1\u8005\uff0c\u4f46\u662f\u5f00\u53d1\u8005\u53ef\u4ee5\u81ea\u5df1\u5b9a\u4e49\u8def\u7531\uff0c\u5e76\u4e14\u9700\u8981\u4fe1\u4efb\u5f15\u64ce\u53ef\u4ee5\u5b8c\u6210\u590d\u6742\u7684\u4f20\u8f93\u5de5\u4f5c\u3002\u6bcf\u4e2a\u8def\u7531\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684\u6807\u8bc6\u7b26\uff0c\u7528\u6765\u8bb0\u5f55\u65e5\u5fd7\u3001\u8c03\u8bd5\u3001\u76d1\u63a7\uff0c\u4ee5\u53ca\u542f\u52a8\u6216\u8005\u505c\u6b62\u8def\u7531\u3002<\/p>\n\n\n\n<p>\u8def\u7531\u4e5f\u6709\u4e00\u4e2a\u8f93\u5165\u7684Message\uff0c\u56e0\u6b64\u4ed6\u4eec\u4e5f\u6709\u6548\u7684\u94fe\u63a5\u5230\u4e00\u4e2a\u8f93\u5165\u7aef\u70b9\u3002\u8def\u7531\u5b9a\u4e49\u4e86\u4e00\u79cd\u9886\u57df\u7279\u6709\u7684\u8bed\u8a00\uff08DSL\uff09\u3002Camel\u63d0\u4f9b\u4e86java\u3001scala\u548c\u57fa\u4e8eXM\u7684Route-DSL\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-1024x814.png\" alt=\"\" class=\"wp-image-8463\" width=\"457\" height=\"362\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-1024x814.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-300x238.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-768x610.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-1536x1221.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-830x660.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-230x183.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-350x278.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176-480x381.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-176.png 1558w\" sizes=\"(max-width: 457px) 100vw, 457px\" \/><\/figure><\/div>\n\n\n\n<p>\u793a\u4f8b\u8def\u7531\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/simple route.\nfrom(\"file:data\/inbox\").to(\"jms:queue:order\")<\/pre>\n\n\n\n<p>\u8def\u7531\u53ef\u4ee5\u4f7f\u7528\u8fc7\u6ee4\u5668\u3001\u591a\u64ad\u3001\u63a5\u6536\u5217\u8868\u3001\u5e76\u884c\u5904\u7406\u6765\u5b9a\u4e49\uff0c\u4ece\u800c\u53d8\u5f97\u975e\u5e38\u7075\u6d3b\u3002\u7531\u4e8e\u8fd9\u7bc7\u6587\u7ae0\u53ea\u662f\u7b80\u5355\u7684\u4ecb\u7ecdCamel\uff0c\u6211\u8fd9\u91cc\u53ea\u7ed9\u51fa\u4e00\u4e2a\u6ce8\u91ca\u7684\u4f8b\u5b50\u3002\u8fd9\u4e2a\u4f7f\u7528\u4e86\u201cdirect:\u201d\u67b6\u6784\uff0c\u4ed6\u63d0\u4f9b\u4e86\u5f53\u6d88\u606f\u751f\u4ea7\u8005\u53d1\u51fa\u6d88\u606f\u540e\u76f4\u63a5\u7684\u3001\u540c\u6b65\u7684\u8c03\u7528\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/Every 10 seconds timer sends an Exchange to direct:prepare\nfrom(\"timer:\/\/foo?fixedRate=true&amp;period=10000\").to(\"direct:prepare\");\n\/\/ Onother Routes can begin from \"direct:prepare\"\n\/\/ This now depends on timer, logging and putting a message to the queue.\nfrom(direct:prepare).to(\"log:com.mycompany.order?level=DEBUG\").to(\"jms:queue:order?jmsMessageType=Text\");<\/pre>\n\n\n\n<p><strong>Service<\/strong><\/p>\n\n\n\n<p>\u5728Apache Camel\u4e2d\u6709\u4e00\u4e2a\u6bd4Endpoint\u3001Component\u3001CamelContext\u7b49\u5143\u7d20\u66f4\u57fa\u7840\u7684\u6982\u5ff5\u5143\u7d20\uff1aService\u3002<br>\u5305\u62ecEndpoint\u3001Component\u3001CamelContext\u7b49\u5143\u7d20\u5728\u5185\u7684\u5927\u591a\u6570\u5de5\u4f5c\u5728Camel\u4e2d\u7684\u5143\u7d20\uff0c\u90fd\u662f\u4e00\u4e2a\u4e00\u4e2a\u7684Service\u3002<br>Camel\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u6bcf\u4e00\u4e2aService\u90fd\u662f\u72ec\u7acb\u8fd0\u884c\u7684\uff0c\u5404\u4e2aService\u7684\u5173\u8054\u8854\u63a5\u901a\u8fc7CamelContext\u4e0a\u4e0b\u6587\u5bf9\u8c61\u5b8c\u6210\u3002\u6bcf\u4e00\u4e2aService\u901a\u8fc7\u8c03\u7528start()\u65b9\u6cd5\u88ab\u6fc0\u6d3b\u5e76\u53c2\u4e0e\u5230Camel\u5e94\u7528\u7a0b\u5e8f\u7684\u5de5\u4f5c\u4e2d\uff0c\u76f4\u5230\u5b83\u7684stop()\u65b9\u6cd5\u88ab\u8c03\u7528\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u6bcf\u4e2aService\u90fd\u6709\u72ec\u7acb\u7684\u751f\u547d\u5468\u671f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-1020x1024.png\" alt=\"\" class=\"wp-image-8464\" width=\"481\" height=\"483\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-1020x1024.png 1020w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-300x300.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-150x150.png 150w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-768x771.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-830x833.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-230x231.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-350x351.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177-480x482.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-177.png 1432w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/figure><\/div>\n\n\n\n<p><br><strong>CamelContext\u4e0a\u4e0b\u6587<\/strong><\/p>\n\n\n\n<p><strong>CamelContext<\/strong>\u6a2a\u8de8\u4e86Camel\u670d\u52a1\u7684\u6574\u4e2a\u751f\u547d\u5468\u671f\uff0c\u5e76\u4e14\u4e3aCamel\u670d\u52a1\u7684\u5de5\u4f5c\u73af\u5883\u63d0\u4f9b\u652f\u6491\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u8ba9\u6211\u4eec\u6765\u770b\u770b\u4e00\u5f20\u56fe\uff0c\u6211\u4eec\u770b\u5230\u7684\u662f\u4e00\u4e9b\u4e0d\u540c\u7684\u76f8\u4e92\u94fe\u63a5\u7684\u6784\u4ef6\uff0c\u800c\u5728\u4ed6\u4eec\u4e2d\u95f4\u8d77\u94fe\u63a5\u4f5c\u7528\u7684\u7c98\u5408\u5242\u5c31\u662fCamel Context\u4e86\u3002\u4ed6\u5c06\u5b9e\u4f53\u94fe\u63a5\u4e00\u8d77\uff0c\u6709\u7684\u65f6\u5019\u88ab\u79f0\u4e3aCamel\u8fd0\u884c\u662f\u5bb9\u5668\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-1024x916.png\" alt=\"\" class=\"wp-image-8466\" width=\"471\" height=\"421\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-1024x916.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-300x268.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-768x687.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-830x743.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-230x206.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-350x313.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178-480x430.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-178.png 1046w\" sizes=\"(max-width: 471px) 100vw, 471px\" \/><\/figure><\/div>\n\n\n\n<p><strong>\u4ee3\u7801\u5b9e\u8df5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5f15\u5165\u76f8\u5173Jar\u5305<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        &lt;!-- apache camel -->\n        &lt;dependency>\n            &lt;groupId>org.apache.camel&lt;\/groupId>\n            &lt;artifactId>camel-core&lt;\/artifactId>\n            &lt;version>2.24.2&lt;\/version>\n        &lt;\/dependency>\n        &lt;!-- apache camel \u96c6\u6210 activemq\u4e2d\u95f4\u4ef6 -->\n        &lt;dependency>\n            &lt;groupId>org.apache.activemq&lt;\/groupId>\n            &lt;artifactId>activemq-camel&lt;\/artifactId>\n            &lt;version>5.15.4&lt;\/version>\n        &lt;\/dependency>\n<\/pre>\n\n\n\n<p><strong>\u4f20\u8f93\u6587\u4ef6\u5230\u6d88\u606f\u4ef6<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void main(String[] args) throws Exception {\n        DefaultCamelContext context = new DefaultCamelContext();\n        ActiveMQConnectionFactory connectionFactory =\n                new ActiveMQConnectionFactory(\"admin\",\"admin\",\"http:\/\/172.16.2.221:8161\");\n        context.addComponent(\"activemq\", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"file:input_box?noop=true\")\n                        .to(\"activemq:queue:my_queue\");\n            }\n        });\n        context.start();\n}<\/pre>\n\n\n\n<p><strong>\u4f20\u8f93\u5bf9\u8c61\u5230\u6d88\u606f\u4e2d\u95f4\u4ef6<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void main(String[] args) throws Exception {\n        DefaultCamelContext context = new DefaultCamelContext();\n        ActiveMQConnectionFactory connectionFactory =\n                new ActiveMQConnectionFactory(\"admin\",\"admin\",\"tcp:\/\/172.16.2.221:61616\");\n        context.addComponent(\"activemq\", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"direct:start\")\n                        .to(\"activemq:queue:my_queue\");\n            }\n        });\n        context.start();\n        ProducerTemplate producerTemplate = context.createProducerTemplate();\n        producerTemplate.sendBody(\"direct:start\",\"\u6d4b\u8bd5\u6d88\u606f\");\n    }<\/pre>\n\n\n\n<p><strong>\u751f\u4ea7\u8005\u548c\u6d88\u8d39\u8005\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>process\u662f\u4e00\u4e2a\u5904\u7406\u5668\uff0c\u53ef\u4ee5\u5904\u7406\u6d88\u8d39\u8005\u6d88\u8d39\u6d88\u606f\u4e4b\u524d\u7684\u6d88\u606f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void main(String[] args) throws Exception {\n        DefaultCamelContext context = new DefaultCamelContext();\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"direct:start\")\n                        .process(new Processor() {\n                            @Override\n                            public void process(Exchange exchange) throws Exception {\n                                System.out.println(\"\u8fdb\u5165\u6d88\u606f\u5904\u7406\u5668...\");\n                                \/\/\u63d0\u4f9b\u8005\u53d1\u9001\u7684\u6d88\u606f\n                                String msg = exchange.getIn().getBody(String.class);\n                                msg = msg + \"-By FanJiangFeng\";\n                                System.out.println(\"\u6d88\u606f\u88ab\u6211\u4fee\u6539\u6210\uff1a\"+msg);\n                                \/\/\u91cd\u65b0\u53d1\u9001\n                                exchange.getOut().setBody(msg);\n                            }\n                        })\n                        .to(\"seda:end\");\n            }\n        });\n\n        context.start();\n        \/\/\u63d0\u4f9b\u8005\n        ProducerTemplate producerTemplate = context.createProducerTemplate();\n        producerTemplate.sendBody(\"direct:start\",\"Hello Everyone\");\n\n        \/\/\u6d88\u8d39\u8005\n        ConsumerTemplate consumerTemplate = context.createConsumerTemplate();\n        String message = consumerTemplate.receiveBody(\"seda:end\", String.class);\n\n        System.out.println(\"\u6d88\u8d39\u8005\u53d6\u51fa\u7684\u6d88\u606f\uff1a\"+message);\n\n    }<\/pre>\n\n\n\n<p><strong>\u6d88\u606f\u751f\u4ea7\u8005\u751f\u4ea7\u7684\u6570\u636e\u4e3a\u6570\u636e\u5e93\u4e2dsql\u67e5\u8be2\u5230\u7684\u6570\u636e<\/strong><\/p>\n\n\n\n<p>\u9700\u8981Jar\u5305<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\t&lt;!-- apache camel \u96c6\u6210 \u6570\u636e\u5e93 -->\n        &lt;dependency>\n            &lt;groupId>org.apache.camel&lt;\/groupId>\n            &lt;artifactId>camel-jdbc&lt;\/artifactId>\n            &lt;version>2.22.1&lt;\/version>\n        &lt;\/dependency>\n        &lt;dependency>\n            &lt;groupId>mysql&lt;\/groupId>\n            &lt;artifactId>mysql-connector-java&lt;\/artifactId>\n            &lt;version>5.1.47&lt;\/version>\n        &lt;\/dependency>\n<\/pre>\n\n\n\n<p>\u6d4b\u8bd5\u7c7b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static void main(String[] args) throws Exception {\n        MysqlDataSource dataSource = new MysqlDataSource();\n        dataSource.setURL(\"jdbc:mysql:\/\/localhost:3306\/test\");\n        dataSource.setUser(\"root\");\n        dataSource.setPassword(\"1234\");\n\n        SimpleRegistry simpleRegistry = new SimpleRegistry();\n        simpleRegistry.put(\"myDataSource\",dataSource);\n\n        DefaultCamelContext context = new DefaultCamelContext(simpleRegistry);\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"direct:start\")\n                        .to(\"jdbc:myDataSource\")\n                        .bean(new ResultHandlerTest(),\"printResult\");\n            }\n        });\n\n        context.start();\n        \/\/\u751f\u4ea7\u8005\n        ProducerTemplate producerTemplate = context.createProducerTemplate();\n        producerTemplate.sendBody(\"direct:start\",\"select * from user\");\n    }\n\n    public static class ResultHandlerTest{\n        private void printResult(List list){\n            for(int i=0;i&lt;list.size();i++){\n                System.out.println(list.get(i));\n            }\n        }\n    }<\/pre>\n\n\n\n<p><strong>\u6d88\u606f\u751f\u4ea7\u8005\u53d1\u9001\u6d88\u606f\uff0c\u7531\u67d0\u4e2a\u7c7b\u7684\u67d0\u4e2a\u65b9\u6cd5\u8fdb\u884c\u6d88\u8d39\u6d88\u606f\uff08\u7b2c\u4e00\u79cd\u65b9\u5f0f\uff09<\/strong><\/p>\n\n\n\n<p>\u6d88\u606f\u751f\u4ea7\u8005\u53d1\u9001\u6d88\u606f\uff0c\u7531\u67d0\u4e2a\u7c7b\u7684\u67d0\u4e2a\u65b9\u6cd5\u8fdb\u884c\u6d88\u8d39\u6d88\u606f\uff08\u6b64\u65b9\u6cd5\u5fc5\u987b\u4e3apublic\u65b9\u6cd5\uff0c\u5426\u5219\u62a5\u65b9\u6cd5\u627e\u4e0d\u5230\u7684\u5f02\u5e38\uff09<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class CallMethodUsingClassComponent {\n\n    public void consumerMethod(String message){\n        System.out.println(\"\u6d88\u8d39\u8005\u65b9\u6cd5\u63a5\u6536\u6d88\u606f\uff1a\"+ message);\n    }\n\n    public static void main(String[] args) throws Exception{\n        DefaultCamelContext context = new DefaultCamelContext();\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"direct:start\")\n                        .to(\"class:com.ftx.camel.test.CallMethodUsingClassComponent?method=consumerMethod\");\n            }\n        });\n        context.start();\n        \/\/\u521b\u5efa\u6d88\u606f\u751f\u4ea7\u8005\n        ProducerTemplate producerTemplate = context.createProducerTemplate();\n        producerTemplate.sendBody(\"direct:start\",\"\u6d4b\u8bd5\u6d88\u606f\");\n    }\n}<\/pre>\n\n\n\n<p><strong>\u6d88\u606f\u751f\u4ea7\u8005\u53d1\u9001\u6d88\u606f\uff0c\u7531\u67d0\u4e2a\u7c7b\u7684\u67d0\u4e2a\u65b9\u6cd5\u8fdb\u884c\u6d88\u8d39\u6d88\u606f(\u7b2c\u4e8c\u79cd\u65b9\u5f0f)<\/strong><\/p>\n\n\n\n<p>\u6b64\u65b9\u6cd5\u5fc5\u987b\u4e3apublic\u65b9\u6cd5\uff0c\u5426\u5219\u62a5\u65b9\u6cd5\u627e\u4e0d\u5230\u7684\u5f02\u5e38<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class CallMethodUsingClassComponent2 {\n\n    public void consumerMethod(String message){\n        System.out.println(\"\u6d88\u8d39\u8005\u65b9\u6cd5\u63a5\u6536\u6d88\u606f\uff1a\"+ message);\n    }\n\n    public static void main(String[] args) throws Exception{\n\n        CallMethodUsingClassComponent2 callMethodUsingClassComponent = new CallMethodUsingClassComponent2();\n        SimpleRegistry registry = new SimpleRegistry();\n        registry.put(\"myService\",callMethodUsingClassComponent);\n\n        DefaultCamelContext context = new DefaultCamelContext(registry);\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"direct:start\")\n                        .to(\"bean:myService?method=consumerMethod\");\n            }\n        });\n        context.start();\n        \/\/\u521b\u5efa\u6d88\u606f\u751f\u4ea7\u8005\n        ProducerTemplate producerTemplate = context.createProducerTemplate();\n        producerTemplate.sendBody(\"direct:start\",\"\u6d4b\u8bd5\u6d88\u606f\");\n    }\n}<\/pre>\n\n\n\n<p><strong>\u6d88\u8d39\u8005\u4eceactiveMQ\u4e2d\u6d88\u8d39\u6d88\u606f<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public class ActiveMQConsumer {\n    public static void main(String[] args) throws Exception {\n        DefaultCamelContext context = new DefaultCamelContext();\n        ActiveMQConnectionFactory connectionFactory =\n                new ActiveMQConnectionFactory(\"admin\",\"admin\",\"tcp:\/\/172.16.2.221:61616\");\n        context.addComponent(\"activemq\", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));\n        context.addRoutes(new RouteBuilder() {\n            @Override\n            public void configure() throws Exception {\n                from(\"activemq:queue:my_queue\").to(\"seda:end\");\n            }\n        });\n        context.start();\n        ConsumerTemplate consumerTemplate = context.createConsumerTemplate();\n        String message = consumerTemplate.receiveBody(\"seda:end\", String.class);\n        System.out.println(message);\n    }\n}<\/pre>\n\n\n\n<p><strong>\u8865\u5145\uff1a\u5173\u4e8e&#8221;direct:start&#8221;<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from(\"direct:start\")\n.to(\"http:\/\/myhost\/mypath\");<\/pre>\n\n\n\n<p>\u4e0a\u9762\u7684&#8221;direct:start&#8221;\u53ea\u662f\u8bf4\u8def\u7531\uff0c\u4ee5<a rel=\"noreferrer noopener\" href=\"http:\/\/camel.apache.org\/direct. html\" target=\"_blank\"><\/a>\u76f4\u63a5\u7aef\u70b9\u63d0\u4f9b\u8def\u7531\u7684\u540c\u6b65\u8c03\u7528.\u5982\u679c\u8981\u5c06<code>Exchange<\/code>\u53d1\u9001\u5230direct:start\u7aef\u70b9\uff0c\u5219\u53ef\u4ee5\u521b\u5efa<code>ProducerTemplate<\/code>\u5e76\u4f7f\u7528\u5404\u79cd\u53d1\u9001\u65b9\u6cd5.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-1024x156.png\" alt=\"\" class=\"wp-image-8746\" width=\"628\" height=\"95\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-1024x156.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-300x46.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-768x117.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-830x127.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-230x35.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-350x53.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291-480x73.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-291.png 1244w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/figure><\/div>\n\n\n\n<ul><li><strong>Direct Component<\/strong><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u57fa\u4e8e\u5185\u5b58\u7684<strong>\u540c\u6b65\u6d88\u606f\u7ec4\u4ef6<\/strong><\/p>\n\n\n\n<p>\u4f7f\u7528Direct\u7ec4\u4ef6\uff0c\u751f\u4ea7\u8005\u76f4\u63a5\u8c03\u7528\u6d88\u8d39\u8005\u3002\u56e0\u6b64\u4f7f\u7528Direct\u7ec4\u4ef6\u7684\u552f\u4e00\u5f00\u9500\u662f\u65b9\u6cd5\u8c03\u7528\u3002<\/p>\n\n\n\n<p><strong>Direct\u7684\u7ebf\u7a0b\u6a21\u578b<\/strong>\uff1a\u7531\u4e8e\u751f\u4ea7\u8005\u76f4\u63a5\u8c03\u7528\u6d88\u8d39\u8005<\/p>\n\n\n\n<p>\u56e0\u6b64\uff1a\u8c03\u7528\u8005\u4e0ecamel\u7684\u6d88\u8d39\u8005\u5171\u7528\u4e00\u4e2a\u7ebf\u7a0b<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-1024x545.png\" alt=\"\" class=\"wp-image-8747\" width=\"552\" height=\"294\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-1024x545.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-300x160.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-768x409.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-1536x818.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-830x442.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-230x122.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-350x186.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292-480x256.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-292.png 1690w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/figure><\/div>\n\n\n\n<p><a href=\"https:\/\/camel.apache.org\/components\/next\/direct-component.html\">https:\/\/camel.apache.org\/components\/next\/direct-component.html<\/a><\/p>\n\n\n\n<ul><li><strong>SEDA Component<\/strong><\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u57fa\u4e8e\u5185\u5b58\u7684<strong>\u5f02\u6b65\u6d88\u606f\u7ec4\u4ef6<\/strong>\uff1a\u751f\u4ea7\u8005\u548c\u6d88\u8d39\u8005\u901a\u8fc7BlockingQueue\u4ea4\u6362\u6d88\u606f\uff0c\u751f\u4ea7\u8005\u4e0e\u6d88\u8d39\u8005\u662f\u4e0d\u540c\u7684\u7ebf\u7a0b<\/p>\n\n\n\n<p>\u5982\u679cVM\u5728\u6d88\u606f\u5c1a\u672a\u5904\u7406\u65f6\u7ec8\u6b62\uff0c\u5219seda\u4e0d\u4f1a\u5b9e\u73b0\u6d88\u606f\u7684\u6301\u4e45\u5316\u6216\u6062\u590d\uff0c\u56e0\u6b64\u6709\u4e22\u5931\u6d88\u606f\u7684\u98ce\u9669<\/p>\n\n\n\n<p><strong>\u6d88\u8d39\u8005\u89c6\u89d2<\/strong><\/p>\n\n\n\n<p><strong>Consumer thread pool<\/strong>\uff1aSedaConsumer\u5185\u90e8\u6301\u6709\u4e00\u4e2a\u7ebf\u7a0b\u6c60\uff0c\u9ed8\u8ba4\u662f1\u4e2a\u7ebf\u7a0b\uff0c\u53ef\u4ee5\u901a\u8fc7<strong>concurrentConsumers<\/strong>\u6307\u5b9a\u7ebf\u7a0b\u6570<\/p>\n\n\n\n<p>\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from(\"seda:start?concurrentConsumers=2\")\n    .to(\"log:A\")\n    .to(\"log:B\");\n <\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-1024x640.png\" alt=\"\" class=\"wp-image-8748\" width=\"527\" height=\"329\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-1024x640.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-300x188.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-768x480.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-1536x960.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-830x519.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-230x144.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-350x219.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293-480x300.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-293.png 1616w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/figure><\/div>\n\n\n\n<p>Consumer thread pool\u4e2d\u7684\u6bcf\u4e2a\u7ebf\u7a0b\uff0c\u8fd8\u53ef\u4ee5\u5f00\u542f\u65b0\u7684\u7ebf\u7a0b\u6c60\uff0c\u4ee3\u7801\u5982\u4e0b\u6240\u793a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    from(\"seda:start?concurrentConsumers=2\")\n                .to(\"log:A\")\n                \/\/ create a thread pool with a pool size of 5 and a maxi- mum size of 10.\n                .threads(5, 10) \n                .to(\"log:B\");\n     <\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-1024x634.png\" alt=\"\" class=\"wp-image-8749\" width=\"534\" height=\"331\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-1024x634.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-300x186.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-768x475.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-1536x951.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-830x514.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-230x142.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-350x217.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294-480x297.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2022\/11\/\u56fe\u7247-294.png 1638w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><figcaption>\u5982\u4e0a\u56fe\u6240\u793a\uff1aconsumer\u7ebf\u7a0b\u6267\u884c\u5b8c&#8221;log:A&#8221;\u540e\uff0c\u5c06\u540e\u7eed\u4efb\u52a1\u63d0\u4ea4\u7ed9&#8221;Threads thead pool&#8221;,\u7136\u540e\u5c31\u76f4\u63a5\u8fd4\u56de\u4e86<\/figcaption><\/figure><\/div>\n\n\n\n<p><strong>\u751f\u4ea7\u8005\u89c6\u89d2<\/strong><\/p>\n\n\n\n<p>\u5f02\u6b65\u53d1\u9001\u6d88\u606f\uff1a\u751f\u4ea7\u8005\u53d1\u5b8c\u6d88\u606f\uff0c\u7acb\u523b\u8fd4\u56de\uff0c\u4e0d\u9700\u8981\u7b49\u5f85\u6d88\u606f\u6d88\u8d39\u6210\u529f<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> \/\/InOnly\u6d88\u606f\u6a21\u5f0f\n producerTemplate.sendBody(\"seda:start\", body);<\/pre>\n\n\n\n<p>\u540c\u6b65\u53d1\u9001\u6d88\u606f\uff1a\u751f\u4ea7\u8005\u53d1\u5b8c\u6d88\u606f\uff0c\u4f1a\u963b\u585e\uff0c\u76f4\u5230\u6d88\u8d39\u6210\u529f<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> \/\/InOut\u6d88\u606f\u6a21\u5f0f\n producerTemplate.requestBody(\"seda:start\", body);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u8981\u89e3\u51b3\u7684\u95ee\u9898 \u5b8c\u6210\u7ec4\u7ec7\u5185\u5916\u7684\u5404\u79cd\u5f02\u6784\u7cfb\u7edf\u3001\u5e94\u7528\u3001\u6570\u636e\u6e90\u4e4b\u95f4\u5171\u4eab\u548c\u4ea4\u6362\u4fe1\u606f\u3002 \u4f18\u5316\u73b0\u6709\u7ed3\u6784\uff0c\u4f7f\u6574\u4e2a\u7cfb\u7edf\u6613\u4e8e\u62d3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/8449"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8449"}],"version-history":[{"count":7,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/8449\/revisions"}],"predecessor-version":[{"id":8752,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/8449\/revisions\/8752"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}