{"id":427414,"date":"2024-07-25T21:58:24","date_gmt":"2024-07-25T21:58:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=427414"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=427414","title":{"rendered":"<span>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f REST \u0438 MQ \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0448\u043b\u044e\u0437 OpenIG<\/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<h2>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e<\/h2>\n<p>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u043c \u0438 REST \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u0435\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0438\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\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. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f REST \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u0438\u044e \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440 \u043b\u043e\u0433\u043e\u0432. \u041c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 REST \u0432 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432. \u041d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u043e\u043a\u0435\u0440\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0438\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f REST-\u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432. \u0421\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0448\u043b\u044e\u0437 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c OpenIG \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0432 REST \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d OpenIG. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0435\u0442, \u0442\u043e \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/github.com\/OpenIdentityPlatform\/OpenIG\/wiki\/How-To-Protect-Web-Services-with-OpenIG\" rel=\"noopener noreferrer nofollow\">How To Protect Web Services with OpenIG<\/a>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/maximthomas\/openig-mb-example\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/maximthomas\/openig-mb-example<\/a> \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443<\/p>\n<h2>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Apache Kafka<\/h3>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e HTTP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 Apache Kafka.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG <code>config.json<\/code> \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Kafka producer:<\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"kafka-producer\",       \"type\": \"MQ_Kafka\",       \"config\": {         \"bootstrap.servers\": \"kafka:9092\",         \"topic.produce\": \"incoming-messages\"       }     },     ...   ] }  <\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">boostrap.server<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043f\u0438\u0441\u043e\u043a \u0445\u043e\u0442\u0441\u0442\u043e \u0438 \u043f\u043e\u0440\u0442\u043e\u0432 Apache Kafka, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">topic.produce<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043f\u0438\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 OpenIG \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">topic.consume<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043f\u0438\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">uri<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 OpenIG<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">method<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0435\u0442\u043e\u0434 HTTP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 OpenIG \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e HTTP<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 OpenIG, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 Apache Kafka:<\/p>\n<p><code>routes\/10-http2kafka.json<\/code>:<\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'PUT') and matches(request.uri.path, '^\/http2kafka$')}\",   \"condition\": \"${(request.method == 'PUT') and matches(request.uri.path, '^\/http2kafka$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {     \"filters\": [],       \"handler\": {         \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [             {               \"handler\": \"kafka-consumer\"             }           ]         }       }     }   } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>openig\/config<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code class=\"bash\">docker compose -f docker-compose.yml up <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0442\u043e\u043f\u0438\u043a \u0434\u043b\u044f Apache Kafka. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">docker exec openig-mb-example-kafka-1 kafka-topics.sh --create --topic topic1 --bootstrap-server localhost:9092 <\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 OpenIG \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435:<\/p>\n<pre><code class=\"bash\">curl -v -X PUT --data '{\"data\": \"test\"}' -H 'Content-Type: application\/json' '&lt;http:\/\/localhost:8080\/http2kafka&gt;' *   Trying 127.0.0.1:8080... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) &gt; PUT \/http2kafka HTTP\/1.1 &gt; Host: localhost:8080 &gt; User-Agent: curl\/7.68.0 &gt; Accept: *\/* &gt; Content-Type: application\/json &gt; Content-Length: 16 &gt;  * upload completely sent off: 16 out of 16 bytes * Mark bundle as not supporting multiuse &lt; HTTP\/1.1 202 Accepted &lt; Server: Apache-Coyote\/1.1 &lt; Content-Length: 0 &lt; Date: Wed, 13 Apr 2022 12:34:03 GMT &lt;  * Connection #0 to host localhost left intact <\/code><\/pre>\n<pre><code class=\"bash\">docker exec openig-mb-example-kafka-1 kafka-console-consumer.sh --topic topic1 --from-beginning --bootstrap-server localhost:9092 {\"data\": \"test\"} <\/code><\/pre>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 Kafka \u0432 HTTP<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0442\u043e\u043f\u0438\u043a\u0430 <code>topic2<\/code> Apache Kafka \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<p>\u041f\u043e\u0442\u0443\u0448\u0438\u0442\u0435 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code class=\"bash\">docker compose -f docker-compose.yml down <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Kafka producer.<\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"kafka-consumer\",       \"type\": \"MQ_Kafka\",       \"config\": {         \"bootstrap.servers\": \"kafka:9092\",         \"topic.consume\": \"topic2\",         \"method\": \"POST\"       }     },     ...   ] } <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 OpenIG \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 Apache Kafka \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<p><code>routes\/10-kafka2http.json<\/code><\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"condition\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {       \"filters\": [],       \"handler\": {       \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [{               \"handler\": \"ClientHandler\",               \"capture\": \"all\",               \"baseURI\": \"${system['endpoint.api']}\"           }]         }       }     }   } } <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>baseURI<\/code> . \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d URI \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 HTTP. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>docker-compose.yaml -Dendpoint.api=http:\/\/sample-service:8080<\/code> \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 OpenIG<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 Apache Kafka \u0442\u043e\u043f\u0438\u043a <code>topic2<\/code>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<pre><code class=\"bash\">docker exec openig-mb-example-kafka-1 kafka-topics.sh --create --topic topic2 --bootstrap-server localhost:9092 <\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043f\u0438\u043a:<\/p>\n<pre><code class=\"bash\">docker exec -it openig-mb-example-kafka-1 kafka-console-producer.sh --topic topic2 --bootstrap-server localhost:9092 &gt;{\"data\": \"test\"} <\/code><\/pre>\n<p>\u0412 \u043b\u043e\u0433\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <code>sample-service<\/code>  \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<pre><code class=\"bash\">2024-07-05T08:46:37.540Z DEBUG 1 --- [nio-8080-exec-1] o.s.w.f.CommonsRequestLoggingFilter      : After request [POST \/kafka2http, headers=[correlation-id:\"8dd45456-433d-42cb-b992-27047ae75ed9\", kafka-offset:\"0\", kafka-timestamp:\"1720169196044\", kafka-timestamp-date:\"Fri Jul 05 08:46:36 UTC 2024\", kafka-topic:\"topic2\", content-length:\"16\", host:\"sample-service:8080\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpAsyncClient\/4.1.4 (Java\/17.0.9)\"], payload={\"data\": \"test\"}] <\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 OpenIG Apache Kafka<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u043d\u0435\u0442 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u043a\u0435\u0440\u0430, \u0442\u043e OpenIG \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Apache Kafka, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG \u043e\u0431\u044a\u0435\u043a\u0442 <code>EmbeddedKafka<\/code><\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...       {         \"name\": \"EmbeddedKafka\",         \"type\": \"EmbeddedKafka\",         \"config\": {           \"zookeper.port\": \"${system['zookeper.port']}\",           \"security.inter.broker.protocol\": \"${empty system['keystore.location'] ?'PLAINTEXT':'SSL'}\",           \"listeners\": \"${system['kafka.bootstrap']}\",           \"advertised.listeners\": \"${system['kafka.bootstrap']}\",           \"ssl.endpoint.identification.algorithm\": \"\",           \"ssl.enabled.protocols\":\"TLSv1.2\",           \"ssl.keystore.location\":\"${system['keystore.location']}\",           \"ssl.keystore.password\":\"${empty system['keystore.password']?'changeit':system['keystore.password']}\",           \"ssl.key.password\":\"${empty system['key.password']?'changeit':system['key.password']}\",           \"ssl.truststore.location\":\"${system['truststore.location']}\",           \"ssl.truststore.password\":\"${empty system['truststore.password']?'changeit':system['truststore.password']}\"         },     ...   ] } <\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <code>EmbeddedKafka<\/code>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">zookeper.port<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0440\u0442 Zookeper \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Apache Kafka. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, Kafra \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">listeners<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u0435\u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Apache Kafka.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">advertised.listeners<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u0435\u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Apache Kafka.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 Kafka listener \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 heap OpenIG \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f Kafka \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP (\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0440\u043e\u043a\u0435\u0440).<\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...       {       \"name\": \"kafka-consumer\",       \"type\": \"MQ_Kafka\",       \"config\": {         \"bootstrap.servers\": \"openig:9092\",         \"topic.consume\": \"topic1\",         \"method\": \"POST\",         \"uri\": \"\/kafka2http\"       }     ...   ] } <\/code><\/pre>\n<p><code>10-kafka2http.json<\/code><\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"condition\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {       \"filters\": [],       \"handler\": {       \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [{               \"handler\": \"ClientHandler\",               \"capture\": \"all\",               \"baseURI\": \"${system['endpoint.api']}\"           }]         }       }     }   } <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 OpenIG. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c topic \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0442 topic.<\/p>\n<pre><code class=\"bash\">$ kafka-console-producer.sh --topic topic1 --bootstrap-server localhost:9092 &gt;{\"data\": \"test\"} <\/code><\/pre>\n<p>\u0412 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0432 \u043b\u043e\u0433\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 OpenIG \u0438\u0437 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<pre><code>2022-04-21 07:26:14.645 DEBUG 1 --- [nio-8080-exec-6] o.s.w.f.CommonsRequestLoggingFilter      : After request [POST \/kafka2http, headers=[kafka-offset:\"29\", kafka-topic:\"topic2\", content-length:\"16\", host:\"sample-service:8080\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpAsyncClient\/4.1.4 (Java\/1.8.0_212)\"], payload={\"data\": \"test\"}] <\/code><\/pre>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 IBM MQ<\/h2>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 IBM MQ<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e HTTP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 topic IBM MQ:<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a IBM MQ Consumer \u0432 heap \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG:<\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"mq-producer\",       \"type\": \"MQ_IBM\",       \"config\": {         \"XMSC_WMQ_CONNECTION_NAME_LIST\":\"mq(1414)\",         \"XMSC_WMQ_CHANNEL\":\"DEV.APP.SVRCONN\",         \"XMSC_WMQ_QUEUE_MANAGER\":\"QM1\",         \"XMSC_USERID\":\"app\",         \"XMSC_PASSWORD\":\"passw0rd\",         \"topic.produce\": \"DEV.QUEUE.1\"       }     },     ...   ] } <\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 IBM MQ:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>Setting<\/p>\n<\/th>\n<th>\n<p>Name<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">XMSC_WMQ_CONNECTION_NAME_LIST<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0410\u0434\u0440\u0435\u0441\u0430 \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u0432 IBM MQ \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043c\u0435\u043d\u043e\u0432 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">XMSC_WMQ_CHANNEL<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u044f \u043a\u0430\u043d\u0430\u043b\u0430 IBM MQ, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">XMSC_USERID<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f IBM MQ<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">XMSC_PASSWORD<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f IBM MQ<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">topic.produce<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043f\u0438\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 OpenIG \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">topic.consume<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043f\u0438\u043a, \u0438\u0437 \u043a\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">uri<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 OpenIG<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">method<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0435\u0442\u043e\u0434 HTTP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 OpenIG \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 OpenIG \u0432 \u043f\u0430\u043f\u043a\u0443 <code>routes<\/code> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p><code>10-http2mq.json<\/code><\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'PUT') and matches(request.uri.path, '^\/http2mq$')}\",   \"condition\": \"${(request.method == 'PUT') and matches(request.uri.path, '^\/http2mq$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {       \"filters\": [],       \"handler\": {         \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [             {               \"handler\": \"mq-producer\"             }           ]         }       }     }   } } <\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 OpenIG \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043f\u0438\u043a\u0435 <code>DEV.QUEUE.1<\/code> IBM MQ:<\/p>\n<pre><code class=\"bash\">$ curl -v -X PUT --data '{\"data\": \"test\"}' -H 'Content-Type: application\/json' '&lt;http:\/\/localhost:8080\/http2mq&gt;' *   Trying 127.0.0.1:8080... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) &gt; PUT \/http2mq HTTP\/1.1 &gt; Host: localhost:8080 &gt; User-Agent: curl\/7.68.0 &gt; Accept: *\/* &gt; Content-Type: application\/json &gt; Content-Length: 16 &gt;  * upload completely sent off: 16 out of 16 bytes * Mark bundle as not supporting multiuse &lt; HTTP\/1.1 202 Accepted &lt; Server: Apache-Coyote\/1.1 &lt; Content-Length: 0 &lt; Date: Wed, 13 Apr 2022 12:34:03 GMT &lt;  * Connection #0 to host localhost left intact <\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c IBM MQ \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u00a0<a href=\"https:\/\/localhost:9443\/ibmmq\/console\/\" rel=\"noopener noreferrer nofollow\">https:\/\/localhost:9443\/ibmmq\/console\/<\/a>. \u0412 \u0442\u043e\u043f\u0438\u043a\u0435 <code>DEV.QUEUE.1<\/code> \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/10a\/e54\/986\/10ae54986bb49f161a3129e85978024c.png\" width=\"1420\" height=\"381\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10a\/e54\/986\/10ae54986bb49f161a3129e85978024c.png\"\/><\/figure>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 IBM MQ \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 IBM MQ cosumer \u0432 heap \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG <code>config.json<\/code>.<\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"mq-consumer\",       \"type\": \"MQ_IBM\",       \"config\": {         \"XMSC_WMQ_CONNECTION_NAME_LIST\":\"mq(1414)\",         \"XMSC_WMQ_CHANNEL\":\"DEV.APP.SVRCONN\",         \"XMSC_WMQ_QUEUE_MANAGER\":\"QM1\",         \"XMSC_USERID\":\"app\",         \"XMSC_PASSWORD\":\"passw0rd\",         \"topic.consume\": \"DEV.QUEUE.2\",         \"uri\": \"\/mq2http\",         \"method\": \"POST\"       }     }     ...   ] } <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 OpenIG \u0432 \u043f\u0430\u043f\u043a\u0443 <code>routes<\/code> \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 IBM MQ:<\/p>\n<p><code>10-mq2http.json<\/code><\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/mq2http$')}\",   \"condition\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/mq2http$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {       \"filters\": [],       \"handler\": {         \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [             {               \"handler\": \"ClientHandler\",               \"capture\": \"all\",               \"baseURI\": \"${system['endpoint.api']}\"             }           ]         }       }     }   } } <\/code><\/pre>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c IBM MQ \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043f\u0438\u043a <code>DEV.QUEUE.2<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7d2\/74f\/e75\/7d274fe75463b94b9a8cd94926a4c5d1.png\" width=\"2000\" height=\"1097\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7d2\/74f\/e75\/7d274fe75463b94b9a8cd94926a4c5d1.png\"\/><\/figure>\n<p>\u0412 \u043b\u043e\u0433\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <code>sample-servive<\/code> \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>2022-04-21 08:32:35.007 DEBUG 1 --- [nio-8080-exec-1] o.s.w.f.CommonsRequestLoggingFilter      : After request [POST \/mq2http, headers=[jms_ibm_character_set:\"UTF-8\", jms_ibm_encoding:\"273\", jms_ibm_format:\"MQSTR\", jms_ibm_msgtype:\"8\", jms_ibm_putappltype:\"6\", jms_ibm_putdate:\"20220421\", jms_ibm_puttime:\"08323434\", jmsxappid:\"com.ibm.mq.webconsole\", jmsxdeliverycount:\"1\", jmsxuserid:\"unknown\", content-length:\"16\", host:\"sample-service:8080\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpAsyncClient\/4.1.4 (Java\/1.8.0_212)\"], payload={\"data\": \"test\"}] <\/code><\/pre>\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\/828832\/\"> https:\/\/habr.com\/ru\/articles\/828832\/<\/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<h2>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e<\/h2>\n<p>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u043c \u0438 REST \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u0435\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0438\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u0440\u043e\u043a\u0435\u0440\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\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. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f REST \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u0438\u044e \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440 \u043b\u043e\u0433\u043e\u0432. \u041c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 REST \u0432 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432. \u041d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u043e\u043a\u0435\u0440\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0438\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f REST-\u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432. \u0421\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0448\u043b\u044e\u0437 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c OpenIG \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0432 REST \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435<\/h2>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d OpenIG. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0435\u0442, \u0442\u043e \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/github.com\/OpenIdentityPlatform\/OpenIG\/wiki\/How-To-Protect-Web-Services-with-OpenIG\" rel=\"noopener noreferrer nofollow\">How To Protect Web Services with OpenIG<\/a>.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/maximthomas\/openig-mb-example\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/maximthomas\/openig-mb-example<\/a> \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443<\/p>\n<h2>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Apache Kafka<\/h3>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e HTTP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 Apache Kafka.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG <code>config.json<\/code> \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Kafka producer:<\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"kafka-producer\",       \"type\": \"MQ_Kafka\",       \"config\": {         \"bootstrap.servers\": \"kafka:9092\",         \"topic.produce\": \"incoming-messages\"       }     },     ...   ] }  <\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">boostrap.server<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043f\u0438\u0441\u043e\u043a \u0445\u043e\u0442\u0441\u0442\u043e \u0438 \u043f\u043e\u0440\u0442\u043e\u0432 Apache Kafka, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">topic.produce<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043f\u0438\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 OpenIG \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">topic.consume<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043f\u0438\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">uri<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 OpenIG<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">method<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0435\u0442\u043e\u0434 HTTP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 OpenIG \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e HTTP<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 OpenIG, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 Apache Kafka:<\/p>\n<p><code>routes\/10-http2kafka.json<\/code>:<\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'PUT') and matches(request.uri.path, '^\/http2kafka$')}\",   \"condition\": \"${(request.method == 'PUT') and matches(request.uri.path, '^\/http2kafka$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {     \"filters\": [],       \"handler\": {         \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [             {               \"handler\": \"kafka-consumer\"             }           ]         }       }     }   } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>openig\/config<\/code><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code class=\"bash\">docker compose -f docker-compose.yml up <\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0442\u043e\u043f\u0438\u043a \u0434\u043b\u044f Apache Kafka. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">docker exec openig-mb-example-kafka-1 kafka-topics.sh --create --topic topic1 --bootstrap-server localhost:9092 <\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 OpenIG \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435:<\/p>\n<pre><code class=\"bash\">curl -v -X PUT --data '{\"data\": \"test\"}' -H 'Content-Type: application\/json' '&lt;http:\/\/localhost:8080\/http2kafka&gt;' *   Trying 127.0.0.1:8080... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8080 (#0) &gt; PUT \/http2kafka HTTP\/1.1 &gt; Host: localhost:8080 &gt; User-Agent: curl\/7.68.0 &gt; Accept: *\/* &gt; Content-Type: application\/json &gt; Content-Length: 16 &gt;  * upload completely sent off: 16 out of 16 bytes * Mark bundle as not supporting multiuse &lt; HTTP\/1.1 202 Accepted &lt; Server: Apache-Coyote\/1.1 &lt; Content-Length: 0 &lt; Date: Wed, 13 Apr 2022 12:34:03 GMT &lt;  * Connection #0 to host localhost left intact <\/code><\/pre>\n<pre><code class=\"bash\">docker exec openig-mb-example-kafka-1 kafka-console-consumer.sh --topic topic1 --from-beginning --bootstrap-server localhost:9092 {\"data\": \"test\"} <\/code><\/pre>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 Kafka \u0432 HTTP<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0442\u043e\u043f\u0438\u043a\u0430 <code>topic2<\/code> Apache Kafka \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<p>\u041f\u043e\u0442\u0443\u0448\u0438\u0442\u0435 Docker \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<pre><code class=\"bash\">docker compose -f docker-compose.yml down <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Kafka producer.<\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"kafka-consumer\",       \"type\": \"MQ_Kafka\",       \"config\": {         \"bootstrap.servers\": \"kafka:9092\",         \"topic.consume\": \"topic2\",         \"method\": \"POST\"       }     },     ...   ] } <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 OpenIG \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 Apache Kafka \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<p><code>routes\/10-kafka2http.json<\/code><\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"condition\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {       \"filters\": [],       \"handler\": {       \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [{               \"handler\": \"ClientHandler\",               \"capture\": \"all\",               \"baseURI\": \"${system['endpoint.api']}\"           }]         }       }     }   } } <\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>baseURI<\/code> . \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d URI \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 HTTP. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>docker-compose.yaml -Dendpoint.api=http:\/\/sample-service:8080<\/code> \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 OpenIG<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 Apache Kafka \u0442\u043e\u043f\u0438\u043a <code>topic2<\/code>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<pre><code class=\"bash\">docker exec openig-mb-example-kafka-1 kafka-topics.sh --create --topic topic2 --bootstrap-server localhost:9092 <\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u043e\u043f\u0438\u043a:<\/p>\n<pre><code class=\"bash\">docker exec -it openig-mb-example-kafka-1 kafka-console-producer.sh --topic topic2 --bootstrap-server localhost:9092 &gt;{\"data\": \"test\"} <\/code><\/pre>\n<p>\u0412 \u043b\u043e\u0433\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <code>sample-service<\/code>  \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e OpenIG \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<pre><code class=\"bash\">2024-07-05T08:46:37.540Z DEBUG 1 --- [nio-8080-exec-1] o.s.w.f.CommonsRequestLoggingFilter      : After request [POST \/kafka2http, headers=[correlation-id:\"8dd45456-433d-42cb-b992-27047ae75ed9\", kafka-offset:\"0\", kafka-timestamp:\"1720169196044\", kafka-timestamp-date:\"Fri Jul 05 08:46:36 UTC 2024\", kafka-topic:\"topic2\", content-length:\"16\", host:\"sample-service:8080\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpAsyncClient\/4.1.4 (Java\/17.0.9)\"], payload={\"data\": \"test\"}] <\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 OpenIG Apache Kafka<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u043d\u0435\u0442 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0440\u043e\u043a\u0435\u0440\u0430, \u0442\u043e OpenIG \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Apache Kafka, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG \u043e\u0431\u044a\u0435\u043a\u0442 <code>EmbeddedKafka<\/code><\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...       {         \"name\": \"EmbeddedKafka\",         \"type\": \"EmbeddedKafka\",         \"config\": {           \"zookeper.port\": \"${system['zookeper.port']}\",           \"security.inter.broker.protocol\": \"${empty system['keystore.location'] ?'PLAINTEXT':'SSL'}\",           \"listeners\": \"${system['kafka.bootstrap']}\",           \"advertised.listeners\": \"${system['kafka.bootstrap']}\",           \"ssl.endpoint.identification.algorithm\": \"\",           \"ssl.enabled.protocols\":\"TLSv1.2\",           \"ssl.keystore.location\":\"${system['keystore.location']}\",           \"ssl.keystore.password\":\"${empty system['keystore.password']?'changeit':system['keystore.password']}\",           \"ssl.key.password\":\"${empty system['key.password']?'changeit':system['key.password']}\",           \"ssl.truststore.location\":\"${system['truststore.location']}\",           \"ssl.truststore.password\":\"${empty system['truststore.password']?'changeit':system['truststore.password']}\"         },     ...   ] } <\/code><\/pre>\n<p>\u0412\u0430\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <code>EmbeddedKafka<\/code>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">zookeper.port<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0440\u0442 Zookeper \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Apache Kafka. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, Kafra \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">listeners<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u0435\u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Apache Kafka.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">advertised.listeners<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u0435\u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e Apache Kafka.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 Kafka listener \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 heap OpenIG \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f Kafka \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP (\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0440\u043e\u043a\u0435\u0440).<\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...       {       \"name\": \"kafka-consumer\",       \"type\": \"MQ_Kafka\",       \"config\": {         \"bootstrap.servers\": \"openig:9092\",         \"topic.consume\": \"topic1\",         \"method\": \"POST\",         \"uri\": \"\/kafka2http\"       }     ...   ] } <\/code><\/pre>\n<p><code>10-kafka2http.json<\/code><\/p>\n<pre><code class=\"json\">{   \"name\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"condition\": \"${(request.method == 'POST') and matches(request.uri.path, '^\/kafka2http$')}\",   \"monitor\": true,   \"timer\": true,   \"handler\": {     \"type\": \"Chain\",     \"config\": {       \"filters\": [],       \"handler\": {       \"type\": \"DispatchHandler\",         \"config\": {           \"bindings\": [{               \"handler\": \"ClientHandler\",               \"capture\": \"all\",               \"baseURI\": \"${system['endpoint.api']}\"           }]         }       }     }   } <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 OpenIG. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c topic \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0442 topic.<\/p>\n<pre><code class=\"bash\">$ kafka-console-producer.sh --topic topic1 --bootstrap-server localhost:9092 &gt;{\"data\": \"test\"} <\/code><\/pre>\n<p>\u0412 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0432 \u043b\u043e\u0433\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 OpenIG \u0438\u0437 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP.<\/p>\n<pre><code>2022-04-21 07:26:14.645 DEBUG 1 --- [nio-8080-exec-6] o.s.w.f.CommonsRequestLoggingFilter      : After request [POST \/kafka2http, headers=[kafka-offset:\"29\", kafka-topic:\"topic2\", content-length:\"16\", host:\"sample-service:8080\", connection:\"Keep-Alive\", user-agent:\"Apache-HttpAsyncClient\/4.1.4 (Java\/1.8.0_212)\"], payload={\"data\": \"test\"}] <\/code><\/pre>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 IBM MQ<\/h2>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 IBM MQ<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e HTTP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 topic IBM MQ:<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a IBM MQ Consumer \u0432 heap \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenIG:<\/p>\n<p><code>config.json<\/code><\/p>\n<pre><code class=\"json\">{   \"heap\": [     ...     {       \"name\": \"mq-producer\",       \"type\": \"MQ_IBM\",       \"config\": {         \"XMSC_WMQ_CONNECTION_NAME_LIST\":\"mq(1414)\",         \"XMSC_WMQ_CHANNEL\":\"DEV.APP.SVRCONN\",<\/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-427414","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427414","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=427414"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/427414\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}