{"id":368416,"date":"2024-05-21T03:42:11","date_gmt":"2024-05-21T03:42:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=368416"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=368416","title":{"rendered":"<span>\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 RabbitMQ \u0432 Docker<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0417\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u044d\u0442\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c. \u0425\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0432 \u0431\u043e\u044e \u043f\u0440\u0430\u043a\u0442\u0438\u043a, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0442\u0430\u043a\u0438\u043c\u0438 \u0433\u0438\u0433\u0430\u043d\u0442\u0430\u043c\u0438, \u043a\u0430\u043a <a href=\"https:\/\/www.nginx.com\/blog\/microservices-at-netflix-architectural-best-practices\/\">Netflix<\/a> \u0438 <a href=\"https:\/\/eng.uber.com\/building-tincup\/\">Uber<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0418 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437 \u043d\u0438\u0445.\u00a0<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u0422\u0430\u043a\u0430\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"http:\/\/microservices.io\/patterns\/decomposition\/decompose-by-subdomain.html\">\u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d\u043e\u0432<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u0411\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435, \u0441 \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u041e\u043d\u0438 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0441\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 (\u0431\u0435\u0437 <abbr class=\"habraabbr\" title=\"\u0430\u043d\u0433\u043b. single point of failure \u2014 \u0415\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430. \u0423\u0437\u0435\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0442\u043a\u0430\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0451 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438\" data-title=\"&lt;p>\u0430\u043d\u0433\u043b. single point of failure \u2014 \u0415\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430. \u0423\u0437\u0435\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0442\u043a\u0430\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0451 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438&lt;\/p>&#187; data-abbr=&#187;SPOF&#187;>SPOF<\/abbr>). \u0412\u043e\u0437\u044c\u043c\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u0440\u043e\u0434\u0430\u0436\u0435\u0439 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/375\/b70\/02f\/375b7002f7a03714c2ce07008477a8d1.png\" alt=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/codeburst.io\/build-a-nodejs-cinema-api-gateway-and-deploying-it-to-docker-part-4-703c2b0dd269\" title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/codeburst.io\/build-a-nodejs-cinema-api-gateway-and-deploying-it-to-docker-part-4-703c2b0dd269\" width=\"880\" height=\"565\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/375\/b70\/02f\/375b7002f7a03714c2ce07008477a8d1.png\"\/><\/p>\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"https:\/\/codeburst.io\/build-a-nodejs-cinema-api-gateway-and-deploying-it-to-docker-part-4-703c2b0dd269\">https:\/\/codeburst.io\/build-a-nodejs-cinema-api-gateway-and-deploying-it-to-docker-part-4-703c2b0dd269<\/a><\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u044d\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p>i) \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, SPA \u0438 \u0442. \u0434. \u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0449\u0438\u043c \u043d\u0430\u0448\u0438 \u0431\u044d\u043a\u044d\u043d\u0434-\u0441\u0435\u0440\u0432\u0438\u0441\u044b.<\/p>\n<p>ii) \u041f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c <a href=\"https:\/\/dev.to\/djviolin\/how-do-you-protecting-your-backend-api-in-your-microservice-if-you-use-a-single-page-application-on-the-frontend-2ie1\/comments\/2jj9\">\u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0435\u0441\u0442\u044c API-\u0448\u043b\u044e\u0437\u044b: \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441(\u044b), \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0438\u043b\u043b\u044e\u0437\u0438\u044e \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430. <em>\u0414\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 <\/em>(\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u043e\u0432, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438 \u0442. \u0434.) \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u043b\u044e\u0437\u043e\u0432. \u041e\u043d\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, <abbr class=\"habraabbr\" title=\"Access Control List (ACL) \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u0443), \u0438 \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)\" data-title=\"&lt;p>Access Control List (ACL) \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u0443), \u0438 \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)&lt;\/p>&#187; data-abbr=&#187;ACL&#187;>ACL<\/abbr>. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438, \u0448\u043b\u044e\u0437\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a <a href=\"http:\/\/microservices.io\/patterns\/service-registry.html\">\u0440\u0435\u0435\u0441\u0442\u0440\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442. \u0434.<\/p>\n<p>iii) \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u044c. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0448\u0430\u0440\u0434\u044b. \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u043d\u043e \u0438 <a href=\"http:\/\/microservices.io\/patterns\/data\/database-per-service.html\">\u043f\u043e\u043e\u0449\u0440\u044f\u0435\u0442\u0441\u044f<\/a>.<\/p>\n<p>iv) REST-\u0432\u044b\u0437\u043e\u0432\u044b, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0432 API-\u0448\u043b\u044e\u0437, \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c. \u041e\u043d\u0438, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0448\u043b\u044e\u0437 \u2014 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u041f\u0440\u0438 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437-\u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e HTTP-\u043e\u0431\u043c\u0435\u043d\u0430, \u0440\u0430\u0434\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0438\u0434\u0435\u0430\u043b\u0435, \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 \u2014 \u0430 \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u043a\u0430\u043a <a href=\"https:\/\/grpc.io\/\">gRPC<\/a>, <a href=\"https:\/\/thrift.apache.org\/\">Thrift<\/a> \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 HTTP (\u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435). \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u0421\u043a\u0430\u0436\u0435\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 <code>GET \/catalog\/&lt;&lt;cityId>><\/code> \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0435\u043c\u044c\u0435\u0440\u0430\u0445 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u0440\u0435\u043c\u044c\u0435\u0440\u044b \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <em>Cinema Catalog<\/em>. \u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0443\u043d\u043a\u0442 <code>iii<\/code>).<\/p>\n<h3>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438<\/h3>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u0435\u043c\u044c\u0435\u0440\u044b \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e CRUD-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <em>Movies<\/em>. \u0427\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <em>Cinema Catalog<\/em>. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043a\u0430\u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u0430\u0448\u0438\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0433\u0434\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0436\u0434\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0440\u0430\u0434\u0438 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0448\u0443 \u043f\u043e\u043b\u044c\u0437\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438. \u0418 \u0437\u0434\u0435\u0441\u044c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 <a href=\"https:\/\/www.rabbitmq.com\/\">RabbitMQ<\/a>.<\/p>\n<p>RabbitMQ \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 <a href=\"https:\/\/www.rabbitmq.com\/amqp-0-9-1-quickref.html\">\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 AMQP<\/a>. \u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 RabbitMQ (\u0431\u0440\u043e\u043a\u0435\u0440) \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 <em>Publisher \/ Producer (\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c \/ \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440)<\/em> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. RabbitMQ \u0441\u0442\u0430\u0432\u0438\u0442 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c <em>Subscriber \/ Consumer (\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a \/ \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440)<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 RabbitMQ.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0443\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u044f \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b <em>\u0433\u043e\u0440\u0430\u0437\u0434\u043e<\/em> \u0441\u043b\u043e\u0436\u043d\u0435\u0435; \u0438 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0432\u0435\u0449\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0442\u0435\u043c\u044b, \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/blog.risingstack.com\/designing-microservices-architecture-for-failure\/\">\u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c<\/a> \u0438\u0437-\u0437\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043b\u043d\u0430\u044f <a href=\"http:\/\/microservices.io\/patterns\/apigateway.html\">\u0440\u043e\u043b\u044c \u0448\u043b\u044e\u0437\u0430 API<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/microservices.io\/patterns\/client-side-discovery.html\">Service Discovery<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"http:\/\/microservices.io\/patterns\/data\/saga.html\">Sagas<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u044b\u0445 \u043e\u0442\u043a\u0430\u0437\u043e\u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/microservices.io\/patterns\/reliability\/circuit-breaker.html\">Circuit Breakers<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/martinfowler.com\/bliki\/CQRS.html\">CQRS<\/a>.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a <a href=\"https:\/\/martinfowler.com\/articles\/microservice-trade-offs.html\">\u0440\u0435\u0448\u0438\u0442\u044c<\/a>, \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0432\u0430\u043c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<h3>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b RabbitMQ<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f <em>\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442\u0441\u044f (published)<\/em> \u0432 <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a (exchange) <\/em>\u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 RabbitMQ. \u0417\u0430\u0442\u0435\u043c \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043f\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e <em>\u043e\u0447\u0435\u0440\u0435\u0434\u044f\u043c<\/em> (<em>queues<\/em>) \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 <em>\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430\u043c\u0438 (bindings)<\/em>. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043f\u0443\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 (routing)<\/em>. \u0418 \u044d\u0442\u0430 \u043d\u0435\u043f\u0440\u044f\u043c\u0430\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 (<em>consumers<\/em>), \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0442\u0435 <em>\u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u0435\u0433\u043e. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0432\u0435\u0440\u043d\u043e?<\/p>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#exchanges\">\u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u0430<\/a> <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432<\/em>, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445, \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 <em>\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430\u043c\u0438<\/em>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u043e, \u043a\u0430\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u043c\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c: <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#exchange-topic\"><em>topic exchange<\/em><\/a>:<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0433 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0442\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0443. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 RabbitMQ, \u043e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u043c \u0431\u0435\u0437 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0443. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0431\u0443\u0434\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u042d\u0442\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f <em>\u043a\u043b\u044e\u0447\u043e\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 (binding key)<\/em>. \u0422\u043e, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0430. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <em>topic exchange<\/em>:<\/p>\n<ul>\n<li>\n<p><em>\u041e\u0447\u0435\u0440\u0435\u0434\u044c<\/em> \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0443<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <\/em>(\u043a\u043b\u044e\u0447\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 <em>\u043a\u043b\u044e\u0447\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/em><\/p>\n<\/li>\n<li>\n<p><em>\u041e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 <em>\u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/em> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 <em>\u043a\u043b\u044e\u0447\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/em>, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <em>\u043a\u043b\u044e\u0447\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438<\/em>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0440\u0430\u043d\u0435\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>* \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e. # \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u043e\u043b\u044c \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0432.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dd6\/245\/ece\/dd6245eceeb42271b12e662d87a6321a.png\" alt=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/www.rabbitmq.com\/tutorials\/tutorial-five-python.html\" title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/www.rabbitmq.com\/tutorials\/tutorial-five-python.html\" width=\"424\" height=\"171\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dd6\/245\/ece\/dd6245eceeb42271b12e662d87a6321a.png\"\/><\/p>\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/tutorial-five-python.html\">https:\/\/www.rabbitmq.com\/tutorials\/tutorial-five-python.html<\/a><\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u044e\u0431\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 <code>\"quick.orange.rabbit\"<\/code> \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0431\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>\"lazy.brown.fox\"<\/code> \u0434\u043e\u0439\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e <code>Q2<\/code>. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u043c \u043d\u0438 \u0441 \u043e\u0434\u043d\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043e\u0431\u043c\u0435\u043d\u0430:<\/p>\n<ul>\n<li>\n<p><strong>Fanout-\u043e\u0431\u043c\u0435\u043d<\/strong>: \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u043e\u0431\u043c\u0435\u043d\u0430, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0432\u043e \u0412\u0421\u0415 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c. \u041a\u043b\u044e\u0447 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u043c\u0435\u043d<\/strong> (\u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439): \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <em>\u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/em> \u0440\u0430\u0432\u0435\u043d \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439, \u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 worker-\u0430\u043c\u0438 \u043f\u043e \u043a\u0440\u0443\u0433\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 <em>\u043e\u0447\u0435\u043d\u044c<\/em> \u043f\u0440\u043e\u0441\u0442\u043e\u0439: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Python <a href=\"http:\/\/flask.pocoo.org\/\">Flask<\/a> \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 POST, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u044f\u043a\u043e\u0431\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0443 RabbitMQ (\u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c\u043e\u0435) \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c 201. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Go-\u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0441\u0435 \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker Compose<\/h3>\n<p>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0443\u0447\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043e, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0441\u044c \u043d\u0430 <a href=\"https:\/\/docs.docker.com\/compose\/\">Docker Compose<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/UsamaAshraf\/microservices-using-rabbitmq\">\u0412\u043e\u0442 \u0432\u0435\u0441\u044c \u043a\u043e\u0434<\/a>. \u041c\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0414\u0432\u0430 <a href=\"https:\/\/docs.docker.com\/storage\/volumes\/\">volumes<\/a> \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"yaml\"># docker-compose.yml  version: \"3.2\" services:     rabbitmq-server:         build: .\/rabbitmq-server      python-service:         build: .\/python-service         # 'rabbitmq-server' will be available as a network reference inside this service          # and this service will start only after the RabbitMQ service does.         depends_on:             - rabbitmq-server         # Keep it running.           tty: true         # Map port 3000 on the host machine to port 3000 of the container.         # This will be used to receive HTTP requests made to the service.         ports:             - \"3000:3000\"         volumes:             - '.\/python-service:\/python-service'      go-service:         build: .\/go-service         depends_on:             - rabbitmq-server         tty: true         volumes:             - '.\/go-service:\/go-service'  # Host volumes used to store code. volumes:     python-service:     go-service:<\/code><\/pre>\n<p>Dockerfiles \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 <a href=\"https:\/\/hub.docker.com\/\">Docker Hub<\/a>, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>\/go-service<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Go;<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>\/python-service<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Python;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 RabbitMQ \u0434\u043b\u044f Go \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/github.com\/streadway\/amqp\">amqp<\/a>;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 RabbitMQ \u0434\u043b\u044f Python, <a href=\"https:\/\/pypi.org\/project\/pika\/0.11.0\/\">Pika<\/a> &amp; <a href=\"http:\/\/flask.pocoo.org\/\">Flask<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Flask \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 <code>user_id<\/code> \u0438 <code>full_name<\/code> \u2014 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0431\u0440\u043e\u043a\u0435\u0440\u0443 RabbitMQ.<\/p>\n<pre><code class=\"python\"># main.py  from flask import Flask from flask import request from flask import jsonify from services.user_event_handler import emit_user_profile_update  app = Flask(__name__)  @app.route('\/users\/&lt;int:user_id>', methods=['POST']) def update(user_id):     new_name = request.form['full_name']      # Update the user in the datastore using a local transaction...      emit_user_profile_update(user_id, {'full_name': new_name})      return jsonify({'full_name': new_name}), 201<\/code><\/pre>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0430 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u044b\u043d\u0435\u0441 \u0435\u0451 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c. <em>\u041e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u0434\u043e\u043b\u0436\u0435\u043d \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u043c, \u0442\u0430\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a RabbitMQ \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442:<\/p>\n<pre><code class=\"python\"># services\/user_event_handler.py  import pika import json  def emit_user_profile_update(user_id, new_data):     # 'rabbitmq-server' is the network reference we have to the broker,      # thanks to Docker Compose.     connection = pika.BlockingConnection(pika.ConnectionParameters(host='rabbitmq-server'))     channel    = connection.channel()      exchange_name = 'user_updates'     routing_key   = 'user.profile.update'      # This will create the exchange if it doesn't already exist.     channel.exchange_declare(exchange=exchange_name, exchange_type='topic', durable=True)      new_data['id'] = user_id      channel.basic_publish(exchange=exchange_name,                           routing_key=routing_key,                           body=json.dumps(new_data),                           # Delivery mode 2 makes the broker save the message to disk.                           # This will ensure that the message be restored on reboot even                             # if RabbitMQ crashes before having forwarded the message.                           properties=pika.BasicProperties(                             delivery_mode = 2,                         ))      print(\"%r sent to exchange %r with data: %r\" % (routing_key, exchange_name, new_data))     connection.close()<\/code><\/pre>\n<p>\u041f\u0443\u0441\u0442\u044c \u0432\u0430\u0441 \u043d\u0435 \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443 <code>channel<\/code> (\u043a\u0430\u043d\u0430\u043b). <em>\u041a\u0430\u043d\u0430\u043b<\/em> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#amqp-channels\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435, \u043b\u0451\u0433\u043a\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435<\/a> <em>\u0432\u043d\u0443\u0442\u0440\u0438<\/em> TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 TCP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>durable<\/code> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0435\u0441\u043b\u0438 \u0431\u0440\u043e\u043a\u0435\u0440 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0443\u043f\u0430\u0434\u0451\u0442 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u0418\u0437\u0434\u0430\u0442\u0435\u043b\u044c (Python \u0441\u0435\u0440\u0432\u0438\u0441) \u0441\u043e\u0437\u0434\u0430\u0451\u0442 <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>user_updates<\/code> \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u043c\u0443 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 <code>user.profile.update<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <em>\u043a\u043b\u044e\u0447\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/em>. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441 <em>\u043a\u043b\u044e\u0447\u043e\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438<\/em> <code>user.profile.*<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 Go:<\/p>\n<pre><code class=\"go\">\/\/ main.go  package main  import (     \"fmt\"     \"log\"     \"github.com\/streadway\/amqp\" )  func failOnError(err error, msg string) {     if err != nil {         \/\/ Exit the program.         panic(fmt.Sprintf(\"%s: %s\", msg, err))     } }  func main() {     \/\/ 'rabbitmq-server' is the network reference we have to the broker,      \/\/ thanks to Docker Compose.     conn, err := amqp.Dial(\"amqp:\/\/guest:guest@rabbitmq-server:5672\/\")     failOnError(err, \"Error connecting to the broker\")     \/\/ Make sure we close the connection whenever the program is about to exit.     defer conn.Close()      ch, err := conn.Channel()     failOnError(err, \"Failed to open a channel\")     \/\/ Make sure we close the channel whenever the program is about to exit.     defer ch.Close()      exchangeName := \"user_updates\"     bindingKey   := \"user.profile.*\"      \/\/ Create the exchange if it doesn't already exist.     err = ch.ExchangeDeclare(             exchangeName,   \/\/ name             \"topic\",        \/\/ type             true,           \/\/ durable             false,             false,             false,             nil,     )     failOnError(err, \"Error creating the exchange\")      \/\/ Create the queue if it doesn't already exist.     \/\/ This does not need to be done in the publisher because the     \/\/ queue is only relevant to the consumer, which subscribes to it.     \/\/ Like the exchange, let's make it durable (saved to disk) too.     q, err := ch.QueueDeclare(             \"\",    \/\/ name - empty means a random, unique name will be assigned             true,  \/\/ durable             false, \/\/ delete when the last consumer unsubscribes             false,              false,              nil,        )     failOnError(err, \"Error creating the queue\")      \/\/ Bind the queue to the exchange based on a string pattern (binding key).     err = ch.QueueBind(             q.Name,       \/\/ queue name             bindingKey,   \/\/ binding key             exchangeName, \/\/ exchange             false,             nil,     )     failOnError(err, \"Error binding the queue\")      \/\/ Subscribe to the queue.     msgs, err := ch.Consume(             q.Name, \/\/ queue             \"\",     \/\/ consumer id - empty means a random, unique id will be assigned             false,  \/\/ auto acknowledgement of message delivery             false,               false,               false,               nil,     )     failOnError(err, \"Failed to register as a consumer\")       forever := make(chan bool)      go func() {         for d := range msgs {             log.Printf(\"Received message: %s\", d.Body)              \/\/ Update the user's data on the service's              \/\/ associated datastore using a local transaction...              \/\/ The 'false' indicates the success of a single delivery, 'true' would             \/\/ mean that this delivery and all prior unacknowledged deliveries on this             \/\/ channel will be acknowledged, which I find no reason for in this example.             d.Ack(false)         }     }()      fmt.Println(\"Service listening for events...\")      \/\/ Block until 'forever' receives a value, which will never happen.     &lt;-forever }<\/code><\/pre>\n<p>RabbitMQ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0440\u0442 5672 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 TLS \u0438 &#171;guest&#187; \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/www.rabbitmq.com\/configure.html\">\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043e\u043f\u0446\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/a> \u0438 \u043a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 <a href=\"https:\/\/pika.readthedocs.io\/en\/0.11.2\/modules\/index.html\">Pika<\/a> \u0438 <a href=\"https:\/\/godoc.org\/github.com\/streadway\/amqp\">Go amqp<\/a>.<\/p>\n<p>\u0412\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u0430 \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430: <code>d.Ack(false)<\/code><\/p>\n<p>\u041e\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0431\u0440\u043e\u043a\u0435\u0440\u0443, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e, \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043e. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041d\u043e \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c: <code>ch.Consume<\/code>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 Go \u0432\u044b\u0439\u0434\u0435\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f (\u043f\u043e \u043b\u044e\u0431\u043e\u0439 \u043d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435), \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0438 \u044d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0448\u0430\u043d\u0441 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0438\u0445:<\/p>\n<pre><code>docker-compose up<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b (\u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u044d\u0442\u043e \u0437\u0430\u0439\u043c\u0451\u0442 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442), \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>docker ps<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/711\/e98\/501\/711e98501160a1a6c48f84f62bfcaad8.png\" width=\"880\" height=\"105\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/711\/e98\/501\/711e98501160a1a6c48f84f62bfcaad8.png\"\/><\/figure>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u043f\u043e SSH \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Python \u0438 Go, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b:<\/p>\n<p><code>docker exec -it microservicesusingrabbitmq_python-service_1 bashFLASK_APP=main.py python -m flask run --port 3000 --host 0.0.0.0<\/code><\/p>\n<p><code>docker exec -it microservicesusingrabbitmq_go-service_1 bash<br \/>go run main.go<\/code><\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0440\u0435\u0442\u0438\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Curl:<\/p>\n<p><code>curl -d \"full_name=usama\" -X POST http:\/\/localhost:3000\/users\/1<\/code><\/p>\n<p>\u0418 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ce\/013\/8f9\/7ce0138f9963f58a32a53c21f6ef89fa.png\" width=\"880\" height=\"132\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ce\/013\/8f9\/7ce0138f9963f58a32a53c21f6ef89fa.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/201\/310\/788\/201310788bf783a6a0221c915e7489e4.png\" width=\"880\" height=\"127\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/201\/310\/788\/201310788bf783a6a0221c915e7489e4.png\"\/><\/figure>\n<p>\u0412 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0439\u0442\u0438 \u043f\u043e SSH \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 RabbitMQ \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><code>rabbitmqctl list_exchanges<\/code> (\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0437\u043b\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0430)<\/p>\n<\/li>\n<li>\n<p><code>rabbitmqctl list_queues<\/code> (\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0437\u043b\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0430)<\/p>\n<\/li>\n<li>\n<p><code>rabbitmqctl list_bindings<\/code> (\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0437\u043b\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0430)<\/p>\n<\/li>\n<li>\n<p><code>rabbitmqctl list_queues name messages_ready messages_unacknowledged<\/code> (\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b, \u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043d\u043d\u044b\u0445)<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432\u043d\u0430\u0447\u0430\u043b\u0435, \u044d\u0442\u043e \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0438 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445: \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u043e\u0439? \u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448 Go-\u0441\u0435\u0440\u0432\u0438\u0441 (\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a) \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435? \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b \u044d\u0442\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0442\u044b\u0441\u044f\u0447\u0438 \u0442\u0430\u043a\u0438\u0445 \u00ab\u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u00bb. \u041f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435 \u043e\u0442\u043a\u0430\u0442.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 Go \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0443 Python, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0442 \u043e\u0442\u043a\u0430\u0442\u0438\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430 (\u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439), \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u043c. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c (\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430), \u0430 \u043a\u0430\u043a\u0438\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0437\u0430\u0434.<\/p>\n<p>\u041d\u043e \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0438 \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0442? \u0414\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/blog.couchbase.com\/saga-pattern-implement-business-transactions-using-microservices-part\/\">\u043f\u0430\u0442\u0442\u0435\u0440\u043d Saga<\/a> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c <a href=\"http:\/\/microservices.io\/patterns\/data\/event-sourcing.html\">event sourcing<\/a>.<\/p>\n<h3>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438: \u0442\u0438\u043f\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043e\u0431\u043c\u0435\u043d\u043e\u0432 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432\u0441\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#exchange-fanout\">\u0442\u0438\u043f \u043e\u0431\u043c\u0435\u043d\u0430 fanout<\/a>. \u0422\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0442\u0440\u0438 fanout-\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0430 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 <code>user.profile.updated<\/code>, <code>user.profile.deleted<\/code>, <code>user.profile.added<\/code>. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0438\u0442\u043e\u0433\u0435 \u0443 \u0432\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0438 \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0431\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0430, \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438<\/em>.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <em>topic exchanges<\/em> \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0422\u0430\u043a, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>user<\/code>, <code>movie<\/code>, <code>cinema<\/code> \u0438 \u0442.\u0434. \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0438 <em>\u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/em>, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043a <code>user<\/code>, \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438, \u043a\u0430\u043a: <\/p>\n<ul>\n<li>\n<p><code>user.created<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043d;<\/p>\n<\/li>\n<li>\n<p><code>user.login<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u0448\u0451\u043b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443;<\/p>\n<\/li>\n<li>\n<p><code>user.roles.grant<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0440\u043e\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p><code>user.notify<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c. \u041f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0434\u043d\u0438 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0434\u0440\u0443\u0433\u0438\u0435, \u2014 \u044d\u0442\u043e \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d. \u041f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u043e\u0436\u043d\u044b \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#exchange-headers\">\u043e\u0431\u043c\u0435\u043d \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438<\/a>.<\/p>\n<hr\/>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e RabbitMQ, \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 Kafka. \u041e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442; \u0438\u0445 \u0441\u043b\u0430\u0431\u044b\u0435, \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u043a \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/otus.pw\/ae7B\/\">\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u0430 \u00abRabbitMQ \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432\u00bb.<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/794216\/\"> https:\/\/habr.com\/ru\/articles\/794216\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0417\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u044d\u0442\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c. \u0425\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0432 \u0431\u043e\u044e \u043f\u0440\u0430\u043a\u0442\u0438\u043a, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0442\u0430\u043a\u0438\u043c\u0438 \u0433\u0438\u0433\u0430\u043d\u0442\u0430\u043c\u0438, \u043a\u0430\u043a <a href=\"https:\/\/www.nginx.com\/blog\/microservices-at-netflix-architectural-best-practices\/\">Netflix<\/a> \u0438 <a href=\"https:\/\/eng.uber.com\/building-tincup\/\">Uber<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0418 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437 \u043d\u0438\u0445.\u00a0<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u0422\u0430\u043a\u0430\u044f \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"http:\/\/microservices.io\/patterns\/decomposition\/decompose-by-subdomain.html\">\u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d\u043e\u0432<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u0411\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435, \u0441 \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u041e\u043d\u0438 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0441\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 (\u0431\u0435\u0437 <abbr class=\"habraabbr\" title=\"\u0430\u043d\u0433\u043b. single point of failure \u2014 \u0415\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430. \u0423\u0437\u0435\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0442\u043a\u0430\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0451 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438\" data-title=\"&lt;p>\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0451 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438&#187; data-title=&#187;&lt;p>\u0430\u043d\u0433\u043b. single point of failure \u2014 \u0415\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430. \u0423\u0437\u0435\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u0442\u043a\u0430\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0451 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438&lt;\/p>&#187; data-abbr=&#187;SPOF&#187;>SPOF<\/abbr>). \u0412\u043e\u0437\u044c\u043c\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u0440\u043e\u0434\u0430\u0436\u0435\u0439 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"https:\/\/codeburst.io\/build-a-nodejs-cinema-api-gateway-and-deploying-it-to-docker-part-4-703c2b0dd269\">https:\/\/codeburst.io\/build-a-nodejs-cinema-api-gateway-and-deploying-it-to-docker-part-4-703c2b0dd269<\/a><\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u044d\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e:<\/p>\n<p>i) \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, SPA \u0438 \u0442. \u0434. \u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0449\u0438\u043c \u043d\u0430\u0448\u0438 \u0431\u044d\u043a\u044d\u043d\u0434-\u0441\u0435\u0440\u0432\u0438\u0441\u044b.<\/p>\n<p>ii) \u041f\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c <a href=\"https:\/\/dev.to\/djviolin\/how-do-you-protecting-your-backend-api-in-your-microservice-if-you-use-a-single-page-application-on-the-frontend-2ie1\/comments\/2jj9\">\u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0435\u0441\u0442\u044c API-\u0448\u043b\u044e\u0437\u044b: \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441(\u044b), \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0438\u043b\u043b\u044e\u0437\u0438\u044e \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430. <em>\u0414\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 <\/em>(\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u043e\u0432, \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0438 \u0442. \u0434.) \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u043b\u044e\u0437\u043e\u0432. \u041e\u043d\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, <abbr class=\"habraabbr\" title=\"Access Control List (ACL) \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u0443), \u0438 \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)\" data-title=\"&lt;p>\u0435\u043d\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)&#187; data-title=&lt;p>Access Control List (ACL) \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u0443), \u0438 \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)&lt;\/p>&#187; data-abbr=&#187;ACL&#187;>ACL<\/abbr>. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438, \u0448\u043b\u044e\u0437\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a <a href=\"http:\/\/microservices.io\/patterns\/service-registry.html\">\u0440\u0435\u0435\u0441\u0442\u0440\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442. \u0434.<\/p>\n<p>iii) \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u044c. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0448\u0430\u0440\u0434\u044b. \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u043d\u043e \u0438 <a href=\"http:\/\/microservices.io\/patterns\/data\/database-per-service.html\">\u043f\u043e\u043e\u0449\u0440\u044f\u0435\u0442\u0441\u044f<\/a>.<\/p>\n<p>iv) REST-\u0432\u044b\u0437\u043e\u0432\u044b, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0432 API-\u0448\u043b\u044e\u0437, \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c. \u041e\u043d\u0438, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0448\u043b\u044e\u0437 \u2014 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u041f\u0440\u0438 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437-\u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e HTTP-\u043e\u0431\u043c\u0435\u043d\u0430, \u0440\u0430\u0434\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0438\u0434\u0435\u0430\u043b\u0435, \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 \u2014 \u0430 \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b, \u043a\u0430\u043a <a href=\"https:\/\/grpc.io\/\">gRPC<\/a>, <a href=\"https:\/\/thrift.apache.org\/\">Thrift<\/a> \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 HTTP (\u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435). \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u0421\u043a\u0430\u0436\u0435\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 <code>GET \/catalog\/&lt;&lt;cityId>><\/code> \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0435\u043c\u044c\u0435\u0440\u0430\u0445 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u0440\u0438 \u043d\u0430\u0448\u0435\u0439 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u0440\u0435\u043c\u044c\u0435\u0440\u044b \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <em>Cinema Catalog<\/em>. \u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0443\u043d\u043a\u0442 <code>iii<\/code>).<\/p>\n<h3>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438<\/h3>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u0435\u043c\u044c\u0435\u0440\u044b \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e CRUD-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <em>Movies<\/em>. \u0427\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <em>Cinema Catalog<\/em>. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043a\u0430\u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u0430\u0448\u0438\u043d \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0433\u0434\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0436\u0434\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0440\u0430\u0434\u0438 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0448\u0443 \u043f\u043e\u043b\u044c\u0437\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438. \u0418 \u0437\u0434\u0435\u0441\u044c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 <a href=\"https:\/\/www.rabbitmq.com\/\">RabbitMQ<\/a>.<\/p>\n<p>RabbitMQ \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 <a href=\"https:\/\/www.rabbitmq.com\/amqp-0-9-1-quickref.html\">\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 AMQP<\/a>. \u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 RabbitMQ (\u0431\u0440\u043e\u043a\u0435\u0440) \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 <em>Publisher \/ Producer (\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c \/ \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440)<\/em> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. RabbitMQ \u0441\u0442\u0430\u0432\u0438\u0442 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c <em>Subscriber \/ Consumer (\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a \/ \u043a\u043e\u043d\u0441\u044c\u044e\u043c\u0435\u0440)<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 RabbitMQ.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u0443\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u044f \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b <em>\u0433\u043e\u0440\u0430\u0437\u0434\u043e<\/em> \u0441\u043b\u043e\u0436\u043d\u0435\u0435; \u0438 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0432\u0435\u0449\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0442\u0435\u043c\u044b, \u043a\u0430\u043a:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/blog.risingstack.com\/designing-microservices-architecture-for-failure\/\">\u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c<\/a> \u0438\u0437-\u0437\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043b\u043d\u0430\u044f <a href=\"http:\/\/microservices.io\/patterns\/apigateway.html\">\u0440\u043e\u043b\u044c \u0448\u043b\u044e\u0437\u0430 API<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/microservices.io\/patterns\/client-side-discovery.html\">Service Discovery<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"http:\/\/microservices.io\/patterns\/data\/saga.html\">Sagas<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u044b\u0445 \u043e\u0442\u043a\u0430\u0437\u043e\u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/microservices.io\/patterns\/reliability\/circuit-breaker.html\">Circuit Breakers<\/a>,\u00a0<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/martinfowler.com\/bliki\/CQRS.html\">CQRS<\/a>.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a <a href=\"https:\/\/martinfowler.com\/articles\/microservice-trade-offs.html\">\u0440\u0435\u0448\u0438\u0442\u044c<\/a>, \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0432\u0430\u043c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<h3>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b RabbitMQ<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f <em>\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e\u0442\u0441\u044f (published)<\/em> \u0432 <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a (exchange) <\/em>\u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 RabbitMQ. \u0417\u0430\u0442\u0435\u043c \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043f\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e <em>\u043e\u0447\u0435\u0440\u0435\u0434\u044f\u043c<\/em> (<em>queues<\/em>) \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 <em>\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430\u043c\u0438 (bindings)<\/em>. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043f\u0443\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 (routing)<\/em>. \u0418 \u044d\u0442\u0430 \u043d\u0435\u043f\u0440\u044f\u043c\u0430\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 (<em>consumers<\/em>), \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0442\u0435 <em>\u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u0435\u0433\u043e. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0432\u0435\u0440\u043d\u043e?<\/p>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#exchanges\">\u0447\u0435\u0442\u044b\u0440\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u0430<\/a> <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432<\/em>, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445, \u043d\u0430\u0440\u044f\u0434\u0443 \u0441 <em>\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430\u043c\u0438<\/em>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u043e, \u043a\u0430\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u043c\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c: <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/amqp-concepts.html#exchange-topic\"><em>topic exchange<\/em><\/a>:<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0433 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0442\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0443. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 RabbitMQ, \u043e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u043e\u043c \u0431\u0435\u0437 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0443. \u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u0431\u0443\u0434\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u042d\u0442\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f <em>\u043a\u043b\u044e\u0447\u043e\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 (binding key)<\/em>. \u0422\u043e, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0430. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <em>topic exchange<\/em>:<\/p>\n<ul>\n<li>\n<p><em>\u041e\u0447\u0435\u0440\u0435\u0434\u044c<\/em> \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a\u0443<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <\/em>(\u043a\u043b\u044e\u0447\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438).<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <em>\u043e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 <em>\u043a\u043b\u044e\u0447\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/em><\/p>\n<\/li>\n<li>\n<p><em>\u041e\u0431\u043c\u0435\u043d\u043d\u0438\u043a<\/em> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 <em>\u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/em> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 <em>\u043a\u043b\u044e\u0447\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/em>, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 <em>\u043a\u043b\u044e\u0447\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438<\/em>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u0440\u0430\u043d\u0435\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>* \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e. # \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u043e\u043b\u044c \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0432.<\/p>\n<figure class=\"\">\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a href=\"https:\/\/www.rabbitmq.com\/tutorials\/tutorial-five-python.html\">https:\/\/www.rabbitmq.com\/tutorials\/tutorial-five-python.html<\/a><\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u044e\u0431\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 <code>\"quick.orange.rabbit\"<\/code> \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0431\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>\"lazy.brown.fox\"<\/code> \u0434\u043e\u0439\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e <code>Q2<\/code>. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u043c \u043d\u0438 \u0441 \u043e\u0434\u043d\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043e\u0431\u043c\u0435\u043d\u0430:<\/p>\n<ul>\n<li>\n<p><strong>Fanout-\u043e\u0431\u043c\u0435\u043d<\/strong>: \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u043e\u0431\u043c\u0435\u043d\u0430, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0432\u043e \u0412\u0421\u0415 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0438\u043c. \u041a\u043b\u044e\u0447 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u044f\u043c\u043e\u0439 \u043e\u0431\u043c\u0435\u043d<\/strong> (\u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439): \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u043b\u044e\u0447 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <em>\u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/em> \u0440\u0430\u0432\u0435\u043d \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439, \u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 worker-\u0430\u043c\u0438 \u043f\u043e \u043a\u0440\u0443\u0433\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 <em>\u043e\u0447\u0435\u043d\u044c<\/em> \u043f\u0440\u043e\u0441\u0442\u043e\u0439: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Python <a href=\"http:\/\/flask.pocoo.org\/\">Flask<\/a> \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 POST, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u044f\u043a\u043e\u0431\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0443 RabbitMQ (\u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0435\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u043c\u043e\u0435) \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c 201. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Go-\u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0438 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0441\u0435 \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker Compose<\/h3>\n<p>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0443\u0447\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043e, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0441\u044c \u043d\u0430 <a href=\"https:\/\/docs.docker.com\/compose\/\">Docker Compose<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/UsamaAshraf\/microservices-using-rabbitmq\">\u0412\u043e\u0442 \u0432\u0435\u0441\u044c \u043a\u043e\u0434<\/a>. \u041c\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0414\u0432\u0430 <a href=\"https:\/\/docs.docker.com\/storage\/volumes\/\">volumes<\/a> \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"yaml\"># docker-compose.yml  version: \"3.2\" services:     rabbitmq-server:         build: .\/rabbitmq-server      python-service:         build: .\/python-service         # 'rabbitmq-server' will be available as a network reference inside this service          # and this service will start only after the RabbitMQ service does.         depends_on:             - rabbitmq-server         # Keep it running.           tty: true         # Map port 3000 on the host machine to port 3000 of the container.         # This will be used to receive HTTP requests made to the service.         ports:             - \"3000:3000\"         volumes:             - '.\/python-service:\/python-service'<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-368416","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/368416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=368416"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/368416\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=368416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=368416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=368416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}