diff --git a/.gitignore b/.gitignore index e47c90308a..74101298af 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,6 @@ dist .env.test.local .env.production.local tmp + +# WebStorm +.idea diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0.json b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0.json index f53fbe4fdf..5525d5b811 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0.json +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0.json @@ -14,17 +14,5 @@ "sidebar.tutorialSidebar.category.Design Document": { "message": "设计文档", "description": "The label for category Design Document in sidebar tutorialSidebar" - }, - "sidebar.tutorialSidebar.category.Upgrade Guide": { - "message": "升级指南", - "description": "The label for category Upgrade Guide in sidebar tutorialSidebar" - }, - "sidebar.tutorialSidebar.category.Event Handling and Integration": { - "message": "事件处理和集成", - "description": "The label for category Event Handling and Integration in sidebar tutorialSidebar" - }, - "sidebar.tutorialSidebar.category.Observability": { - "message": "可观测性", - "description": "The label for category Observability in sidebar tutorialSidebar" } } diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/02-https.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/02-https.md deleted file mode 100644 index 63b9a315db..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/02-https.md +++ /dev/null @@ -1,32 +0,0 @@ -# HTTPS - -1.在eventmesh-runtime 中配置 - -``` -eventMesh.properties (添加如下配置) -eventMesh.server.useTls.enabled=true // 默认值 false - - -config env varible --Dssl.server.protocol=TLSv1.1 // 默认值 TLSv1.1 --Dssl.server.cer=sChat2.jks // 把文件放到启动脚本start.sh 指定的conPath目录下 --Dssl.server.pass=sNetty -``` - -2.在eventmesh-sdk-java 中配置 - -``` -// 创建producer -LiteClientConfig eventMeshHttpClientConfig = new eventMeshHttpClientConfig(); -... - -// 设置开启TLS -eventMeshHttpClientConfig.setUseTls(true); -LiteProducer producer = new LiteProducer(eventMeshHttpClientConfig); - - -// 配置环境变量 --Dssl.client.protocol=TLSv1.1 // 默认值 TLSv1.1 --Dssl.client.cer=sChat2.jks // 把文件放到应用指定的conPath目录下 --Dssl.client.pass=sNetty -``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/05-webhook.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/05-webhook.md deleted file mode 100644 index 9fb85a898b..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/05-webhook.md +++ /dev/null @@ -1,332 +0,0 @@ -# 使用 Webhook 订阅事件 - -## Webhook 使用流程 - -### 第一步:在 eventmesh 配置 Webhook 相关信息并且启动 - -配置说明: - -``` -# 是否启动Webhook admin服务 -eventMesh.webHook.admin.start=true - -# Webhook事件配置存储模式。目前只支持file与nacos -eventMesh.webHook.operationMode=file -# 文件存储模式的文件存放路径,如果写上#{eventMeshHome},在eventMesh根目录 -eventMesh.webHook.fileMode.filePath= #{eventMeshHome}/webhook - -# nacos存储模式,配置命名规则是eventMesh.webHook.nacosMode.{nacos 原生配置key} 具体的配置请看 [nacos github api](https://github.com/alibaba/nacos/blob/develop/api/src/main/java/com/alibaba/nacos/api/SystemPropertyKeyConst.java) -## nacos的地址 -eventMesh.webHook.nacosMode.serverAddr=127.0.0.1:8848 - -# Webhook CloudEvent 发送模式。与 eventMesh.connector.plugin.type 配置一样 -eventMesh.webHook.producer.connector=standalone -``` - -### 第二步:添加 Webhook 配置信息 - -配置信息说明: - -```java - /** - * 厂商发送事件时调用的地址。[http or https]://[domain or IP]:[port]/webhook/[callbackPath] - * 在厂商的Webhook配置中需要填写完整url,比如:http://127.0.0.1:10504/webhook/test/event - * callbackPath 唯一 - * manufacturer callback path - */ - private String callbackPath; - - /** - * 厂商的名字 - * manufacturer name ,like github - */ - private String manufacturerName; - - /** - * 厂商的域名 - * manufacturer domain name, like www.github.com - */ - private String manufacturerDomain; - - /** - * 厂商的事件名 - * Webhook event name ,like rep-push - */ - private String manufacturerEventName; - - /** - * - * http header content type - */ - private String contentType = "application/json"; - - /** - * 说明 - * description of this WebHookConfig - */ - private String description; - - /** - * 有一些厂商使用验签方式, - * secret key ,for authentication - */ - private String secret; - - /** - * 有一些厂商使用验签方式,使用账户密码方式 - * userName ,for HTTP authentication - */ - private String userName; - - /** - * 有一些厂商使用验签方式,使用账户密码方式 - * password ,for HTTP authentication - */ - private String password; - - - - /** - * 事件发送到那个 topic - * roll out event name ,like topic to mq - */ - private String cloudEventName; - - /** - * roll out data format -> CloudEvent serialization mode - * If HTTP protocol is used, the request header contentType needs to be marked - */ - private String dataContentType = "application/json"; - - /** - * cloudEvent 事件对象唯一标识符识别方式,uuid 或者 manufacturerEventId(厂商 id) - * id of cloudEvent ,like uuid/manufacturerEventId - */ - private String cloudEventIdGenerateMode; - -``` - -#### 添加接口 - -路径: /webhook/insertWebHookConfig - -方法:POST - -contentType: application/json - -输入参数: - -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| -- | -- | -- | -- | -- | -| callbackPath | 调用地址,唯一地址 | string | 是 | null | -| manufacturerName | 厂商名 | string | 是 | null | -| manufacturerDomain | 厂商的域名 | string | 是 | null | -| manufacturerEventName | 厂商事件名 | string | 是 | null | -| contentType | http connettype | string | 否 | application/json | -| description | 配置说明 | string | 否 | null | -| secret | 验签密钥 | string | 是 | null | -| userName | 用户名 | string | 否 | null | -| password | 用户密码 | string | 否 | null | -| cloudEventName | 事件名 | string | 是 | null | -| cloudEventIdGenerateMode | cloudEvent 事件对象唯一标识符识别方式,uuid 或者 manufacturerEventId(厂商 id) | string | 否 | manufacturerEventId | - -例子: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github", - "manufacturerDomain":"www.github.com", - "manufacturerEventName":"all", - "cloudEventName":"github-eventmesh", - "secret": "testSecret" -} -``` - -输出参数:1 成功,0 失败 - -#### 通过 callbackPath 查询 WebHookConfig - -路径: /webhook/queryWebHookConfigById - -方法:POST - -contentType: application/json - -输入参数: -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| -- | -- | -- | -- | -- | -| callbackPath | 调用地址,唯一地址 | string | 是 | null | -| manufacturerName | 调用地址的提供方 | string | 是 | null | - -例子: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github" -} -``` - -输出参数: - -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| -- | -- | -- | -- | -- | -| callbackPath | 调用地址,唯一地址 | string | 是 | null | -| manufacturerName | 厂商名 | string | 是 | null | -| manufacturerDomain | 厂商的域名 | string | 是 | null | -| manufacturerEventName | 厂商事件名 | string | 是 | null | -| contentType | http connettype | string | 否 | application/json | -| description | 配置说明 | string | 否 | null | -| secret | 验签密钥 | string | 是 | null | -| userName | 用户名 | string | 否 | null | -| password | 用户密码 | string | 否 | null | -| cloudEventName | 事件名() | string | 是 | null | -| cloudEventIdGenerateMode | cloudEvent 事件对象唯一标识符识别方式,uuid 或者 manufacturerEventId(厂商 id) | string | 否 | manufacturerEventId | - -#### 通过 manufacturer 查询 WebHookConfig 列表 - -路径: /webhook/queryWebHookConfigByManufacturer - -方法:POST - -contentType: application/json - -输入参数: - -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| -- | -- | -- | -- | -- | -| manufacturerName | 厂商名 | string | 是 | null | -| pageNum | 分页查询中的页数 | string | 是 | null | -| pageSize | 每一页的结果数量 | string | 是 | null | - -例子: - -```json -{ - "manufacturerName":"github", - "pageNum":1, - "pageSize":2 -} -``` - -输出参数: - -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| -- | -- | -- | -- | -- | -| callbackPath | 调用地址,唯一地址 | string | 是 | null | -| manufacturerName | 厂商名 | string | 是 | null | -| manufacturerDomain | 厂商的域名 | string | 是 | null | -| manufacturerEventName | 厂商事件名 | string | 是 | null | -| contentType | http connettype | string | 否 | application/json | -| description | 配置说明 | string | 否 | null | -| secret | 验签密钥 | string | 是 | null | -| userName | 用户名 | string | 否 | null | -| password | 用户密码 | string | 否 | null | -| cloudEventName | 事件名() | string | 是 | null | -| cloudEventIdGenerateMode | cloudEvent 事件对象唯一标识符识别方式,uuid 或者 manufacturerEventId(厂商 id) | string | 否 | manufacturerEventId | - -#### 更新接口 - -路径: /webhook/updateWebHookConfig - -方法:POST - -contentType: application/json - -输入参数: - -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| ------------------------ | ------------------------------------------------------------ | ------ | ---- | ------------------- | -| callbackPath | 调用地址,唯一地址 | string | 是 | null | -| manufacturerName | 厂商名 | string | 是 | null | -| manufacturerDomain | 厂商的域名 | string | 是 | null | -| manufacturerEventName | 厂商事件名 | string | 是 | null | -| contentType | http connettype | string | 否 | application/json | -| description | 配置说明 | string | 否 | null | -| secret | 验签密钥 | string | 是 | null | -| userName | 用户名 | string | 否 | null | -| password | 用户密码 | string | 否 | null | -| cloudEventName | 事件名 | string | 是 | null | -| cloudEventIdGenerateMode | cloudEvent 事件对象唯一标识符识别方式,uuid 或者 manufacturerEventId(厂商 id) | string | 否 | manufacturerEventId | - -例子: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github", - "manufacturerDomain":"www.github.com", - "manufacturerEventName":"all", - "cloudEventName":"github-eventmesh", - "secret": "testSecret" -} -``` - -输出参数:1 成功,0 失败 - -#### 删除接口 - -路径: /webhook/deleteWebHookConfig - -方法:POST - -contentType: application/json - -输入参数: - -| 字段 | 说明 | 类型 | 必须 | 默认值 | -| ---------------- | ------------------ | ------ | ---- | ------ | -| callbackPath | 调用地址,唯一地址 | string | 是 | null | -| manufacturerName | 调用地址的提供方 | string | 是 | null | - -例子: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github" -} -``` - -输出参数:1 成功,0 失败 - -### 第三步:查看配置是否成功 - -1. file 存储模式。请到 eventMesh.webHook.fileMode.filePath 目录下查看。文件名为`/`转换为`.`的 callbackPath。 -2. nacos 存储模式。请到 eventMesh.webHook.nacosMode.serverAddr 配置的 nacos 服务中查看。 - -### 第四步:配置 cloudevent 的消费者 - - -### 第五步:在厂商配置 Webhook 相关信息 - -> 厂商操作请看[厂商 Webhook 操作说明](#厂商-Webhook-操作说明) - -## 厂商 Webhook 操作说明 - -### github 注册 - -#### 第一步:进入对应的项目 - -#### 第二步:点击setting - -![](/images/design-document/webhook/webhook-github-setting.png) - -#### 第三步:点击Webhooks - -![](/images/design-document/webhook/webhook-github-webhooks.png) - -#### 第四步:点击 Add webhook - -![](/images/design-document/webhook/webhook-github-add.png) - -#### 第五步: 填写webhook信息 - -![](/images/design-document/webhook/webhook-github-info.png) - -Payload URL: EventMesh 服务地址和调用地址,需包含协议头。例如,当调用地址 `callbackPath` 为 `/webhook/github/eventmesh/all` 时,Payload URL 为 `http://www.example.com:10105/webhook/github/eventmesh/all` - -Content Type: http header content type - -Secret: 验签字符串 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/_category_.json deleted file mode 100644 index 7706f45770..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Event Handling and Integration", - "collapsed": false -} diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/06-workflow.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-workflow.md similarity index 95% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/06-workflow.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-workflow.md index 0eb2cc8a20..bed1a7fc26 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/06-workflow.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-workflow.md @@ -1,4 +1,4 @@ -# EventMesh 工作流 +# EventMesh工作流 ## 业务场景 @@ -6,7 +6,7 @@ 为了实现高可用和高性能,你可以使用事件驱动架构(EDA)构建微服务应用去处理商店前端,订单管理,支付处理和发货管理。你可以在云上部署整个系统。要处理高并发,你可以利用消息系统缓冲,并扩展多个微服务实例。架构类似于: -![Workflow Use Case](/images/design-document/workflow-use-case.jpg) +![Workflow Use Case](../../../../../static/images/design-document/workflow-use-case.jpg) 当每个微服务都在自己的事件通道上运行时,EventMesh在执行事件编排方面发挥着至关重要的作用。 @@ -32,7 +32,7 @@ Serverless工作流定义了一种领域特定语言(DSL)来描述有状态 AsyncAPI是一项开源计划,旨在改善事件驱动体系结构(EDA)的当前状态。我们的长期目标是让使用EDA和使用REST API一样容易。包括从文档到代码生成、发现到事件管理。现在应用于REST API的大多数流程也适用于事件驱动/异步API。 -详见[AsyncAPI官网](https://www.asyncapi.com/docs/guides) +详见[AsyncAPI官网](https://www.asyncapi.com/docs/getting-started) ### 工作流示例 @@ -178,13 +178,13 @@ events: 对应的工作流图如下: -![Workflow Diagram](/images/design-document/workflow-diagram.png) +![Workflow Diagram](../../../../../static/images/design-document/workflow-diagram.png) ## EventMesh工作流引擎 在下面的体系结构图中, EventMesh目录, EventMesh工作流引擎 和 EventMesh Runtime在三个不同的处理器中运行。 -![Workflow Architecture](/images/design-document/workflow-architecture.jpg) +![Workflow Architecture](../../../../../static/images/design-document/workflow-architecture.jpg) 运行工作流的步骤如下: @@ -256,4 +256,3 @@ EventMesh目录存储发布者、订阅者和通道元数据。由以下模块 - 重试模块 管理事件发布到EventMesh Runtime的重试逻辑。 - \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/01-metrics-export.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/01-metrics-export.md deleted file mode 100644 index 8120cdbcb3..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/01-metrics-export.md +++ /dev/null @@ -1,47 +0,0 @@ -# EventMesh 指标(OpenTelemetry 和 Prometheus) - -## 介绍 - -[EventMesh](https://github.com/apache/eventmesh) 是一个动态的云原生事件基础设施。 - -## OpenTelemetry 概述 - -OpenTelemetry 是工具、API 和 SDK 的集合。您可以使用它来检测、生成、收集和导出遥测数据(指标、日志和跟踪)以进行分析,以便了解您的软件的性能和行为。 - -## 概述 Prometheus - -使用领先的开源监控解决方案为您的指标和警报提供支持。 - -- 尺寸数据 -- 强大的查询 -- 伟大的可视化 -- 高效存储 -- 操作简单 -- 精准预警 -- 许多客户端库 -- 许多集成 - -## 要求 - -### 功能要求 - -| Requirement ID | Requirement Description | Comments | -| :------------- | ------------------------------------------------------------ | ------------- | -| F-1 | EventMesh users should be able to observe HTTP metrics from Prometheus | Functionality | -| F-2 | EventMesh users should be able to observe TCP metrics from Prometheus | Functionality | - -## 设计 细节 - -使用由提供的儀表儀器 OpenTelemetry 觀察指標存在於 EventMesh 然後導出到 Prometheus. - -1、初始化儀表儀器 - -2、設置 Prometheus 服務器 - -3、创建了不同的指标观察者 - -## 附录 - -### 参考资料 - - diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/02-tracing.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/02-tracing.md deleted file mode 100644 index 8a3addea6d..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/02-tracing.md +++ /dev/null @@ -1,87 +0,0 @@ -# 分布式追踪 - -## OpenTelemetry概述 - -OpenTelemetry是一组API和SDK的工具,您可以使用它来仪器化、生成、收集和导出遥测数据(指标、日志和追踪),以便进行分析,以了解您的软件性能和行为。 - -## 需求 - -- 设置追踪器 -- 不同的导出器 -- 在服务器中开始和结束跨度 - -## 设计细节 - -- 跨度处理器:BatchSpanProcessor - -- 导出器:默认为日志,可以从属性中更改 - -```java -// Configure the batch spans processor. This span processor exports span in batches. -BatchSpanProcessor batchSpansProcessor = - BatchSpanProcessor.builder(exporter) - .setMaxExportBatchSize(512) // set the maximum batch size to use - .setMaxQueueSize(2048) // set the queue size. This must be >= the export batch size - .setExporterTimeout( - 30, TimeUnit.SECONDS) // set the max amount of time an export can run before getting - // interrupted - .setScheduleDelay(5, TimeUnit.SECONDS) // set time between two different exports - .build(); -OpenTelemetrySdk.builder() - .setTracerProvider( - SdkTracerProvider.builder().addSpanProcessor(batchSpansProcessor).build()) - .build(); -``` - -1. 当使用`EventMeshHTTPServer`类的`init()`方法时,类`AbstractHTTPServer`将获取跟踪器。 - -```java -super.openTelemetryTraceFactory = new OpenTelemetryTraceFactory(eventMeshHttpConfiguration); -super.tracer = openTelemetryTraceFactory.getTracer(this.getClass().toString()); -super.textMapPropagator = openTelemetryTraceFactory.getTextMapPropagator(); -``` - -2. 然后,在类`AbstractHTTPServer`中的跟踪将起作用。 - -## 问题 - -### 如何在类“OpenTelemetryTraceFactory”中设置不同的导出器?(已解决) - -在从属性中获取导出器类型之后,如何处理它。 - -`logExporter`只需要创建新实例即可。 - -但是,“zipkinExporter”需要新建并使用“getZipkinExporter()”方法。 - -## 解决方案 - -### 不同导出器的解决方案 - -使用反射获取导出器。 - -首先,不同的导出器必须实现接口“EventMeshExporter”。 - -然后,我们从配置中获取导出器名称,并反射到该类。 - -```java -//different spanExporter -String exporterName = configuration.eventMeshTraceExporterType; -//use reflection to get spanExporter -String className = String.format("org.apache.eventmesh.runtime.exporter.%sExporter",exporterName); -EventMeshExporter eventMeshExporter = (EventMeshExporter) Class.forName(className).newInstance(); -spanExporter = eventMeshExporter.getSpanExporter(configuration); -``` - -另外,这将包含try catch。如果无法成功获取指定的导出器,则将使用默认的日志导出器。 - -#### 不同导出器的改进 - -SPI(待完成) - -## 附录 - -### 参考资料 - -- - -- diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/_category_.json deleted file mode 100644 index 9a251b1a4d..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Observability", - "collapsed": false -} diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/01-runtime-protocol.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-runtime-protocol.md similarity index 97% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/01-runtime-protocol.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-runtime-protocol.md index 66615e53aa..793f7da867 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/01-runtime-protocol.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-runtime-protocol.md @@ -1,7 +1,9 @@ -# TCP 协议文档 +# TCP协议文档 #### 1. 协议格式 +![dataFlow](../../../../../static/images/design-document/tcp-protocol.png) + **消息组成详解:** ``` @@ -140,15 +142,15 @@ public enum Command { + 发送RR消息 -![rr-msg](/images/design-document/sync-message.png) +![rr-msg](../../../../../static/images/design-document/sync-message.png) + 发送异步单播消息 -![async-msg](/images/design-document/async-message.png) +![async-msg](../../../../../static/images/design-document/async-message.png) + 发送广播消息 -![broadcast-msg](/images/design-document/broadcast-message.png) +![broadcast-msg](../../../../../static/images/design-document/broadcast-message.png) ## HTTP协议文档 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/03-schema-registry.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/03-schema-registry.md deleted file mode 100644 index bfe925c476..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/03-schema-registry.md +++ /dev/null @@ -1,135 +0,0 @@ -# EventMesh 模式注册中心 (OpenSchema) - -## Schema 和 Schema 注册概述 - -### Schema - -模式代表对序列化实例(字符串/流/s文件/……)的描述,具有两个属性。首先,它也是序列化类型的格式。其次,它定义了这些序列化实例应满足的要求。 - -除了描述序列化实例,模式还可用于验证实例是否合法。因为它定义了序列化实例的 ```type```(和其他属性)以及内部的键。以 JSON 模式为例,它不仅可用于描述 JSON 字符串,还可用于验证字符串是否满足模式[[1]](#References).中定义的属性。 - -常见的模式有 JSON 模式、Protobuf 模式和 Avro 模式。 - -### Schema 注册中心 - -模式注册中心是一个提供 RESTful 接口的服务器。它可以接收和存储来自客户端的模式,并为其他客户端从中检索模式提供接口。 - -它可用于验证过程和(去)序列化过程 - -### 不同项目中 Schema 注册表的比较 - -项目 | 应用程序 -:---: | :--- -EMQ[[2]](#References) | 主要用于(去)序列化过程。使用 "模式注册表 "和 "规则匹配 "将信息从一种序列化格式传输到另一种序列化格式。serialization format to another. -Pulsar[[3]](#References) | 主要用于验证过程。使用 "模式注册表 "验证报文。 -Confluentinc[[4]](#References) | 在验证和(去)序列化过程中。 - -## OpenSchema 概览 - -OpenSchema[[5]](#References) 提出了在越来越多的现代云原生应用程序中交换消息和事件时的数据模式规范。它从三个方面(主题/模式/兼容性)设计了用于存储和检索 Avro、JSON Schema 和 Protobuf3 模式的 RESTful 接口。 - - -## 需求(目标) - -| 需求 ID | 需求描述 | 评价 | -| :------------- | ------------------------------------------------------------ | ------------- | -| F-1 | 在传输过程中,信息无需包含模式信息,从而提高效率。| 功能性 | -| F-2 | 可根据模式验证来自生产者的信息内容是否正确序列化。 | 功能性 | - -## 详细设计 - -### 架构设计 - -![OpenSchema](/images/design-document/schema-registry-architecture.png) - -### Schema Registry 下的信息传输过程 - -![Process](/images/design-document/schema-registry-process.jpg) - -信息传输的高级流程包括以下 10 个步骤: - -- 1: 消费者从 EventMesh 订阅 "主题 "信息。 -- 2: 生产者向 EventMesh 注册模式。 -- 3: EventMesh 向模式注册中心注册模式。 -- 4: 模式注册中心返回新创建模式的 ID;EventMesh 缓存该 ID 和模式。 -- 5: EventMesh 将模式的 ID 返回给生产者。 -- 6: Producer 在信息前面修补 ID,并将信息发送到 EventMesh。 -- 7: EventMesh 验证入口端口中的报文并将其发送到 EventStore;EventMesh 从 EventStore 中检索报文。 -- 8: EventMesh 解封 id 并将其发送至模式注册表(如果本地缓存中不存在此类``)。 -- 9: Schema Registry 返回模式,EventMesh 对其进行缓存。 -- 10: EventMesh 在消息前修补模式,并将其推送给消费者。 - -## 当前进度 - -### 状态 - -**当前状态**: 开发中 - -**讨论issue**: ISSUE #339 - -### 修改建议 - -该提案有两个方面。 - -首先是一个独立的开放模式注册表,其中包括模式的存储和兼容性检查。 -该提案正在制定中。 - -其次是 Eventmesh 中 Open Schema 的集成,其中包括架构验证。 该提案有待制定。 - -对于第一个提案,一些进展情况如下。 - -#### 状态代码和异常代码 - -No. | 状态码 | 异常码 | 描述 | 状态 ---- | :---: | :---: | :---: | :---: -1 | 401 | 40101 | 未授权异常 | ✔ -2 | 404 | 40401 | Schema 不存在异常 | ✔ -3 | ^ | 40402 | Subject 不存在异常 | ✔ -4 | ^ | 40403 | 版本不存在异常 | ✔ -5 | 409 | 40901 | 兼容性异常 | ✔ -6 | 422 | 42201 | Schema 格式异常 | ✔ -7 | ^ | 42202 | Subject 格式异常 | ✔ -8 | ^ | 42203 | 版本格式异常 | ✔ -9 | ^ | 42204 | 兼容性格式异常 | ✔ -10 | 500 | 50001 | 存储服务异常 | ✔ -11 | ^ | 50002 | 超时异常 | ✔ - -#### API 开发状态 - -No. | 类型 | URL | 响应 | 异常 | 代码是否完成 | 测试是否完成 ---- | --- | --- | --- | --- | --- | --- -1 | GET | /schemas/ids/{string: id} | `Schema.class` | 40101\40401\50001 | ✔ | ❌ -2 | GET | /schemas/ids/{string: id}/subjects | `SubjectAndVersion.class` | 40101\40401\50001 | ✔ | ❌ -3 | GET | /subjects | `List\` | 40101\50001 | ✔ | ❌ -4 | GET | /subjects/{string: subject}/versions | `List\` | 40101\40402\50001 | ✔ | ❌ -5 | DELETE | /subjects/(string: subject) | `List\` | 40101\40402\50001 | ✔ | ❌ -6 | GET | /subjects/(string: subject) | `Subject.class` | 40101\40402\50001 | ✔ | ❌ -7 | GET | /subjects/(string: subject)/versions/(version: version)/schema | `SubjectWithSchema.class` | 40101\40402\40403\50001 | ✔ | ❌ -8 | POST | /subjects/(string: subject)/versions | `SchemaIdResponse.class` | 40101\40901\42201\50001\50002 | - | ❌ -9 | POST | /subjects/(string: subject)/ | `Subject.class` | 40101\40901\42202\50001\50002 | ✔ | ❌ -10 | DELETE | /subjects/(string: subject)/versions/(version: version) | `int` | 40101\40402\40403\40901\50001| - | ❌ -11 | POST | /compatibility/subjects/(string: subject)/versions/(version: version) | `CompatibilityResultResponse.class` | 40101\40402\40403\42201\42203\50001| - | ❌ -12 | GET | /compatibility/(string: subject) | `Compatibility.class` | 40101\40402\50001 | ✔ | ❌ -13 | PUT | /compatibility/(string: subject) | `Compatibility.class` | 40101\40402\40901\42204\50001 | - | ❌ - -#### 项目总体结构 - -```SchemaController.java```+```SchemaService.java``` : ```OpenSchema 7.1.1~7.1.2 (API 1~2)``` - -```SubjectController.java```+```SubjectService.java``` : ```OpenSchema 7.2.1~7.2.8 (API 3~10)``` - -```CompatibilityController.java```+```CompatibilityService.java``` : ```OpenSchema 7.3.1~7.3.3 (API 11~13)``` + ```Check for Compatibility``` - -![项目结构](/images/design-document/schema-registry-project-structure.png) - -## 参考文献 - -[1] [Schema 验证器 (github.com)](https://github.com/search?q=schema+validator) - -[2] [EMQ: Schema Registry](https://www.jianshu.com/p/33e0655c642b) - -[3] [Pulsar: Schema Registry](https://mp.weixin.qq.com/s/PaB66-Si00cX80py5ig5Mw) - -[4] [confluentinc/schema-registry](https://github.com/confluentinc/schema-registry) - -[5] [openmessaging/openschema](https://github.com/openmessaging/openschema) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-stream.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/03-stream.md similarity index 88% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-stream.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/03-stream.md index 20e6412f2a..bea2e711ac 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-stream.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/03-stream.md @@ -34,7 +34,7 @@ ## 架构 -![Stream Architecture](/images/design-document/stream-architecture.png) +![Stream Architecture](../../../../../static/images/design-document/stream-architecture.png) ## 设计 @@ -80,7 +80,7 @@ Component 接口是主要的入口点,您可以使用 Component 对象作为工厂来创建 EndPoint 对象。 -![Stream Component Interface](/images/design-document/stream-component-interface.png) +![Stream Component Interface](../../../../../static/images/design-document/stream-component-interface.png) ### EndPoint(端点) @@ -89,14 +89,14 @@ EndPoint 作为创建消费者、生产者和事件对象的工厂。 - `createConsumer()` — 创建消费者端点,该端点表示路由开始的源端点。 - `createProducer()` — 创建生产者端点,该端点表示路由末端的目标端点。 -![Stream Component Routes](/images/design-document/stream-component-routes.png) +![Stream Component Routes](../../../../../static/images/design-document/stream-component-routes.png) #### Producer(生产者) 用户可以创建以下类型的生产者 > 同步生产者:处理线程阻塞,直到生产者完成事件处理。 -![Stream Sync Producer](/images/design-document/stream-sync-producer.png) +![Stream Sync Producer](../../../../../static/images/design-document/stream-sync-producer.png) 未来将会实现的生产者类型: @@ -107,7 +107,7 @@ EndPoint 作为创建消费者、生产者和事件对象的工厂。 用户可以创建以下类型的消费者 > 事件驱动的消费者:当消息绑定器调用消费者中的方法时,开始处理传入请求。 -![Stream Event-Driven Consumer](/images/design-document/stream-event-driven-consumer.png) +![Stream Event-Driven Consumer](../../../../../static/images/design-document/stream-event-driven-consumer.png) 未来将会实现的消费者类型: diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/04-schema-registry.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/04-schema-registry.md new file mode 100644 index 0000000000..03f70a7407 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/04-schema-registry.md @@ -0,0 +1,134 @@ +# EventMesh Schema Registry (OpenSchema) + +## Overview of Schema and Schema Registry + +### Schema + +A Schema stands for the description of serialization instances(string/stream/file/...) and has two properties. First, it is also in the format of serialization type. Second, it defines what requirements such serialized instances should satisfy. + +Besides describing a serialization instance, a Schema may also be used for validating whether an instance is legitimate. The reason is that it defines the ```type```(and other properties) of a serialized instance and inside keys. Taking JSON Schema for example, it could not only be referred when describing a JSON string, but also be used for validating whether a string satisfies properties defined in the schema[[1]](#References). + +Commonly, there are JSON Schema, Protobuf Schema, and Avro Schema. + +### Schema Registry + +Schema Registry is a server provides RESTful interfaces. It could receive and store Schemas from clients, as well as provide intrefaces for other clients to retrieve Schemas from it. + +It could be applied to validation process and (de-)serialization process. + +### Comparison of Schema Registry in Different Projects + +Project | Application +:---: | :--- +EMQ[[2]](#References) | Mainly in (de-)serialization process. Use "Schema Registry" and "Rule Matching" to transfer a message from one serialization format to another. +Pulsar[[3]](#References) | Mainly in validation process. Use "Schema Registry" to validate a message. +Confluentinc[[4]](#References) | In both validation and (de-)serialization process. + +## Overview of OpenSchema + +OpenSchema[[5]](#References) proposes a specification for data schema when exchanging the message and event in more and more modern cloud-native applications. It designs a RESTful interface for storing and retrieving such as Avro, JSON Schema, and Protobuf3 schemas from three aspects(subject/schema/compatibility). + +## Requirements(Goals) + +| Requirement ID | Requirement Description | Comments | +| :------------- | ------------------------------------------------------------ | ------------- | +| F-1 | In transmission, no message needs to contain schema information which bring efficiency. | Functionality | +| F-2 | The message content from producer could be validated whether serialized correctly according to schema. | Functionality | + +## Design Details + +### Architecture + +![OpenSchema](../../../../../static/images/design-document/schema-registry-architecture.png) + +### Process of Transferring Messages under Schema Registry + +![Process](../../../../../static/images/design-document/schema-registry-process.jpg) + +The highlevel process of messages transmission contains 10 steps as follows: + +- 1: Consumer subscribes "TOPIC" messages from EventMesh. +- 2: Producer registers a schema to EventMesh. +- 3: EventMesh registers a schema to Schema Registry. +- 4: Schema Registry returns the id of newly created schema; EventMesh caches such id and schema. +- 5: EventMesh returns the id of schema to Producer. +- 6: Producer patches the id in front of messages and send messages to EventMesh. +- 7: EventMesh validates the messages in the entry port and send it to EventStore; EventMesh retrieves messages from EventStore. +- 8: EventMesh unpatches the id and send it to Schema Registry(if such `` does not exists in local cache). +- 9: Schema Registry returns schema and EventMesh caches it. +- 10: EventMesh patches schema in front of messages and push it to consumer. + +## Current Progress + +### Status + +**Current state**: Developing + +**Discussion thread**: ISSUE #339 + +### Proposed Changes + +The proposal has two aspects. + +First is a separated Open Schema Registry, which includes storage and compatibility check for schema. +This proposal is under developing. + +Second is the integration of Open Schema in Eventmesh, which includes validation for schema. This proposal is to be developed. + +As for the first proposal, some developing statuses are as follows. + +#### Status Code and Exception Code + +No. | Status Code | Exception Code | Description | status +--- | :---: | :---: | :---: | :---: +1 | 401 | 40101 | Unauthorized Exception | ✔ +2 | 404 | 40401 | Schema Non- Exception | ✔ +3 | ^ | 40402 | Subject Non-exist Exception | ✔ +4 | ^ | 40403 | Version Non-exist Exception | ✔ +5 | 409 | 40901 | Compatibility Exception | ✔ +6 | 422 | 42201 | Schema Format Exception | ✔ +7 | ^ | 42202 | Subject Format Exception | ✔ +8 | ^ | 42203 | Version Format Exception | ✔ +9 | ^ | 42204 | Compatibility Format Exception | ✔ +10 | 500 | 50001 | Storage Service Exception | ✔ +11 | ^ | 50002 | Timeout Exception | ✔ + +#### API Development Status + +No. | Type | URL | response | exception | code | test +--- | --- | --- | --- | --- | --- | --- +1 | GET | /schemas/ids/{string: id} | `Schema.class` | 40101\40401\50001 | ✔ | ❌ +2 | GET | /schemas/ids/{string: id}/subjects | `SubjectAndVersion.class` | 40101\40401\50001 | ✔ | ❌ +3 | GET | /subjects | `List\` | 40101\50001 | ✔ | ❌ +4 | GET | /subjects/{string: subject}/versions | `List\` | 40101\40402\50001 | ✔ | ❌ +5 | DELETE | /subjects/(string: subject) | `List\` | 40101\40402\50001 | ✔ | ❌ +6 | GET | /subjects/(string: subject) | `Subject.class` | 40101\40402\50001 | ✔ | ❌ +7 | GET | /subjects/(string: subject)/versions/(version: version)/schema | `SubjectWithSchema.class` | 40101\40402\40403\50001 | ✔ | ❌ +8 | POST | /subjects/(string: subject)/versions | `SchemaIdResponse.class` | 40101\40901\42201\50001\50002 | - | ❌ +9 | POST | /subjects/(string: subject)/ | `Subject.class` | 40101\40901\42202\50001\50002 | ✔ | ❌ +10 | DELETE | /subjects/(string: subject)/versions/(version: version) | `int` | 40101\40402\40403\40901\50001| - | ❌ +11 | POST | /compatibility/subjects/(string: subject)/versions/(version: version) | `CompatibilityResultResponse.class` | 40101\40402\40403\42201\42203\50001| - | ❌ +12 | GET | /compatibility/(string: subject) | `Compatibility.class` | 40101\40402\50001 | ✔ | ❌ +13 | PUT | /compatibility/(string: subject) | `Compatibility.class` | 40101\40402\40901\42204\50001 | - | ❌ + +#### Overall Project Structure + +```SchemaController.java```+```SchemaService.java``` : ```OpenSchema 7.1.1~7.1.2 (API 1~2)``` + +```SubjectController.java```+```SubjectService.java``` : ```OpenSchema 7.2.1~7.2.8 (API 3~10)``` + +```CompatibilityController.java```+```CompatibilityService.java``` : ```OpenSchema 7.3.1~7.3.3 (API 11~13)``` + ```Check for Compatibility``` + +![Project Structure](../../../../../static/images/design-document/schema-registry-project-structure.png) + +## References + +[1] [schema validator (github.com)](https://github.com/search?q=schema+validator) + +[2] [EMQ: Schema Registry](https://www.jianshu.com/p/33e0655c642b) + +[3] [Pulsar: Schema Registry](https://mp.weixin.qq.com/s/PaB66-Si00cX80py5ig5Mw) + +[4] [confluentinc/schema-registry](https://github.com/confluentinc/schema-registry) + +[5] [openmessaging/openschema](https://github.com/openmessaging/openschema) diff --git a/versioned_docs/version-v1.7.0/design-document/02-observability/01-metrics-export.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/05-metrics-export.md similarity index 92% rename from versioned_docs/version-v1.7.0/design-document/02-observability/01-metrics-export.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/05-metrics-export.md index 0fb8dbb5da..bab18761e3 100644 --- a/versioned_docs/version-v1.7.0/design-document/02-observability/01-metrics-export.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/05-metrics-export.md @@ -2,7 +2,7 @@ ## Introduction -[EventMesh](https://github.com/apache/eventmesh) is a dynamic cloud-native eventing infrastructure. +[EventMesh(incubating)](https://github.com/apache/incubator-eventmesh) is a dynamic cloud-native eventing infrastructure. ## An overview of OpenTelemetry diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/03-cloudevents.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/06-cloudevents.md similarity index 97% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/03-cloudevents.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/06-cloudevents.md index fb9d163793..708fdba00d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/03-cloudevents.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/06-cloudevents.md @@ -43,7 +43,7 @@ EventMesh 的用户非常渴望能得到对 CloudEvents 的支持。有许多理 ### 可插拔协议 -![可插拔协议](/images/design-document/cloudevents-pluggable-protocols.png) +![可插拔协议](../../../../../static/images/design-document/cloudevents-pluggable-protocols.png) ### EventMesh 集成 CloudEvents 进度表 diff --git a/versioned_docs/version-v1.7.0/design-document/02-observability/02-tracing.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/07-tracing.md similarity index 100% rename from versioned_docs/version-v1.7.0/design-document/02-observability/02-tracing.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/07-tracing.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-spi.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/08-spi.md similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-spi.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/08-spi.md diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/04-event-bridge.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/09-event-bridge.md similarity index 97% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/04-event-bridge.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/09-event-bridge.md index 0bacec2808..a51a37abcb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/04-event-bridge.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/09-event-bridge.md @@ -1,10 +1,10 @@ # Event Bridge -![event-bridge](/images/eventmesh-bridge.png) +![event-bridge](../../../../../static/images/eventmesh-bridge.png) Event Bridge 可以支持跨mesh集群的消息投递,下面展示这一功能的详细设计与体验步骤 -![event-bridge-detail](/images/design-document/event-bridge-detail.png) +![event-bridge-detail](../../../../../static/images/design-document/event-bridge-detail.png) > 注:在本地体验这一功能时需要启动两台eventmesh实例,同时要修改`eventmesh-runtime`目录下的`eventmesh.properties`文件中的端口配置,避免端口冲突。便于下文描述,event-bridge特性按照上图信息进行表述。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/07-knative-connector.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/10-knative-connector.md similarity index 85% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/07-knative-connector.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/10-knative-connector.md index d7c67380ea..ce7d4c52f6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/01-event-handling-and-integration/07-knative-connector.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/10-knative-connector.md @@ -5,7 +5,7 @@ 我们使用 *cloudevents-player* [Knative服务](https://knative.dev/docs/serving/)作为例子。如果您不知道如何创建 *cloudevents-player* Knative服务作为source和sink,请按照这个[链接](https://knative.dev/docs/getting-started/first-source/#creating-your-first-source)的步骤进行创建。 ### EventMesh配置文件 -- 将以下配置加入 [eventmesh-starter/build.gradle](https://github.com/apache/eventmesh/blob/master/eventmesh-starter/build.gradle) 文件 +- 将以下配置加入 [eventmesh-starter/build.gradle](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-starter/build.gradle) 文件 ```bash plugins { id 'application' @@ -23,7 +23,7 @@ dependencies { implementation project(":eventmesh-runtime") } ``` -- 将以下配置加入 [eventmesh-examples/build.gradle](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/build.gradle)文件 +- 将以下配置加入 [eventmesh-examples/build.gradle](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/build.gradle)文件 ```bash plugins { id 'application' @@ -33,7 +33,7 @@ application { mainClass = project.hasProperty("mainClass") ? project.getProperty("mainClass") : 'NULL' } ``` -- 在 [eventmesh-runtime/conf/eventmesh.properties](https://github.com/apache/eventmesh/blob/master/eventmesh-runtime/conf/eventmesh.properties) 文件中设置```eventMesh.connector.plugin.type=knative```变量 +- 在 [eventmesh-runtime/conf/eventmesh.properties](https://github.com/pchengma/incubator-eventmesh/blob/master/eventmesh-runtime/conf/eventmesh.properties) 文件中设置```eventMesh.connector.plugin.type=knative```变量 ## 演示 ### Knative发布事件消息/EventMesh订阅 @@ -49,7 +49,7 @@ $ curl -i http://cloudevents-player.default.127.0.0.1.sslip.io -H "Content-Type: ``` #### 步骤3:从EventMesh订阅 -- 在 [ExampleConstants.java](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/common/ExampleConstants.java) 文件中设置 ```public static final String EVENTMESH_HTTP_ASYNC_TEST_TOPIC = "messages";```变量 +- 在 [ExampleConstants.java](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/common/ExampleConstants.java) 文件中设置 ```public static final String EVENTMESH_HTTP_ASYNC_TEST_TOPIC = "messages";```变量 ```bash $ cd eventmesh-examples $ ../gradlew -PmainClass=org.apache.eventmesh.http.demo.sub.SpringBootDemoApplication run diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/03-prometheus.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/11-prometheus.md similarity index 72% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/03-prometheus.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/11-prometheus.md index 0d796e7a67..0c6b71371f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/03-prometheus.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/11-prometheus.md @@ -8,10 +8,18 @@ 选择自己电脑对应的版本下载并解压缩 +![Prometheus-download](../../../../../static/images/removed/Prometheus-download.png) + ### 2、在prometheus.yml中添加配置 如果你是Prometheus的新手,可以直接复制eventmesh-runtime/conf/prometheus.yml替换 +例如:这是win-64的下载后的样子: + +![prometheus-yml](../../../../../static/images/removed/prometheus-yml.png) + +替换红框中的文件 + 如果你十分了解Prometheus,可以自行配置,eventmesh默认的导出的端口为19090。 ps:如果需要更换端口的话,请修改eventmesh-runtime/conf/eventmesh.properties中的 @@ -25,12 +33,14 @@ eventMesh.metrics.prometheus.port=19090 双击Prometheus.exe运行 -运行eventmesh-starter(参考[eventmesh-runtime-quickstart](../../instruction/03-runtime.md)) +运行eventmesh-starter(参考[eventmesh-runtime-quickstart](../instruction/02-runtime.md)) -运行eventmesh-example(参考[eventmesh-sdk-java-quickstart](../../instruction/05-demo.md)) +运行eventmesh-example(参考[eventmesh-sdk-java-quickstart](../instruction/03-demo.md)) 打开浏览器访问:http://localhost:9090/ ### 输入想观察的 Metrics 输入’**eventmesh_**‘ 就会出现相关的指标的提示 + +![promethus-search](../../../../../static/images/removed/promethus-search.png) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/04-zipkin.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/12-zipkin.md similarity index 95% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/04-zipkin.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/12-zipkin.md index 08f66eb3a5..533763233f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/02-observability/04-zipkin.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/12-zipkin.md @@ -8,10 +8,9 @@ ### 2、运行eventmesh -运行eventmesh-starter(参考[eventmesh-runtime-quickstart](../../instruction/03-runtime.md)) - -运行eventmesh-example(参考[eventmesh-sdk-java-quickstart](../../instruction/05-demo.md)) +运行eventmesh-starter(参考[eventmesh-runtime-quickstart](../instruction/02-runtime.md)) +运行eventmesh-example(参考[eventmesh-sdk-java-quickstart](../instruction/03-demo.md)) ### 3、相关的设置 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/13-webhook.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/13-webhook.md new file mode 100644 index 0000000000..083aad7a7b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/13-webhook.md @@ -0,0 +1,268 @@ + + +## webhook使用流程 +#### 第一步:在eventmesh配置webhook相关信息并且启动 + +##### 配置说明 +``` +# 是否启动webhook admin服务 +eventMesh.webHook.admin.start=true + +# webhook事件配置存储模式。目前只支持file与nacos +eventMesh.webHook.operationMode=file +# 文件存储模式的文件存放路径,如果写上#{eventMeshHome},在eventMesh根目录 +eventMesh.webHook.fileMode.filePath= #{eventMeshHome}/webhook + +# nacos存储模式,配置命名规则是eventMesh.webHook.nacosMode.{nacos 原生配置key} 具体的配置请看 [nacos github api](https://github.com/alibaba/nacos/blob/develop/api/src/main/java/com/alibaba/nacos/api/SystemPropertyKeyConst.java) +## nacos的地址 +eventMesh.webHook.nacosMode.serverAddr=127.0.0.1:8848 + +# webhook eventcloud 发送模式。与eventMesh.connector.plugin.type 配置一样 +eventMesh.webHook.producer.connector=standalone +``` + +#### 第二步:添加webhook配置信息 +配置信息说明 +```java + /** + * 厂商调用的path。厂商事件调用地址、 [http or https ]://[域名 or IP 【厂商可以被调用】]:[端口]/webhook/[callbackPath] + * 比如:http://127.0.0.1:10504/webhook/test/event 需要把全完url填入厂商调用输入中 + * callbackPath 是唯一 + * manufacturer callback path + */ + private String callbackPath; + + /** + * 厂商的名字 + * manufacturer name ,like github + */ + private String manufacturerName; + + /** + * 厂商的事件名 + * webhook event name ,like rep-push + */ + private String manufacturerEventName; + + /** + * + * http header content type + */ + private String contentType = "application/json"; + + /** + * 说明 + * description of this WebHookConfig + */ + private String description; + + /** + * 有一些厂商使用验签方式, + * secret key ,for authentication + */ + private String secret; + + /** + * 有一些厂商使用验签方式,使用账户密码方式 + * userName ,for HTTP authentication + */ + private String userName; + + /** + * 有一些厂商使用验签方式,使用账户密码方式 + * password ,for HTTP authentication + */ + private String password; + + + + /** + * 事件发送到那个topic + * roll out event name ,like topic to mq + */ + private String cloudEventName; + + /** + * roll out data format -> CloudEvent serialization mode + * If HTTP protocol is used, the request header contentType needs to be marked + */ + private String dataContentType = "application/json";; + + /** + * source of event + */ + private String cloudEventSource; + + /** + * cloudEvent事件对象唯一标识符识别方式,uuid或者manufacturerEventId(厂商id) + * id of cloudEvent ,like uuid/manufacturerEventId + */ + private String cloudEventIdGenerateMode; + +``` + +##### 添加接口 +路径: /webhook/insertWebHookConfig +方法: POST +contentType: application/json + +输入参数: +| 字段 | 说明 | 类型 | 必须 | 默认值 | +| -- | -- | -- | -- | -- | +| callbackPath | 调用地址,唯一地址 | string | 是 | null | +| manufacturerName | 厂商名 | string | 是 | null | +| manufacturerEventName | 厂商事件名 | string | 是 | null | +| contentType | http connettype | string | 否 | application/json | +| description | 配置说明 | string | 否 | null | +| secret | 验签密钥 | string | 否 | null | +| userName | 用户名 | string | 否 | null | +| password | 用户密码 | string | 否 | null | +| cloudEventName | 事件名() | string | 是 | null | +| cloudEventSource | 事件来源可以填写 | string | 是 | null | +| cloudEventIdGenerateMode | cloudEvent事件对象唯一标识符识别方式,uuid或者manufacturerEventId(厂商id) | string | 否 | manufacturerEventId | + +列子: +```json + +{ + "callbackPath":"/webhook/github/eventmesh/all", + "manufacturerName":"github", + "manufacturerEventName":"all", + "secret":"eventmesh", + "cloudEventName":"github-eventmesh", + "cloudEventSource":"github" +} + +``` +输出参数:1 成功,0失败 + +##### 删除接口 +路径: /webhook/deleteWebHookConfig +方法: POST +contentType: application/json + +输入参数: +| 字段 | 说明 | 类型 | 必须 | 默认值 | +| -- | -- | -- | -- | -- | +| callbackPath | 调用地址,唯一地址 | string | 是 | null | + + +列子: + +```json + +{ + "callbackPath":"/webhook/github/eventmesh/all" +} + +``` + + +输出参数:1 成功,0失败 + +##### 通过callbackPath查询WebHookConfig +路径: /webhook/queryWebHookConfigById +方法: POST +contentType: application/json + +输入参数: +| 字段 | 说明 | 类型 | 必须 | 默认值 | +| -- | -- | -- | -- | -- | +| callbackPath | 调用地址,唯一地址 | string | 是 | null | + + +列子: + +```json + +{ + "callbackPath":"/webhook/github/eventmesh/all" +} + +``` + + +输出参数: +| 字段 | 说明 | 类型 | 必须 | 默认值 | +| -- | -- | -- | -- | -- | +| callbackPath | 调用地址,唯一地址 | string | 是 | null | +| manufacturerName | 厂商名 | string | 是 | null | +| manufacturerEventName | 厂商事件名 | string | 是 | null | +| contentType | http connettype | string | 否 | application/json | +| description | 配置说明 | string | 否 | null | +| secret | 验签密钥 | string | 否 | null | +| userName | 用户名 | string | 否 | null | +| password | 用户密码 | string | 否 | null | +| cloudEventName | 事件名() | string | 是 | null | +| cloudEventSource | 事件来源可以填写 | string | 是 | null | +| cloudEventIdGenerateMode | cloudEvent事件对象唯一标识符识别方式,uuid或者manufacturerEventId(厂商id) | string | 否 | manufacturerEventId | + + +##### 通过manufacturer查询WebHookConfig列表 +路径: /webhook/queryWebHookConfigByManufacturer +方法: POST +contentType: application/json + +输入参数: +| 字段 | 说明 | 类型 | 必须 | 默认值 | +| -- | -- | -- | -- | -- | +| manufacturerName | 厂商名 | string | 是 | null | + + +列子: + +```json + +{ + "manufacturerName":"github" +} + +``` + + +输出参数: +| 字段 | 说明 | 类型 | 必须 | 默认值 | +| -- | -- | -- | -- | -- | +| callbackPath | 调用地址,唯一地址 | string | 是 | null | +| manufacturerName | 厂商名 | string | 是 | null | +| manufacturerEventName | 厂商事件名 | string | 是 | null | +| contentType | http connettype | string | 否 | application/json | +| description | 配置说明 | string | 否 | null | +| secret | 验签密钥 | string | 否 | null | +| userName | 用户名 | string | 否 | null | +| password | 用户密码 | string | 否 | null | +| cloudEventName | 事件名() | string | 是 | null | +| cloudEventSource | 事件来源可以填写 | string | 是 | null | +| cloudEventIdGenerateMode | cloudEvent事件对象唯一标识符识别方式,uuid或者manufacturerEventId(厂商id) | string | 否 | manufacturerEventId | + + +#### 第三步:查看配置是否成功 +1. file存储模式。请到eventMesh.webHook.fileMode.filePath 目录下查看。文件名为callbackPath转移后的 +2. nacos存储模式。请到eventMesh.webHook.nacosMode.serverAddr 配置的nacos服务去看 + +#### 第四步:配置cloudevent的消费者 + + +#### 第五步:在厂商配置webhook相关信息 +> 厂商操作请看【厂商webhook操作说明】 + + +## 厂商webhook操作说明 +### github 注册 +#### 第一步:进入对应的项目 +#### 第二步:点击setting +![](../../../../../static/images/design-document/webhook/webhook-github-setting.png) +#### 第三步:点击Webhooks +![](../../../../../static/images/design-document/webhook/webhook-github-webhooks.png) +#### 第四步:点击 Add webhook +![](../../../../../static/images/design-document/webhook/webhook-github-add.png) +#### 第五步: 填写webhook信息 +![](../../../../../static/images/design-document/webhook/webhook-github-info.png) + +Payload URL: 服务地址以及pahts。[http or https ]://[域名 or IP 【厂商可以被调用】]:[端口]/webhook/[callbackPath] +Content type:http header content type +secret: 验签字符串 + + + + diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/14-https.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/14-https.md new file mode 100644 index 0000000000..a100ba3977 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/14-https.md @@ -0,0 +1,32 @@ +# HTTPS + +1.在eventmesh-runtime 中配置 + +``` +eventMesh.properties(添加如下配置) +eventMesh.server.useTls.enabled=true //默认值 false + + +config env varible +-Dssl.server.protocol=TLSv1.1 //默认值 TLSv1.1 +-Dssl.server.cer=sChat2.jks //把文件放到启动脚本start.sh 指定的conPath目录下 +-Dssl.server.pass=sNetty +``` + +2.在eventmesh-sdk-java 中配置 + +``` +//创建producer +LiteClientConfig eventMeshHttpClientConfig = new eventMeshHttpClientConfig(); +... + +//设置开启TLS +eventMeshHttpClientConfig.setUseTls(true); +LiteProducer producer = new LiteProducer(eventMeshHttpClientConfig); + + +//配置环境变量 +-Dssl.client.protocol=TLSv1.1 //默认值 TLSv1.1 +-Dssl.client.cer=sChat2.jks //把文件放到应用指定的conPath目录下 +-Dssl.client.pass=sNetty +``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/_category_.json index 2a0150571e..95b7eed067 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/_category_.json +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/design-document/_category_.json @@ -1,5 +1,4 @@ { - "position": 6, - "label": "开发文档", + "label": "Documentation", "collapsed": false } diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/00-eclipse.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/00-eclipse.md index a69af82c36..27ded49524 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/00-eclipse.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/00-eclipse.md @@ -1,6 +1,4 @@ -# 导入 Eclipse 快速入门说明 - -我们推荐使用 `Intellij IDEA` 进行开发,如果您希望使用 `Eclipse`,可以参考下面的步骤导入项目。 +# eventMesh 导入Eclipse 快速入门说明 ### 依赖 @@ -11,28 +9,25 @@ eclipse 已安装gradle插件或者eclipse自带gradle插件 ``` ### 下载源码 +git init -git init - -git clone +git clone https://github.com/apache/incubator-eventmesh.git ### 项目编译eclipse环境 打开命令行终端,运行gradlew cleanEclipse eclipse ### 配置修改 - 修改工程名称和settings.gradle 配置文件参数rootProject.name 参数一致 ### 修改eclipse.init配置文件,配置lombok以1.18.8版本为例 - -javaagent:lombok-1.18.8.jar -XBootclasspath/a:lombok-1.18.8.jar ### 202106版本eclipse,eclipse.init增加配置参数 - --illegal-access=permit + ### 导入gradle +打开eclipse,导入gradle项目到IDE里 -打开eclipse,导入gradle项目到IDE里 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store-with-docker.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store-with-docker.md new file mode 100644 index 0000000000..539c81cd03 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store-with-docker.md @@ -0,0 +1,40 @@ +# eventmesh-store 快速入门说明 + +## 依赖 + +``` +建议使用64位操作系统,建议使用Linux/Unix; +64位JDK 1.8+; +Gradle至少为7.0, 推荐7.0.* +4g+可用磁盘用于eventmesh-store服务器 +eventmesh在非standalone模式下,依赖RocketMQ作为存储层;若采用standalone模式,则可跳过该步,直接进行runtime的部署 +``` + +## 部署 +在命令行输入如下命令直接从 docker hub 上获取 RocketMQ 镜像: + +```shell +#获取 namesrv 镜像 +sudo docker pull rocketmqinc/rocketmq-namesrv:4.5.0-alpine +#获取 broker 镜像 +sudo docker pull rocketmqinc/rocketmq-broker:4.5.0-alpine +``` + +在命令行输入以下命令运行namerv容器和broker容器 + +```shell +#运行 namerv 容器 +sudo docker run -d -p 9876:9876 -v `pwd`/data/namesrv/logs:/root/logs -v `pwd`/data/namesrv/store:/root/store --name rmqnamesrv rocketmqinc/rocketmq-namesrv:4.5.0-alpine sh mqnamesrv + +#运行 broker 容器 +sudo docker run -d -p 10911:10911 -p 10909:10909 -v `pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store --name rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" rocketmqinc/rocketmq-broker:4.5.0-alpine sh mqbroker -c ../conf/broker.conf +``` + +请注意 **rocketmq-broker ip** 是 **pod ip**, 如果你想修改这个ip, 可以通过挂载容器中 **broker.conf** 文件的方式并修改文件中的 **brokerIP1** 配置项为自定义值 + + +至此eventmesh-store的部署已完成,请转至下一步完成 [eventmesh-runtime](https://github.com/apache/incubator-eventmesh/blob/master/docs/zh/instruction/02-runtime-with-docker.md) 的部署 + + +## 参考 +关于RocketMQ的其他更多资料,请参考 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store.md index 79ee18cc86..7317e3ad87 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/01-store.md @@ -1,6 +1,6 @@ -# 部署 EventMesh 的事件存储 +# eventmesh-store 快速入门说明 -## 1 依赖 +## 依赖 ``` 建议使用64位操作系统,建议使用Linux/Unix; @@ -10,30 +10,29 @@ Gradle至少为7.0, 推荐7.0.* eventmesh在非standalone模式下,依赖RocketMQ作为存储层;若采用standalone模式,则可跳过该步,直接进行runtime的部署 ``` -### 2 下载 -从[RocketMQ官方网站](https://rocketmq.apache.org/download/) 下载Binary代码(推荐使用4.9.*版本),这里以4.9.4为例: +## 下载 + +从[RocketMQ官方网站](https://rocketmq.apache.org/dowloading/releases/) 下载Binary代码(推荐使用4.9.*版本),这里以4.9.2为例 ``` -unzip rocketmq-all-4.9.4-bin-release.zip -cd rocketmq-all-4.9.4-bin-release/ +unzip rocketmq-all-4.9.2-bin-release.zip +cd rocketmq-4.9.2/ ``` -![rocketmq_1](/images/install/rocketmq_1.png) -### 3 启动 +## 部署 -启动Name Server: +- #### 启动Name Server ``` -nohup sh bin/mqnamesrv & tail -f ~/logs/rocketmqlogs/namesrv.log +nohup sh bin/mqnamesrv & +tail -f ~/logs/rocketmqlogs/namesrv.log ``` -如果在看到The Name Server boot success...,则说明Name Server启动成功。 - -![rocketmq_2](/images/install/rocketmq_2.png) +如果在看到The Name Server boot success...,则说明Name Server启动成功 -启动Broker: +- #### 启动Broker ``` nohup sh bin/mqbroker -n localhost:9876 & @@ -42,8 +41,11 @@ tail -f ~/logs/rocketmqlogs/broker.log 如果在看到The broker boot success...,则说明Broker启动成功 -至此eventmesh-store的部署已完成,请转至下一步完成 [eventmesh-runtime](https://github.com/apache/incubator-eventmesh/blob/master/docs/zh/instruction/03-runtime.md) 的部署 +至此eventmesh-store的部署已完成,请转至下一步完成 [eventmesh-runtime](https://github.com/apache/incubator-eventmesh/blob/master/docs/zh/instruction/02-runtime.md) 的部署 ## 参考 关于RocketMQ的其他更多资料,请参考 + + + diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/04-runtime-with-docker.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-runtime-with-docker.md similarity index 78% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/04-runtime-with-docker.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-runtime-with-docker.md index c2fc492531..ab18daf526 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/04-runtime-with-docker.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-runtime-with-docker.md @@ -2,14 +2,14 @@ 本篇快速入门将详细介绍使用 docker 部署 EventMesh,以 RocketMQ 作为对接的中间件。 -## 1. 前提 +## 前提 1. 建议使用64位的 linux 系统; 2. 请预先安装 Docker Engine。 Docker 的安装过程可以参考 [docker 官方文档](https://docs.docker.com/engine/install/); 3. 建议掌握基础的 docker 概念和命令行,例如注册中心、挂载等等。不过这不是必须的,因为本次操作所需的命令都已为您列出; 4. 若您选择非standalone模式,请确保 [RocketMQ 已成功启动](https://rocketmq.apache.org/docs/quick-start/) 并且可以使用 ip 地址访问到;若您选择standalone模式,则无需启动 RocketMQ 。 -## 2. 获取 EventMesh 镜像 +## 获取 EventMesh 镜像 首先,你可以打开一个命令行,并且使用下面的 ```pull``` 命令从 [Docker Hub](https://registry.hub.docker.com/r/eventmesh/eventmesh/tags) 中下载[最新发布的 EventMesh](https://eventmesh.apache.org/events/release-notes/v1.3.0/) 。 @@ -26,12 +26,11 @@ sudo docker images 如果终端显示如下所示的镜像信息,则说明 EventMesh 镜像已经成功下载到本地。 ```shell -$ sudo docker images -REPOSITORY TAG IMAGE ID CREATED SIZE -eventmesh/eventmesh v1.4.0 6e2964599c78 16 months ago 937MB +REPOSITORY TAG IMAGE ID CREATED SIZE +eventmesh/eventmesh v1.4.0 6e2964599c78 3 months ago 936.73 MB ``` -## 3. 创建配置文件 +## 创建配置文件 在根据 EventMesh 镜像运行对应容器之前,你需要创建两个配置文件,分别是:```eventMesh.properties``` 和 ```rocketmq-client.properties```。 @@ -44,7 +43,7 @@ sudo touch eventmesh.properties sudo touch rocketmq-client.properties ``` -### 4. 配置 eventMesh.properties +### 配置 eventMesh.properties 这个配置文件中包含 EventMesh 运行时环境和集成进来的其他插件所需的参数。 @@ -54,7 +53,7 @@ sudo touch rocketmq-client.properties sudo vim eventmesh.properties ``` -你可以直接将 GitHub 仓库中的对应配置文件中的内容复制过来,链接为: 。 +你可以直接将 GitHub 仓库中的对应配置文件中的内容复制过来,链接为: 。 请检查配置文件里的默认端口是否已被占用,如果被占用请修改成未被占用的端口: @@ -64,7 +63,7 @@ sudo vim eventmesh.properties | eventMesh.server.tcp.port | 10000 | EventMesh tcp server port | | eventMesh.server.grpc.port | 10205 | EventMesh grpc server port | -### 5. 配置 rocketmq-client.properties +### 配置 rocketmq-client.properties 这个配置文件中包含 RocketMQ nameserver 的信息。 @@ -74,7 +73,7 @@ sudo vim eventmesh.properties sudo vim rocketmq-client.properties ``` -你可以直接将 GitHub 仓库中的对应配置文件中的内容复制过来,链接为: 。请注意,如果您正在运行的 namesetver 地址不是配置文件中的默认值,请将其修改为实际正在运行的nameserver地址。 +你可以直接将 GitHub 仓库中的对应配置文件中的内容复制过来,链接为: 。请注意,如果您正在运行的 namesetver 地址不是配置文件中的默认值,请将其修改为实际正在运行的nameserver地址。 请检查配置文件里的默认namesrvAddr是否已被占用,如果被占用请修改成未被占用的地址: @@ -82,7 +81,7 @@ sudo vim rocketmq-client.properties |---------------------------------------|-------------------------------|----------------------------------| | eventMesh.server.rocketmq.namesrvAddr | 127.0.0.1:9876;127.0.0.1:9876 | RocketMQ namesrv default address | -## 6. 运行 EventMesh +## 运行 EventMesh 现在你就可以开始根据下载好的 EventMesh 镜像运行容器了。 @@ -112,13 +111,13 @@ sudo docker ps 如果成功的话,你会看到终端打印出了如下所示容器的信息,其中就有运行 EventMesh 镜像的容器。 ```shell -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -5bb6b6092672 eventmesh/eventmesh:v1.4.0 "/bin/sh -c 'sh star…" 5 seconds ago Up 3 seconds 0.0.0.0:10000->10000/tcp, :::10000->10000/tcp, 0.0.0.0:10105->10105/tcp, :::10105->10105/tcp eager_driscoll +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d1e1a335d4a9 eventmesh/eventmesh:v1.4.0 "/bin/sh -c 'sh star…" About a minute ago Up About a minute 0.0.0.0:10000->10000/tcp, :::10000->10000/tcp, 0.0.0.0:10105->10105/tcp, :::10105->10105/tcp focused_bartik ``` -从这个信息中可以看出,```container id``` 是 ```5bb6b6092672```,```name``` 是 ```eager_driscoll```,它们都可以用来唯一标识这个容器。**注意**:在你的电脑中,它们的值可能跟这里的不同。 +从这个信息中可以看出,```container id``` 是 ```d1e1a335d4a9```,```name``` 是 ```focused_bartik```,它们都可以用来唯一标识这个容器。**注意**:在你的电脑中,它们的值可能跟这里的不同。 -## 7. 管理 EventMesh 容器 +## 管理 EventMesh 容器 在成功的运行了 EventMesh 容器后,你可以通过进入容器、查看日志、删除容器等方式管理容器。 @@ -141,8 +140,8 @@ tail -f eventmesh.out sudo docker rm -f [your container id or name] ``` -## 8. 探索更多 +## 探索更多 -现在 EventMesh 已经通过容器运行了,你可以参考 [```eventmesh-examples``` 模块](https://github.com/apache/eventmesh/tree/master/eventmesh-examples) 编写并测试自己的代码了。 +现在 EventMesh 已经通过容器运行了,你可以参考 [```eventmesh-examples``` 模块](https://github.com/apache/incubator-eventmesh/tree/master/eventmesh-examples) 编写并测试自己的代码了。 希望你享受这个过程并获得更多收获! diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-runtime.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-runtime.md new file mode 100644 index 0000000000..845f1ccf63 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-runtime.md @@ -0,0 +1,114 @@ +# Eventmesh-runtime 快速入门说明 + + +## 1 本地构建运行 + +### 1.1 依赖 + +``` +建议使用64位操作系统,建议使用Linux / Unix; +64位JDK 1.8+; +Gradle至少为7.0, 推荐 7.0.* +``` + +### 1.2 下载源码 + +在 [EventMesh download](https://eventmesh.apache.org/download) 页面选择1.5.0版本的 Source Code 进行下载并解压, 您将获得**apache-eventmesh-1.5.0-incubating-src** + + +### 1.3 本地启动 + +**1.3.1 项目结构说明:** + +- eventmesh-common : eventmesh公共类与方法模块 +- eventmesh-connector-api : eventmesh connector插件接口定义模块 +- eventmesh-connector-plugin : eventmesh connector插件模块 +- eventmesh-runtime : eventmesh运行时模块 +- eventmesh-sdk-java : eventmesh java客户端sdk +- eventmesh-starter : eventmesh本地启动运行项目入口 +- eventmesh-spi : eventmesh SPI加载模块 + +> 注:插件模块遵循 eventmesh 定义的SPI规范, 自定义的SPI接口需要使用注解 @EventMeshSPI 标识. +> 插件实例需要在对应模块中的 /main/resources/META-INF/eventmesh 下配置相关接口与实现类的映射文件,文件名为SPI接口全类名. +> 文件内容为插件实例名到插件实例的映射, 具体可以参考 eventmesh-connector-rocketmq 插件模块 + +**1.3.2 插件说明** + +***1.3.2.1 安装插件*** + +有两种方式安装插件 + +- classpath加载:本地开发可以通过在 eventmesh-starter 模块 build.gradle 中进行声明,例如声明使用 rocketmq 插件 + +```gradle + implementation project(":eventmesh-connector-plugin:eventmesh-connector-rocketmq") +``` + +- 文件加载:通过将插件安装到插件目录,EventMesh 在运行时会根据条件自动加载插件目录下的插件,可以通过执行以下命令安装插件 + +```shell +./gradlew clean jar dist && ./gradlew installPlugin +``` + +***1.3.2.2 使用插件*** + +EventMesh 会默认加载 dist/plugin 目录下的插件,可以通过`-DeventMeshPluginDir=your_plugin_directory`来改变插件目录。运行时需要使用的插件实例可以在 +`confPath`目录下面的`eventmesh.properties`中进行配置。例如通过以下设置声明在运行时使用rocketmq插件。 + +```properties +#connector plugin +eventMesh.connector.plugin.type=rocketmq +``` + +**1.3.3 配置VM启动参数** + +```properties +-Dlog4j.configurationFile=eventmesh-runtime/conf/log4j2.xml +-Deventmesh.log.home=eventmesh-runtime/logs +-Deventmesh.home=eventmesh-runtime +-DconfPath=eventmesh-runtime/conf +``` + +> 注:如果操作系统为Windows, 可能需要将文件分隔符换成\ + +**1.3.4 启动运行** + +``` +运行org.apache.eventmesh.starter.StartUp的主要方法 +``` + +## 2 远程部署 + +### 2.1 依赖 + +``` +建议使用64位操作系统,建议使用Linux / Unix; +64位JDK 1.8+; +Gradle至少为7.0, 推荐 7.0.* +``` + +### 2.2 下载 + +在 [EventMesh download](https://eventmesh.apache.org/download) 页面选择1.5.0版本的 Binary Distribution 进行下载, 您将获得**apache-eventmesh-1.5.0-incubating-bin.tar.gz** + + +### 2.3 部署 + +- 部署eventmesh-runtime + +```$ xslt +# 解压 apache-eventmesh-1.5.0-incubating-bin.tar.gz +tar -zxvf apache-eventmesh-1.5.0-incubating-bin.tar.gz +cd apache-eventmesh-1.5.0-incubating + +# 配置 eventMesh.properties +vim conf/eventMesh.properties + +# 启动EventMesh +cd bin +sh start.sh +``` + +如果看到"EventMeshTCPServer[port=10000] started....",则说明设置成功。 + + diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-store-with-docker.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-store-with-docker.md deleted file mode 100644 index 1812d54250..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/02-store-with-docker.md +++ /dev/null @@ -1,71 +0,0 @@ -# 部署 EventMesh 的事件存储(使用 Docker) - -eventmesh在非standalone模式下,依赖RocketMQ作为存储层;若采用standalone模式,则可跳过该步,直接进行runtime的部署。 - -## 1. 依赖 - -``` -建议使用64位操作系统,建议使用Linux/Unix; -64位JDK 1.8+; -Gradle至少为7.0, 推荐7.0.*; -4g+可用磁盘用于eventmesh-store服务器; -``` - -## 2. Docker部署 - -### 2.1 拉取镜像 -在命令行输入如下命令直接从 docker hub 上获取 RocketMQ 镜像: - -```shell -#获取 rocketmq 镜像 -sudo docker pull apache/rocketmq:4.9.4 -``` - -您可以使用以下命令列出并查看本地已有的镜像: - -```shell -sudo docker images -``` - -如果终端显示如下所示的镜像信息,则说明 EventMesh 镜像已经成功下载到本地。 - -```shell -REPOSITORY TAG IMAGE ID CREATED SIZE -apache/rocketmq 4.9.4 a2a50ca263c3 13 months ago 548MB -``` - -![rocketmq_docker_1](/images/install/rocketmq_docker_1.png) - -### 2.2 运行容器 - -运行namerv容器和broker容器: - -```shell -sudo docker run -d -p 9876:9876 \ - -v `pwd`/data/namesrv/logs:/root/logs \ - -v `pwd`/data/namesrv/store:/root/store \ - --name rmqnamesrv \ - apache/rocketmq:4.9.4 \ - sh mqnamesrv -``` - -运行broker容器: - -```shell -sudo docker run -d -p 10911:10911 -p 10909:10909 \ - -v `pwd`/data/broker/logs:/root/logs \ - -v `pwd`/data/broker/store:/root/store \ - --name rmqbroker \ - --link rmqnamesrv:namesrv \ - -e "NAMESRV_ADDR=namesrv:9876" \ - apache/rocketmq:4.9.4 \ - sh mqbroker -c ../conf/broker.conf - -``` - -![rocketmq_docker_2](/images/install/rocketmq_docker_2.png) - -请注意 **rocketmq-broker ip** 是 **pod ip**, 如果你想修改这个ip, 可以通过挂载容器中 **broker.conf** 文件的方式并修改文件中的 **brokerIP1** 配置项为自定义值。 - - -至此eventmesh-store的部署已完成,请转至下一步完成 [eventmesh-runtime](04-runtime-with-docker.md) 的部署。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/05-demo.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/03-demo.md similarity index 67% rename from i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/05-demo.md rename to i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/03-demo.md index 6a08fcbf19..2f363c904e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/05-demo.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/03-demo.md @@ -10,8 +10,9 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 -## 1. TCP -### 1.1 异步消息 +### 1. TCP DEMO + +

异步消息

- 创建主题TEST-TOPIC-TCP-ASYNC,可以通过 rocketmq-console 或者 rocketmq tools 命令 @@ -27,7 +28,7 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 运行 org.apache.eventmesh.tcp.demo.pub.eventmeshmessage.AsyncPublish 的main方法 ``` -### 1.2 广播消息 +

广播消息

- 创建主题TEST-TOPIC-TCP-BROADCAST,可以通过 rocketmq-console 或者 rocketmq tools 命令 @@ -45,13 +46,13 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 更多关于TCP部分的内容,请参考 [EventMesh TCP](../sdk-java/03-tcp.md) -## 2. HTTP +### 2. HTTP演示 > 对于HTTP,eventmesh-sdk-java对对于异步事件实现了发送与订阅 > >在演示中,Java类`LiteMessage`的`content`字段表示一个特殊的协议,因此,如果您要使用eventmesh-sdk-java的http-client,则只需设计协议的内容并在同一时间提供消费者的应用程序。 -### 2.1 异步事件 +

异步事件

> 生产者将事件发送给下游即可,无需等待响应 @@ -72,12 +73,12 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 ``` 更多关于HTTP部分的内容,请参考 [EventMesh HTTP](../sdk-java/02-http.md) -## 3. GRPC +### 3. GRPC 演示 > eventmesh-sdk-java 实现了 gRPC 协议. 它能异步和同步发送事件到 eventmesh-runtime. > 它可以通过webhook和事件流方式订阅消费事件, 同时也支持 CNCF CloudEvents 协议. -### 3.1 异步事件发送 和 webhook订阅 +

异步事件发送 和 webhook订阅

> Async生产者 异步发送事件到 eventmesh-runtime, 不需要等待事件储存到 `event-store` > 在webhook 消费者, 事件推送到消费者的http endpoint url。这个URL在消费者的 `Subscription` 模型定于. 这方法跟前面的Http eventmsh client类似。 @@ -95,7 +96,7 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 运行 org.apache.eventmesh.grpc.sub.app.SpringBootDemoApplication 的main方法 ``` -### 3.2 同步事件发送和事件流订阅 +

同步事件发送和事件流订阅

> 同步生产者 发送事件到 eventmesh-runtime, 同时等待事件储存到 `event-store` > 在事件流消费者,事件以流的形式推送到 `ReceiveMsgHook` 客户端。 这方法类似 eventmesh client. @@ -113,7 +114,7 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 运行 org.apache.eventmesh.grpc.sub.EventmeshAsyncSubscribe 的main方法 ``` -### 3.3 批量事件发布 +

批量事件发布

> 批量发布多个事件到 eventmesh-runtime. 这是异步操作 @@ -126,111 +127,52 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 更多关于 gRPC 部分的内容,请参考 [EventMesh gRPC](../sdk-java/04-grpc.md) -## 4. 测试 +### 3.4 测试 -请参考[EventMesh Store](./01-store.md) 和 [EventMesh Runtime](./03-runtime.md) 完成运行环境的部署 +请参考[EventMesh Store](../instruction/01-store.md) 和 [EventMesh Runtime](../instruction/02-runtime.md) 完成运行环境的部署 完成 store 和 runtime 的部署后,就可以在 eventmesh-examples 模块下运行我们的 demo 来体验 eventmesh 了: -gradle编译: - -```shell -cd apache-eventmesh-1.9.0-src/eventmesh-examples -gradle clean dist - -cd ./dist/bin -``` - -![demo_1](/images/install/demo_1.png) - -### 4.1 TCP - -TCP Sub - -```shell -bash tcp_eventmeshmessage_sub.sh -``` - -打开对应log文件查看日志: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_pub.out -``` -![demo_2](/images/install/demo_2.png) - + TCP Sub -TCP Pub - -```shell -bash tcp_pub_eventmeshmessage.sh -``` + ```shell + cd bin + sh tcp_eventmeshmessage_sub.sh + ``` -打开对应log文件查看日志: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_sub.out -``` + TCP Pub -![demo_3](/images/install/demo_3.png) + ```shell + cd bin + sh tcp_pub_eventmeshmessage.sh + ``` -### 4.2 TCP Broadcast + TCP Sub Broadcast -TCP Sub Broadcast + ```shell + cd bin + sh tcp_sub_eventmeshmessage_broadcast.sh + ``` -```shell -sh tcp_sub_eventmeshmessage_broadcast.sh -``` + TCP Pub Broadcast -打开对应log文件查看日志: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_sub_broadcast.out -``` + ```shell + cd bin + sh tcp_pub_eventmeshmessage_broadcast.sh + ``` -![demo_4](/images/install/demo_3.png) + HTTP Sub -TCP Pub Broadcast + ```shell + cd bin + sh http_sub.sh + ``` -```shell -sh tcp_pub_eventmeshmessage_broadcast.sh -``` - -打开对应log文件查看日志: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_pub_broadcast.out -``` - -![demo_5](/images/install/demo_5.png) - -### 4.3 HTTP - -HTTP Sub - -```shell -sh http_sub.sh -``` - -打开对应log文件查看日志: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_http_sub.out -``` - -![demo_6](/images/install/demo_6.png) - -HTTP Pub - -```shell -sh http_pub_eventmeshmessage.sh -``` - -打开对应log文件查看日志: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_http_pub.out -``` + HTTP Pub -![demo_7](/images/install/demo_7.png) + ```shell + cd bin + sh http_pub_eventmeshmessage.sh + ``` -你可以在 `/logs` 目录下面看到不同模式的运行日志。 \ No newline at end of file + 之后, 你可以在 `/logs` 目录下面看到不同模式的运行日志 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/03-runtime.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/03-runtime.md deleted file mode 100644 index 7e879a4e38..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/03-runtime.md +++ /dev/null @@ -1,197 +0,0 @@ -# Eventmesh-runtime 快速入门说明 - -EventMesh Runtime 是 EventMesh 集群中有状态的 Mesh 节点,负责 Source Connector 与 Sink Connector 之间的事件传输,并可以使用 EventMesh Storage 作为事件的存储队列。 - -## 1 本地构建运行 - -### 1.1 源码启动 - -#### 1.1.1 依赖 - -``` -建议使用64位操作系统,建议使用Linux / Unix; -64位JDK 1.8+; -Gradle至少为7.0, 推荐 7.0.* -``` - -#### 1.1.2 下载源码 - -从 [EventMesh download](https://eventmesh.apache.org/download) 下载并提取最新版本的源代码。比如目前最新版,您将获得`apache-eventmesh-1.9.0-source.tar.gz`。 - -#### 1.1.3 本地启动 - -**1.1.3.1 项目结构说明:** - -- eventmesh-common : eventmesh公共类与方法模块 -- eventmesh-connector-api : eventmesh connector插件接口定义模块 -- eventmesh-connector-plugin : eventmesh connector插件模块 -- eventmesh-runtime : eventmesh运行时模块 -- eventmesh-sdk-java : eventmesh java客户端sdk -- eventmesh-starter : eventmesh本地启动运行项目入口 -- eventmesh-spi : eventmesh SPI加载模块 - -> 注:插件模块遵循 eventmesh 定义的SPI规范, 自定义的SPI接口需要使用注解 @EventMeshSPI 标识. -> 插件实例需要在对应模块中的 /main/resources/META-INF/eventmesh 下配置相关接口与实现类的映射文件,文件名为SPI接口全类名. -> 文件内容为插件实例名到插件实例的映射, 具体可以参考 eventmesh-connector-rocketmq 插件模块 - -**1.1.3.2 插件说明** - -***1.1.3.2.1 安装插件*** - -有两种方式安装插件 - -- classpath加载:本地开发可以通过在 eventmesh-starter 模块 build.gradle 中进行声明,例如声明使用 rocketmq 插件 - -```gradle - implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq") -``` - -- 文件加载:通过将插件安装到插件目录,EventMesh 在运行时会根据条件自动加载插件目录下的插件,可以通过执行以下命令安装插件 - -```shell -./gradlew clean jar dist && ./gradlew installPlugin -``` - -***1.1.3.2.2 使用插件*** - -EventMesh 会默认加载 dist/plugin 目录下的插件,可以通过`-DeventMeshPluginDir=your_plugin_directory`来改变插件目录。运行时需要使用的插件实例可以在 -`confPath`目录下面的`eventmesh.properties`中进行配置。例如通过以下设置声明在运行时使用rocketmq插件。 - -```properties -#connector plugin -eventMesh.connector.plugin.type=rocketmq -``` - -**1.1.3.3 配置VM启动参数** - -```properties --Dlog4j.configurationFile=eventmesh-runtime/conf/log4j2.xml --Deventmesh.log.home=eventmesh-runtime/logs --Deventmesh.home=eventmesh-runtime --DconfPath=eventmesh-runtime/conf -``` - -> 注:如果操作系统为Windows, 可能需要将文件分隔符换成'\' - -**1.1.3.4 启动运行** - -``` -运行org.apache.eventmesh.starter.StartUp的主要方法 -``` - -### 1.2 本地二进制构建 - -#### 1.2.1 依赖 - -``` -建议使用64位操作系统,建议使用Linux / Unix; -64位JDK 1.8+; -Gradle至少为7.0, 推荐 7.0.* -``` - -Gradle 是 Apache EventMesh 使用的构建自动化工具。请参考 [官方指南](https://docs.gradle.org/current/userguide/installation.html) 安装最新版本的 Gradle。 - -#### 1.2.2 下载源码 - -从 [EventMesh download](https://eventmesh.apache.org/download) 下载并提取最新版本的源代码。比如目前最新版,您将获得`apache-eventmesh-1.9.0-source.tar.gz`。 - -```console -tar -xvzf apache-eventmesh-1.9.0-source.tar.gz -cd apache-eventmesh-1.9.0-src/ -``` - -使用 Gradle 构建源代码。 - -```console -gradle clean dist -``` - -编辑 `eventmesh.properties` 以更改 EventMesh Runtime 的配置(如 TCP 端口、客户端黑名单)。 - -```console -cd dist -vim conf/eventmesh.properties -``` - -#### 1.2.3 构建并加载插件 - -Apache EventMesh引入了 SPI 机制,使 EventMesh 能够在运行时发现并加载插件。有两种方式安装插件: - -1. Gradle 依赖项: 在 `eventmesh-starter/build.gradle` 中将插件声明为构建依赖项。 - -```gradle -dependencies { - implementation project(":eventmesh-runtime") - - // 示例: 加载 RocketMQ 插件 - implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq") -} -``` - -2. 插件目录: EventMesh 会根据 `eventmesh.properties` 加载 `dist/plugin` 目录中的插件。Gradle 的 `installPlugin` 任务会构建插件并将其移动到 `dist/plugin` 目录中。 - -```console -gradle installPlugin -``` - -#### 1.2.4 启动Runtime - -执行 `start.sh` 脚本启动 EventMesh Runtime 服务器。 - -```console -bash bin/start.sh -``` - -查看输出日志: - -```console -tail -f logs/eventmesh.out -``` - -## 2 远程部署 - -### 2.1 依赖 - -``` -建议使用64位操作系统,建议使用Linux / Unix; -64位JDK 1.8+; -Gradle至少为7.0, 推荐 7.0.* -``` - -### 2.2 下载 - -在 [EventMesh download](https://eventmesh.apache.org/download) 页面选择1.5.0版本的 Binary Distribution 进行下载, 您将获得`apache-eventmesh-1.9.0-bin.tar.gz`。 - -```console -# 解压 -tar -xvzf apache-eventmesh-1.9.0-bin.tar.gz -cd apache-eventmesh-1.9.0 -``` - -### 2.3 部署 - -编辑 `eventmesh.properties` 以更改 EventMesh Runtime 的配置(如 TCP 端口、客户端黑名单)。 - -```console -vim conf/eventmesh.properties -``` - -执行 `start.sh` 脚本启动 EventMesh Runtime 服务器。 - -```console -bash bin/start.sh -``` -如果看到"EventMeshTCPServer[port=10000] started....",则说明设置成功。 - -查看输出日志: - -```console -cd /root/apache-eventmesh-1.9.0/logs -tail -f eventmesh.out -``` - -停止: - -```console -bash bin/stop.sh -``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/_category_.json index bc305c5ad5..06fd721fbd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/_category_.json +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/instruction/_category_.json @@ -1,6 +1,4 @@ { - "position": 2, - "label": "安装部署", + "label": "Instructions", "collapsed": false } - diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/introduction.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/introduction.md index de44fcb2c5..c77e3863e6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/introduction.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/introduction.md @@ -1,33 +1,49 @@ ---- -sidebar_position: 0 ---- +# Apache EventMesh (Incubating) -# Apache EventMesh +[![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml) +[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh) +[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java) +[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/) +[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases) +[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) -[![CI status](https://img.shields.io/github/actions/workflow/status/apache/eventmesh/ci.yml?logo=github&style=for-the-badge)](https://github.com/apache/eventmesh/actions/workflows/ci.yml) -[![CodeCov](https://img.shields.io/codecov/c/gh/apache/eventmesh/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/apache/eventmesh) -[![License](https://img.shields.io/github/license/apache/eventmesh?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0.html) -[![GitHub Release](https://img.shields.io/github/v/release/apache/eventmesh?style=for-the-badge)](https://github.com/apache/eventmesh/releases) -[![Slack Status](https://img.shields.io/badge/slack-join_chat-blue.svg?logo=slack&style=for-the-badge)](https://join.slack.com/t/the-asf/shared_invite/zt-1y375qcox-UW1898e4kZE_pqrNsrBM2g) +## 什么是Event Mesh? -**Apache EventMesh** 是一个动态的云原生事件驱动架构基础设施,用于分离应用程序和后端中间件层,它支持广泛的用例,包括复杂的混合云、使用了不同技术栈的分布式架构。 +EventMesh是一个动态的云原生事件驱动架构基础设施,用于分离应用程序和后端中间件层,它支持广泛的用例,包括复杂的混合云、使用了不同技术栈的分布式架构。 -## 特性 +![architecture1](../../../../static/images/removed/eventmesh-define.png) -- **通信协议**: EventMesh 可以使用 TCP、HTTP 或 gRPC 与客户端通信。 -- **CloudEvents**: EventMesh 支持[CloudEvents](https://cloudevents.io) 规范作为事件的格式。CloudEvents 是一种描述事件数据的公共格式的规范,用于在服务、平台和系统之间提供互操作性。 -- **Schema 注册**: EventMesh 实现了schema注册,该schema注册可以接收并存储来自客户端的模式,并提供其他客户端检索模式的接口。 -- **可观察性**: EventMesh 暴露了一系列metrics,例如 HTTP 协议的平均延迟和传递消息数。这些metrics可以使用 Prometheus 或 OpenTelemetry 收集和分析。 -- **事件工作流程编排**:EventMesh Workflow 可以接收事件,并根据工作流定义和当前工作流状态决定触发哪个命令。工作流定义可以使用 [Serverless Workflow](https://serverlessworkflow.io) DSL 编写。 +**EventMesh架构:** -## 组件 +![architecture1](../../../../static/images/removed/eventmesh-runtime.png) -Apache EventMesh 由多个组件组成,这些组件集成了不同的中间件和消息协议,以增强应用程序运行时的功能。 +**EventMesh云原生结构:** + +![architecture2](../../../../static/images/removed/eventmesh-panels.png) + +Event Mesh允许将来自一个应用程序的事件动态路由到任何其他应用程序. Event Mesh的一般功能: + +* 事件驱动; +* 事件治理; +* 动态路由; +* 云原生 + +部件: + +* eventmesh-runtime:一种中间件,用于在事件生产者和消费者之间传输事件,支持云原生应用程序和微服务 +* eventmesh-sdk-java:当前支持HTTP、HHTTP、TCP和 [gRPC](https://grpc.io) 协议 + + +## 快速开始 + +1. 构建并部署 event-store(RocketMQ), 请参见[说明](instruction/01-store.md) +2. 构建并部署 eventmesh-runtime,请参见[说明](instruction/02-runtime.md) +3. 运行 eventmesh-sdk-java 演示,请参见[说明](instruction/03-demo.md) + +## 贡献 + +永远欢迎参与共建 + +您可以从发现和解决问题开始~ +[GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) -- **eventmesh-runtime**:中间件,在生产者和消费者之间传输事件,支持云原生应用程序和微服务。 -- **eventmesh-sdk-java**:支持HTTP,TCP和[gRPC](https://grpc.io/)协议的Java SDK。 -- **eventmesh-connector-plugin**:插件集合,连接中间件,例如[Apache Kafka](https://kafka.apache.org/),[Apache RocketMQ](https://rocketmq.apache.org/),[Apache Pulsar](https://pulsar.apache.org/)和[Redis](https://redis.io/)。 -- **eventmesh-registry-plugin**:插件集合,集成服务注册表,例如[Nacos](https://nacos.io/)和[etcd](https://etcd.io/)。 -- **eventmesh-security-plugin**:插件集合,实现安全机制,例如ACL(访问控制列表),身份验证和授权。 -- **eventmesh-protocol-plugin**:插件集合,实现消息协议,例如[CloudEvents](https://cloudevents.io/)和[MQTT](https://mqtt.org/)。 -- **eventmesh-admin**:控制面板,管理客户端,主题和订阅。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/roadmap.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/roadmap.md index b0998a52dc..a3d7695cca 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/roadmap.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/roadmap.md @@ -4,43 +4,44 @@ sidebar_position: 1 # EventMesh产品路线图 -下表列出了EventMesh的新特性和bug修复情况,详情请参考 [release notes](https://eventmesh.apache.org/events/release-notes/v1.9.0/). +下表列出了EventMesh的新特性和bug修复情况,详情请参考 [release notes](https://eventmesh.apache.org/events/release-notes/v1.4.0). ## List of Features and Milestones | Status | Description | Reference | |-------------------------------------------|---------------------------------| --- | -| **Implemented in 1.0.0** | Support HTTP | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.0.0** | Support TCP | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.0.0** | Support Pub/Sub Event | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.1.1** | Provide Java SDK | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.1.1** | Support HTTPS | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.2.0** | Support RocketMQ as EventStore | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.2.0** | Support Heartbeat | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.3.0** | Integrate with OpenSchema | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.3.0** | Integrate with OpenTelemetry | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.3.0** | Support CloudEvents | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.4.0** | Support gRPC | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.5.0** | Provide Golang SDK | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.5.0** | Support Nacos Registry | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.5.0** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.5.0** | Support Federal Government | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.6.0 (to be released)** | Integrate with Consul | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.6.0 (to be released)** | Support Webhook | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **Implemented in 1.6.0 (to be released)** | Support etcd | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **In Progress** | Knative Eventing Infrastructure | [GitHub Issue](https://github.com/apache/eventmesh/issues/790), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-463) | -| **In Progress** | Dashboard | [GitHub Issue](https://github.com/apache/eventmesh/issues/700), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-465) | -| **In Progress** | Support Kafka as EventStore | [GitHub Issue](https://github.com/apache/eventmesh/issues/676) | -| **In Progress** | Support Pulsar as EventStore | [GitHub Issue](https://github.com/apache/eventmesh/issues/676) | -| **In Progress** | Support Dledger | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **In Progress** | Workflow | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **In Progress** | Support Redis | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **In Progress** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| **In Progress** | Support Zookeeper | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| Planned | Provide NodeJS SDK | [GitHub Issue](https://github.com/apache/eventmesh/issues/417) | -| Planned | Transaction Event | [GitHub Issue](https://github.com/apache/eventmesh/issues/697) | -| Planned | Event Query Language (EQL) | [GitHub Issue](https://github.com/apache/eventmesh/issues/778) | -| Planned | Metadata consistency persistent | [GitHub Issue](https://github.com/apache/eventmesh/issues/817) | -| Planned | Rust SDK | [GitHub Issue](https://github.com/apache/eventmesh/issues/815) | -| Planned | WebAssembly Runtime | [GitHub Issue](https://github.com/apache/eventmesh/issues/576) | -| Planned | Filter Chain | [GitHub Issue](https://github.com/apache/eventmesh/issues/664) | +| **Implemented in 1.0.0** | Support HTTP | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.0.0** | Support TCP | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.0.0** | Support Pub/Sub Event | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.1.1** | Provide Java SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.1.1** | Support HTTPS | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.2.0** | Support RocketMQ as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.2.0** | Support Heartbeat | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.3.0** | Integrate with OpenSchema | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.3.0** | Integrate with OpenTelemetry | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.3.0** | Support CloudEvents | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.4.0** | Support gRPC | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Provide Golang SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Nacos Registry | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Federal Government | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.6.0 (to be released)** | Integrate with Consul | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.6.0 (to be released)** | Support Webhook | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.6.0 (to be released)** | Support etcd | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **In Progress** | Knative Eventing Infrastructure | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/790), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-463) | +| **In Progress** | Dashboard | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/700), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-465) | +| **In Progress** | Support Kafka as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/676) | +| **In Progress** | Support Pulsar as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/676) | +| **In Progress** | Support Dledger | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **In Progress** | Workflow | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **In Progress** | Support Redis | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **In Progress** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **In Progress** | Support Zookeeper | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| Planned | Provide NodeJS SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| Planned | Transaction Event | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/697) | +| Planned | Event Query Language (EQL) | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/778) | +| Planned | Metadata consistency persistent | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/817) | +| Planned | Rust SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/815) | +| Planned | WebAssembly Runtime | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/576) | +| Planned | Filter Chain | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/664) | + diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/01-intro.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/01-intro.md index 80a0db79a9..cb4b87640c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/01-intro.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/01-intro.md @@ -1,20 +1,12 @@ -# 安装 SDK - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +# 安装 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.eventmesh/eventmesh-sdk-java/badge.svg?style=for-the-badge)](https://maven-badges.herokuapp.com/maven-central/org.apache.eventmesh/eventmesh-sdk-java) -EventMesh Java SDK 是在一个 Java 应用中集成 Eventmesh 所需的 Java 组件集合。SDK 支持使用 TCP、HTTP 和 gRPC 协议来发送和接收同步消息、异步消息和广播消息。SDK 实现了 EventMesh 消息、CloudEvents 和 OpenMessaging 形式。您可以在 [`eventmesh-example`](https://github.com/apache/eventmesh/tree/master/eventmesh-examples) 模块中查看示例项目。 - - - - - +EventMesh Java SDK 是在一个 Java 应用中集成 Eventmesh 所需的 Java 组件集合。SDK 支持使用 TCP、HTTP 和 gRPC 协议来发送和接收同步消息、异步消息和广播消息。SDK 实现了 EventMesh 消息、CloudEvents 和 OpenMessaging 形式。您可以在 [`eventmesh-example`](https://github.com/apache/incubator-eventmesh/tree/master/eventmesh-examples) 模块中查看示例项目。 +## Gradle - -​ 使用 Gradle 安装 EventMesh Java SDK,您需要在模块的 `build.gradle` 文件的依赖块中将 `org.apache.eventmesh:eventmesh-sdk-java` 声明为 `implementation`。 +使用 Gradle 安装 EventMesh Java SDK,您需要在模块的 `build.gradle` 文件的依赖块中将 `org.apache.eventmesh:eventmesh-sdk-java` 声明为 `implementation`。 ```groovy dependencies { @@ -22,12 +14,7 @@ dependencies { } ``` - - - - - - +## Maven 使用 Maven 安装 EventMesh Java SDK,您需要在项目 `pom.xml` 文件的依赖块中声明 `org.apache.eventmesh:eventmesh-sdk-java`。 @@ -39,9 +26,4 @@ dependencies { 1.4.0 -``` - - - - - \ No newline at end of file +``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/02-http.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/02-http.md index 0ce80ee406..9a8acd0d68 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/02-http.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/02-http.md @@ -53,7 +53,7 @@ public class HTTP { } ``` -EventMesh runtime 将发送一个包含 [CloudEvents 格式](https://github.com/cloudevents/spec) 信息的 POST 请求到这个回调的 URL 地址。类 [SubController.java](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/controller/SubController.java) 实现了 Spring Boot controller,它将接收并解析回调信息。 +EventMesh runtime 将发送一个包含 [CloudEvents 格式](https://github.com/cloudevents/spec) 信息的 POST 请求到这个回调的 URL 地址。类 [SubController.java](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/controller/SubController.java) 实现了 Spring Boot controller,它将接收并解析回调信息。 ## HTTP 生产者 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/03-tcp.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/03-tcp.md index 3027b53dc6..54f5eca556 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/03-tcp.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/03-tcp.md @@ -21,7 +21,7 @@ public class AsyncSubscribe implements ReceiveMsgHook { ## TCP 消费者 -消费者应该实现 `ReceiveMsgHook` 类,其被定义在 [ReceiveMsgHook.java](https://github.com/apache/eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java)。 +消费者应该实现 `ReceiveMsgHook` 类,其被定义在 [ReceiveMsgHook.java](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java)。 ```java public interface ReceiveMsgHook { diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/04-grpc.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/04-grpc.md index ce8d241d41..b078187071 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/04-grpc.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/sdk-java/04-grpc.md @@ -24,7 +24,7 @@ public class CloudEventsAsyncSubscribe implements ReceiveMsgHook { ### 流消费者 -EventMesh runtime 会将来自生产者的信息作为一系列事件流向流消费者发送。消费者应实现 `ReceiveHook` 类,其被定义在 [ReceiveMsgHook.java](https://github.com/apache/eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/ReceiveMsgHook.java)。 +EventMesh runtime 会将来自生产者的信息作为一系列事件流向流消费者发送。消费者应实现 `ReceiveHook` 类,其被定义在 [ReceiveMsgHook.java](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/ReceiveMsgHook.java)。 ```java public interface ReceiveMsgHook { @@ -77,7 +77,7 @@ public class CloudEventsAsyncSubscribe implements ReceiveMsgHook { ### Webhook 消费者 -类 `EventMeshGrpcConsumer` 的 `subscribe` 方法接收一个 `SubscriptionItem` 对象的列表,其中定义了要订阅的主题和一个可选的 timeout 值。如果提供了回调 URL,EventMesh runtime 将向回调 URL 地址发送一个包含 [CloudEvents 格式](https://github.com/cloudevents/spec) 消息的 POST 请求。[SubController.java](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/controller/SubController.java) 实现了一个接收并解析回调信息的 Spring Boot controller。 +类 `EventMeshGrpcConsumer` 的 `subscribe` 方法接收一个 `SubscriptionItem` 对象的列表,其中定义了要订阅的主题和一个可选的 timeout 值。如果提供了回调 URL,EventMesh runtime 将向回调 URL 地址发送一个包含 [CloudEvents 格式](https://github.com/cloudevents/spec) 消息的 POST 请求。[SubController.java](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/controller/SubController.java) 实现了一个接收并解析回调信息的 Spring Boot controller。 ```java import org.apache.eventmesh.client.grpc.consumer.EventMeshGrpcConsumer; diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/upgrade-guide/01-upgrade-guide.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/upgrade-guide/01-upgrade-guide.md deleted file mode 100644 index 733b5e1901..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/upgrade-guide/01-upgrade-guide.md +++ /dev/null @@ -1,16 +0,0 @@ -# EventMesh 升级指引 - -> 本文简单介绍EventMesh从1.2.0版本升级到最新版本的注意事项。 - -## 1. 注意事项 - -**如果您是首次接触并使用EventMesh,您可以忽略该章节。** - -## 2. 服务升级安装 - -EventMesh运行时模块的升级和启动可以按照 [设计文档](https://eventmesh.apache.org/docs/instruction/runtime) 完成. - -版本之间的差异和变化,请参考不同版本的[release notes](https://eventmesh.apache.org/events/release-notes)。可以满足不同版本间的兼容性。 - -如果需要使用最新的功能,按照版本说明升级到相应的版本即可,不同的插件模块组件可以单独打包配置。可以参考相应的[功能设计文档和指南](https://eventmesh.apache.org/docs/design-document/) - diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/upgrade-guide/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/upgrade-guide/_category_.json deleted file mode 100644 index af764643e9..0000000000 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.7.0/upgrade-guide/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 7, - "label": "Upgrade Guide", - "collapsed": false -} diff --git a/static/images/removed/Prometheus-download.png b/static/images/removed/Prometheus-download.png new file mode 100644 index 0000000000..c3796cad55 Binary files /dev/null and b/static/images/removed/Prometheus-download.png differ diff --git a/static/images/removed/eventmesh-define.png b/static/images/removed/eventmesh-define.png new file mode 100644 index 0000000000..971afccc21 Binary files /dev/null and b/static/images/removed/eventmesh-define.png differ diff --git a/static/images/removed/eventmesh-panels.png b/static/images/removed/eventmesh-panels.png new file mode 100644 index 0000000000..898dbb42ba Binary files /dev/null and b/static/images/removed/eventmesh-panels.png differ diff --git a/static/images/removed/eventmesh-runtime.png b/static/images/removed/eventmesh-runtime.png new file mode 100644 index 0000000000..7983e14723 Binary files /dev/null and b/static/images/removed/eventmesh-runtime.png differ diff --git a/static/images/removed/prometheus-yml.png b/static/images/removed/prometheus-yml.png new file mode 100644 index 0000000000..876f6c3cbd Binary files /dev/null and b/static/images/removed/prometheus-yml.png differ diff --git a/static/images/removed/promethus-search.png b/static/images/removed/promethus-search.png new file mode 100644 index 0000000000..d5f15af8ea Binary files /dev/null and b/static/images/removed/promethus-search.png differ diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/02-https.md b/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/02-https.md deleted file mode 100644 index 8dcd90ee37..0000000000 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/02-https.md +++ /dev/null @@ -1,30 +0,0 @@ -# HTTPS - -1. Configuration in eventmesh-runtime - -``` -eventMesh.properties (add the following configurations) -eventMesh.server.useTls.enabled=true // Default value: false - -Configuring environment variable --Dssl.server.protocol=TLSv1.1 // Default value: TLSv1.1 --Dssl.server.cer=sChat2.jks // Place the file in the conPath directory specified by the startup script start.sh --Dssl.server.pass=sNetty -``` - -2. Configuration in eventmesh-sdk-java - -``` -// Create a producer -LiteClientConfig eventMeshHttpClientConfig = new LiteClientConfig(); -... - -// Enable TLS -eventMeshHttpClientConfig.setUseTls(true); -LiteProducer producer = new LiteProducer(eventMeshHttpClientConfig); - -// Configure environment variables --Dssl.client.protocol=TLSv1.1 // Default value: TLSv1.1 --Dssl.client.cer=sChat2.jks // Place the file in the conPath directory specified by the application --Dssl.client.pass=sNetty -``` \ No newline at end of file diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/05-webhook.md b/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/05-webhook.md deleted file mode 100644 index 0cd2756d70..0000000000 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/05-webhook.md +++ /dev/null @@ -1,321 +0,0 @@ -# Use Webhook to subscribe events - -## Webhook usage process - -### The first step: Configure Webhook related information in eventmesh and start - -Configuration: - -``` -# Whether to start the Webhook admin service -eventMesh.webHook.admin.start=true - -# Webhook event configuration storage mode. But currently only supports file and nacos -eventMesh.webHook.operationMode=file - -# The file path of fileMode. If you write #{eventMeshHome}, in the eventMesh root directory -eventMesh.webHook.fileMode.filePath= #{eventMeshHome}/webhook - -# The nacos storage mode. The configuration naming rule is eventMesh.webHook.nacosMode.{nacos native configuration key} For the specific configuration, please see [nacos github api](https://github.com/alibaba/nacos/blob/develop/api/src/main/java /com/alibaba/nacos/api/SystemPropertyKeyConst.java) -## address of nacos -eventMesh.webHook.nacosMode.serverAddr=127.0.0.1:8848 - -# Webhook CloudEvent sending mode. This property is the same as the eventMesh.storage.plugin.type configuration. -eventMesh.webHook.producer.connector=standalone -``` - -### The second step: Add Webhook configuration information - -Configuration information description: - -```java - /** - * The path called by the manufacturer. Manufacturer event call address, [http or https]://[domain or IP]:[port]/webhook/[callbackPath] - * for example: http://127.0.0.1:10504/webhook/test/event , The full url needs to be filled in the manufacturer call input - * callbackPath is the only - */ - private String callbackPath; - - /** - * manufacturer name, like github - */ - private String manufacturerName; - - /** - * manufacturer domain name, like www.github.com - */ - private String manufacturerDomain; - - /** - * Webhook event name, like rep-push - */ - private String manufacturerEventName; - - /** - * http header content type - */ - private String contentType = "application/json"; - - /** - * description of this WebHookConfig - */ - private String description; - - /** - * secret key, for authentication - */ - private String secret; - - /** - * userName, for HTTP authentication - */ - private String userName; - - /** - * password, for HTTP authentication - */ - private String password; - - - /** - * roll out event name, like topic to mq - */ - private String cloudEventName; - - /** - * roll out data format -> CloudEvent serialization mode - * If HTTP protocol is used, the request header contentType needs to be marked - */ - private String dataContentType = "application/json"; - - /** - * id of cloudEvent, like uuid/manufacturerEventId - */ - private String cloudEventIdGenerateMode; - -``` - -#### Add WebHook config - -path: /webhook/insertWebHookConfig - -method: POST - -contentType: application/json - -input params: - -| field | desc | type | necessary | default | -| -- | -- | -- | -- | -- | -| callbackPath | call address, unique address | string | Y | null | -| manufacturerName | manufacturer name | string | Y | null | -| manufacturerDomain | manufacturer domain name | string | Y | null | -| manufacturerEventName | manufacturer event name | string | Y | null | -| contentType | http connettype | string | N | application/json | -| description | configuration instructions | string | N | null | -| secret | signature string | string | N | null | -| userName | username | string | N | null | -| password | password | string | N | null | -| cloudEventName | cloudEvent name | string | Y | null | -| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N |manufacturerEventId| - -E.g: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github", - "manufacturerDomain":"www.github.com", - "manufacturerEventName":"all", - "cloudEventName":"github-eventmesh" -} -``` - -Output params: 1 for success, 0 for failure - -#### Query WebHook config by callback path - -path: /webhook/queryWebHookConfigById - -method: POST - -contentType: application/json - -input params: - -| field | desc | type | necessary | default | -| -- | -- | -- | -- | -- | -| callbackPath | call address, unique address | string | Y | null | -| manufacturerName | the caller of this callbackPath belongs to | string | Y | null | - -E.g: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github" -} -``` - -Output params: - -| field | desc | type | necessary | default | -| -- | -- | -- | -- | -- | -| callbackPath | call address, unique address | string | Y | null | -| manufacturerName | manufacturer name | string | Y | null | -| manufacturerDomain | manufacturer domain name | string | Y | null | -| manufacturerEventName | manufacturer event name | string | Y | null | -| contentType | http connettype | string | N | application/json | -| description | configuration instructions | string | N | null | -| secret | signature key | string | N | null | -| userName | user name | string | N | null | -| password | password | string | N | null | -| cloudEventName | cloudEvent name | string | Y | null | -| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N | manufacturerEventId | - -#### Query WebHook config by manufacturer - -path: /webhook/queryWebHookConfigByManufacturer - -method: POST - -contentType: application/json - -input params: - -| field | desc | type | necessary | default | -| -- | -- | -- | -- | -- | -| manufacturerName | manufacturer name | string | Y | null | -| pageNum | page number of paging query | string | Y | null | -| pageSize | page size of each page | string | Y | null | - -E.g: - -```json -{ - "manufacturerName":"github", - "pageNum":1, - "pageSize":2 -} -``` - -Output params: - -| field | desc | type | necessary | default | -| -- | -- | -- | -- | -- | -| callbackPath | call address, unique address | string | Y | null | -| manufacturerName | manufacturer name | string | Y | null | -| manufacturerDomain | manufacturer domain name | string | Y | null | -| manufacturerEventName | manufacturer event name | string | Y | null | -| contentType | http connettype | string | N | application/json | -| description | configuration instructions | string | N | null | -| secret | signature key | string | N | null | -| userName | user name | string | N | null | -| password | password | string | N | null | -| cloudEventName | cloudEvent name | string | Y | null | -| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N | manufacturerEventId | - -#### Update WebHook config - -path: /webhook/updateWebHookConfig - -method: POST - -contentType: application/json - -input params: - -| field | desc | type | necessary | default | -| ------------------------ | ------------------------------------------------------------ | ------ | --------- | ------------------- | -| callbackPath | call address, unique address | string | Y | null | -| manufacturerName | manufacturer name | string | Y | null | -| manufacturerDomain | manufacturer domain name | string | Y | null | -| manufacturerEventName | manufacturer event name | string | Y | null | -| contentType | http connettype | string | N | application/json | -| description | configuration instructions | string | N | null | -| secret | signature string | string | N | null | -| userName | username | string | N | null | -| password | password | string | N | null | -| cloudEventName | cloudEvent name | string | Y | null | -| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N | manufacturerEventId | - -E.g: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github", - "manufacturerDomain":"www.github.com", - "manufacturerEventName":"all", - "cloudEventName":"github-eventmesh" -} -``` - -Output params: 1 for success, 0 for failure - -#### Delete WebHook config - -path: /webhook/deleteWebHookConfig - -method: POST - -contentType: application/json - -input params: - -| field | desc | type | necessary | default | -| ---------------- | ------------------------------------------ | ------ | --------- | ------- | -| callbackPath | call address, unique address | string | Y | null | -| manufacturerName | the caller of this callbackPath belongs to | string | Y | null | - -E.g: - -```json -{ - "callbackPath":"/webhook/github/eventmesh/all", - "manufacturerName":"github" -} -``` - -Output params: 1 for success, 0 for failure - -### The third step: Check if the configuration is successful - -1. file storage mode. Please go to the eventMesh.webHook.fileMode.filePath directory to view. The Filename is callbackPath. -2. nacos storage mode. Please go to the nacos service configured by eventMesh.webHook.nacosMode.serverAddr to see this. - -### The fourth step: Configure the consumer of cloudevent - -### The fifth step: Configure Webhook related information in the manufacturer - -> For manufacturer's operation, please refer to [Manufacturer's Webhook operation instructions](#Manufacturer's-Webhook-operation-instructions). - -## Manufacturer's Webhook operation instructions - -### GitHub sign up - -#### The first step: Enter the corresponding project - -#### The second step: click setting - -![](/images/design-document/webhook/webhook-github-setting.png) - -#### The third step: click Webhooks - -![](/images/design-document/webhook/webhook-github-webhooks.png) - -#### The fourth step: Click on Add Webhook - -![](/images/design-document/webhook/webhook-github-add.png) - -#### The fifth step: Fill in the Webhook information - -![](/images/design-document/webhook/webhook-github-info.png) - -Payload URL: EventMesh service address and callbackPath, which must include the protocol header. For example, when the callback address `callbackPath` is `/webhook/github/eventmesh/all`, the Payload URL is `http://www.example.com:10105/webhook/github/eventmesh/all`. - -[http or https]://[domain or IP]:[port]/webhook/[callbackPath] - -Content type: http header content type - -Secret: signature string \ No newline at end of file diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/_category_.json b/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/_category_.json deleted file mode 100644 index 7706f45770..0000000000 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Event Handling and Integration", - "collapsed": false -} diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/06-workflow.md b/versioned_docs/version-v1.7.0/design-document/01-workflow.md similarity index 97% rename from versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/06-workflow.md rename to versioned_docs/version-v1.7.0/design-document/01-workflow.md index eff287bad6..d0e47495f5 100644 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/06-workflow.md +++ b/versioned_docs/version-v1.7.0/design-document/01-workflow.md @@ -6,7 +6,7 @@ Imaging you are building a simple Order Management System for an E-Commerce Stor For high availability and high performance, you architect the system using event-driven architecture (EDA), and build microservice apps to handle store frontend, order management, payment processing, and shipment management. You deploy the whole system in a cloud environment. To handle high workloads, you leverage a messaging system to buffer the loads, and scale up multiple instances of microservices. The architecture could look similar to: -![Workflow Use Case](/images/design-document/workflow-use-case.jpg) +![Workflow Use Case](../../../static/images/design-document/workflow-use-case.jpg) While each microservice is acting on its own event channels, EventMesh plays a crucial role of doing Event Orchestration. @@ -35,7 +35,7 @@ Our long-term goal is to make working with EDAs as easy as it is to work with RE That goes from documentation to code generation, discovery to event management. Most of the processes you apply to your REST APIs nowadays would be applicable to your event-driven/asynchronous APIs too. -See AsyncAPI detail in the [official site](https://www.asyncapi.com/docs/guides) +See AsyncAPI detail in the [official site](https://www.asyncapi.com/docs/getting-started) ### Workflow Example @@ -181,13 +181,13 @@ events: The corresponding workflow diagram is the following: -![Workflow Diagram](/images/design-document/workflow-diagram.png) +![Workflow Diagram](../../../static/images/design-document/workflow-diagram.png) ## EventMesh Workflow Engine In the following architecture diagram, the EventMesh Catalog, EventMesh Workflow Engine and EventMesh Runtime are running in three different processors. -![Workflow Architecture](/images/design-document/workflow-architecture.jpg) +![Workflow Architecture](../../../static/images/design-document/workflow-architecture.jpg) The steps running the workflow is the followings: diff --git a/versioned_docs/version-v1.7.0/design-document/02-observability/_category_.json b/versioned_docs/version-v1.7.0/design-document/02-observability/_category_.json deleted file mode 100644 index 9a251b1a4d..0000000000 --- a/versioned_docs/version-v1.7.0/design-document/02-observability/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Observability", - "collapsed": false -} diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/01-runtime-protocol.md b/versioned_docs/version-v1.7.0/design-document/02-runtime-protocol.md similarity index 92% rename from versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/01-runtime-protocol.md rename to versioned_docs/version-v1.7.0/design-document/02-runtime-protocol.md index a5056ce3cc..3c9145b375 100644 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/01-runtime-protocol.md +++ b/versioned_docs/version-v1.7.0/design-document/02-runtime-protocol.md @@ -16,7 +16,7 @@ #### Message Composition -The `Package` class in the [`Package.java` file](https://github.com/apache/eventmesh/blob/master/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Package.java) is the TCP message object used in business logic layer. The class contains the `header` and `body` fields. +The `Package` class in the [`Package.java` file](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Package.java) is the TCP message object used in business logic layer. The class contains the `header` and `body` fields. ```java public class Package { @@ -128,21 +128,21 @@ public enum Command { #### Sync Message -![Sync Message](/images/design-document/sync-message.png) +![Sync Message](../../../static/images/design-document/sync-message.png) #### Async Message -![Async Message](/images/design-document/async-message.png) +![Async Message](../../../static/images/design-document/async-message.png) #### Boardcast Message -![Boardcast Message](/images/design-document/broadcast-message.png) +![Boardcast Message](../../../static/images/design-document/broadcast-message.png) ## HTTP Protocol ### Protocol Format -The `EventMeshMessage` class in the [`EventMeshMessage.java` file](https://github.com/apache/eventmesh/blob/master/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshMessage.java) is the HTTP message definition of EventMesh Runtime. +The `EventMeshMessage` class in the [`EventMeshMessage.java` file](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshMessage.java) is the HTTP message definition of EventMesh Runtime. ```java public class EventMeshMessage { @@ -246,7 +246,7 @@ The request header of the Send Async message is identical to the request header ### Protobuf -The `eventmesh-protocol-gprc` module contains the [protobuf definition file](https://github.com/apache/eventmesh/blob/master/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto) of the Eventmesh client. The `gradle build` command generates the gRPC codes, which are located in `/build/generated/source/proto/main`. The generated gRPC codes are used in `eventmesh-sdk-java` module. +The `eventmesh-protocol-gprc` module contains the [protobuf definition file](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto) of the Eventmesh client. The `gradle build` command generates the gRPC codes, which are located in `/build/generated/source/proto/main`. The generated gRPC codes are used in `eventmesh-sdk-java` module. ### Data Model diff --git a/versioned_docs/version-v1.7.0/design-document/02-stream.md b/versioned_docs/version-v1.7.0/design-document/03-stream.md similarity index 89% rename from versioned_docs/version-v1.7.0/design-document/02-stream.md rename to versioned_docs/version-v1.7.0/design-document/03-stream.md index 7f2534a5d4..eee994b2f8 100644 --- a/versioned_docs/version-v1.7.0/design-document/02-stream.md +++ b/versioned_docs/version-v1.7.0/design-document/03-stream.md @@ -36,7 +36,7 @@ and easily integrate various systems consuming or producing data. ## Architecture -![Stream Architecture](/images/design-document/stream-architecture.png) +![Stream Architecture](../../../static/images/design-document/stream-architecture.png) ## Design @@ -83,7 +83,7 @@ The main advantage of the pipeline is that you can create complex event processi Component interface is the primary entry point, you can use Component object as a factory to create EndPoint objects. -![Stream Component Interface](/images/design-document/stream-component-interface.png) +![Stream Component Interface](../../../static/images/design-document/stream-component-interface.png) ### EndPoint @@ -92,14 +92,14 @@ EndPoint which is act as factories for creating Consumer, Producer and Event obj - `createConsumer()` — Creates a consumer endpoint, which represents the source endpoint at the beginning of a route. - `createProducer()` — Creates a producer endpoint, which represents the target endpoint at the end of a route. -![Stream Component Routes](/images/design-document/stream-component-routes.png) +![Stream Component Routes](../../../static/images/design-document/stream-component-routes.png) #### Producer User can create following types of producer > Synchronous Producer-Processing thread blocks until the producer has finished the event processing. -![Stream Sync Producer](/images/design-document/stream-sync-producer.png) +![Stream Sync Producer](../../../static/images/design-document/stream-sync-producer.png) In future Producer Types: @@ -110,7 +110,7 @@ In future Producer Types: User can create following types of consumer > Event-driven consumer-the processing of an incoming request is initiated when message binder call a method in consumer. -![Stream Event-Driven Consumer](/images/design-document/stream-event-driven-consumer.png) +![Stream Event-Driven Consumer](../../../static/images/design-document/stream-event-driven-consumer.png) In the Future diff --git a/versioned_docs/version-v1.7.0/design-document/03-schema-registry.md b/versioned_docs/version-v1.7.0/design-document/04-schema-registry.md similarity index 96% rename from versioned_docs/version-v1.7.0/design-document/03-schema-registry.md rename to versioned_docs/version-v1.7.0/design-document/04-schema-registry.md index 7c5d228260..b44a77519f 100644 --- a/versioned_docs/version-v1.7.0/design-document/03-schema-registry.md +++ b/versioned_docs/version-v1.7.0/design-document/04-schema-registry.md @@ -39,11 +39,11 @@ OpenSchema[[5]](#References) proposes a specification for data schema when excha ### Architecture -![OpenSchema](/images/design-document/schema-registry-architecture.png) +![OpenSchema](../../../static/images/design-document/schema-registry-architecture.png) ### Process of Transferring Messages under Schema Registry -![Process](/images/design-document/schema-registry-process.jpg) +![Process](../../../static/images/design-document/schema-registry-process.jpg) The highlevel process of messages transmission contains 10 steps as follows: @@ -119,7 +119,7 @@ No. | Type | URL | response | exception | code | test ```CompatibilityController.java```+```CompatibilityService.java``` : ```OpenSchema 7.3.1~7.3.3 (API 11~13)``` + ```Check for Compatibility``` -![Project Structure](/images/design-document/schema-registry-project-structure.png) +![Project Structure](../../../static/images/design-document/schema-registry-project-structure.png) ## References diff --git a/versioned_docs/version-v1.7.0/design-document/05-metrics-export.md b/versioned_docs/version-v1.7.0/design-document/05-metrics-export.md new file mode 100644 index 0000000000..bab18761e3 --- /dev/null +++ b/versioned_docs/version-v1.7.0/design-document/05-metrics-export.md @@ -0,0 +1,47 @@ +# EventMesh Metrics (OpenTelemetry and Prometheus) + +## Introduction + +[EventMesh(incubating)](https://github.com/apache/incubator-eventmesh) is a dynamic cloud-native eventing infrastructure. + +## An overview of OpenTelemetry + +OpenTelemetry is a collection of tools, APIs, and SDKs. You can use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. + +## An overview of Prometheus + +Power your metrics and alerting with a leading open-source monitoring solution. + +- Dimensional data +- Powerful queries +- Great visualization +- Efficient storage +- Simple operation +- Precise alerting +- Many client libraries +- Many integrations + +## Requirements + +### Functional Requirements + +| Requirement ID | Requirement Description | Comments | +| :------------- | ------------------------------------------------------------ | ------------- | +| F-1 | EventMesh users should be able to observe HTTP metrics from Prometheus | Functionality | +| F-2 | EventMesh users should be able to observe TCP metrics from Prometheus | Functionality | + +## Design Details + +use the meter instrument provided by OpenTelemetry to observe the metrics exist in EventMesh then export to Prometheus. + +1、Initialize a meter instrument + +2、set the Prometheus server + +3、different metrics observer built + +## Appendix + +### References + + diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/03-cloudevents.md b/versioned_docs/version-v1.7.0/design-document/06-cloudevents.md similarity index 98% rename from versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/03-cloudevents.md rename to versioned_docs/version-v1.7.0/design-document/06-cloudevents.md index bff91b4575..9fe7e2dfc7 100644 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/03-cloudevents.md +++ b/versioned_docs/version-v1.7.0/design-document/06-cloudevents.md @@ -44,7 +44,7 @@ should be an easy way to achieve the requirements. ### Pluggable Protocols -![Pluggable Protocols](/images/design-document/cloudevents-pluggable-protocols.png) +![Pluggable Protocols](../../../static/images/design-document/cloudevents-pluggable-protocols.png) ### Process of CloudEvents under EventMesh diff --git a/versioned_docs/version-v1.7.0/design-document/07-tracing.md b/versioned_docs/version-v1.7.0/design-document/07-tracing.md new file mode 100644 index 0000000000..1b191965da --- /dev/null +++ b/versioned_docs/version-v1.7.0/design-document/07-tracing.md @@ -0,0 +1,87 @@ +# Distributed Tracing + +## Overview of OpenTelemetry + +OpenTelemetry is a collection of tools, APIs, and SDKs. You can use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. + +## Requirements + +- set tracer +- different exporter +- start and end span in server + +## Design Details + +- SpanProcessor: BatchSpanProcessor + +- Exporter: log(default), would be changed from properties + +```java +// Configure the batch spans processor. This span processor exports span in batches. +BatchSpanProcessor batchSpansProcessor = + BatchSpanProcessor.builder(exporter) + .setMaxExportBatchSize(512) // set the maximum batch size to use + .setMaxQueueSize(2048) // set the queue size. This must be >= the export batch size + .setExporterTimeout( + 30, TimeUnit.SECONDS) // set the max amount of time an export can run before getting + // interrupted + .setScheduleDelay(5, TimeUnit.SECONDS) // set time between two different exports + .build(); +OpenTelemetrySdk.builder() + .setTracerProvider( + SdkTracerProvider.builder().addSpanProcessor(batchSpansProcessor).build()) + .build(); +``` + +1. When using the method 'init()' of the class "EventMeshHTTPServer", the class "AbstractHTTPServer” will get the tracer + +```java +super.openTelemetryTraceFactory = new OpenTelemetryTraceFactory(eventMeshHttpConfiguration); +super.tracer = openTelemetryTraceFactory.getTracer(this.getClass().toString()); +super.textMapPropagator = openTelemetryTraceFactory.getTextMapPropagator(); +``` + +2. then the trace in class "AbstractHTTPServer” will work. + +## Problems + +### How to set different exporter in class 'OpenTelemetryTraceFactory'? (Solved) + +After I get the exporter type from properties, how to deal with it. + +The 'logExporter' only needs to new it. + +But the 'zipkinExporter' needs to new and use the "getZipkinExporter()" method. + +## Solutions + +### Solution of different exporter + +Use reflection to get an exporter. + +First of all, different exporter must implement the interface 'EventMeshExporter'. + +Then we get the exporter name from the configuration and reflect to the class. + +```java +//different spanExporter +String exporterName = configuration.eventMeshTraceExporterType; +//use reflection to get spanExporter +String className = String.format("org.apache.eventmesh.runtime.exporter.%sExporter",exporterName); +EventMeshExporter eventMeshExporter = (EventMeshExporter) Class.forName(className).newInstance(); +spanExporter = eventMeshExporter.getSpanExporter(configuration); +``` + +Additional, this will surround with try catch.If the specified exporter cannot be obtained successfully, the default exporter log will be used instead + +#### Improvement of different exporter + +SPI (To be completed) + +## Appendix + +### References + + + + diff --git a/versioned_docs/version-v1.7.0/design-document/01-spi.md b/versioned_docs/version-v1.7.0/design-document/08-spi.md similarity index 100% rename from versioned_docs/version-v1.7.0/design-document/01-spi.md rename to versioned_docs/version-v1.7.0/design-document/08-spi.md diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/04-event-bridge.md b/versioned_docs/version-v1.7.0/design-document/09-event-bridge.md similarity index 97% rename from versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/04-event-bridge.md rename to versioned_docs/version-v1.7.0/design-document/09-event-bridge.md index 0bacec2808..0c7dfa7613 100644 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/04-event-bridge.md +++ b/versioned_docs/version-v1.7.0/design-document/09-event-bridge.md @@ -1,10 +1,10 @@ # Event Bridge -![event-bridge](/images/eventmesh-bridge.png) +![event-bridge](../../../static/images/eventmesh-bridge.png) Event Bridge 可以支持跨mesh集群的消息投递,下面展示这一功能的详细设计与体验步骤 -![event-bridge-detail](/images/design-document/event-bridge-detail.png) +![event-bridge-detail](../../../static/images/design-document/event-bridge-detail.png) > 注:在本地体验这一功能时需要启动两台eventmesh实例,同时要修改`eventmesh-runtime`目录下的`eventmesh.properties`文件中的端口配置,避免端口冲突。便于下文描述,event-bridge特性按照上图信息进行表述。 @@ -153,4 +153,4 @@ Event Bridge 可以支持跨mesh集群的消息投递,下面展示这一功能 "TEST-TOPIC-HTTP-ASYNC" ] } -``` +``` \ No newline at end of file diff --git a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/07-knative-connector.md b/versioned_docs/version-v1.7.0/design-document/10-knative-connector.md similarity index 89% rename from versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/07-knative-connector.md rename to versioned_docs/version-v1.7.0/design-document/10-knative-connector.md index a8e722da20..2c98e147a8 100644 --- a/versioned_docs/version-v1.7.0/design-document/01-event-handling-and-integration/07-knative-connector.md +++ b/versioned_docs/version-v1.7.0/design-document/10-knative-connector.md @@ -6,7 +6,7 @@ We use the *cloudevents-player* [Knative service](https://knative.dev/docs/servi ### Set up EventMesh Configuration -- Add the following lines to [eventmesh-starter/build.gradle](https://github.com/apache/eventmesh/blob/master/eventmesh-starter/build.gradle) file. +- Add the following lines to [eventmesh-starter/build.gradle](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-starter/build.gradle) file. ``` plugins { id 'application' @@ -24,7 +24,7 @@ dependencies { implementation project(":eventmesh-runtime") } ``` -- Add the following lines to [eventmesh-examples/build.gradle](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/build.gradle) file. +- Add the following lines to [eventmesh-examples/build.gradle](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/build.gradle) file. ``` plugins { id 'application' @@ -34,7 +34,7 @@ application { mainClass = project.hasProperty("mainClass") ? project.getProperty("mainClass") : 'NULL' } ``` -- Set ```eventMesh.connector.plugin.type=knative``` in [eventmesh-runtime/conf/eventmesh.properties](https://github.com/apache/eventmesh/blob/master/eventmesh-runtime/conf/eventmesh.properties) file. +- Set ```eventMesh.connector.plugin.type=knative``` in [eventmesh-runtime/conf/eventmesh.properties](https://github.com/pchengma/incubator-eventmesh/blob/master/eventmesh-runtime/conf/eventmesh.properties) file. ## Demo ### Publish an Event Message from Knative and Subscribe from EventMesh @@ -50,7 +50,7 @@ $ curl -i http://cloudevents-player.default.127.0.0.1.sslip.io -H "Content-Type: ``` #### Step 3: Subscribe from an EventMesh -- Set ```public static final String EVENTMESH_HTTP_ASYNC_TEST_TOPIC = "messages";``` in [ExampleConstants.java](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/common/ExampleConstants.java) file. +- Set ```public static final String EVENTMESH_HTTP_ASYNC_TEST_TOPIC = "messages";``` in [ExampleConstants.java](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/common/ExampleConstants.java) file. ```bash $ cd eventmesh-examples $ ../gradlew -PmainClass=org.apache.eventmesh.http.demo.sub.SpringBootDemoApplication run diff --git a/versioned_docs/version-v1.7.0/design-document/02-observability/03-prometheus.md b/versioned_docs/version-v1.7.0/design-document/11-prometheus.md similarity index 100% rename from versioned_docs/version-v1.7.0/design-document/02-observability/03-prometheus.md rename to versioned_docs/version-v1.7.0/design-document/11-prometheus.md diff --git a/versioned_docs/version-v1.7.0/design-document/02-observability/04-zipkin.md b/versioned_docs/version-v1.7.0/design-document/12-zipkin.md similarity index 100% rename from versioned_docs/version-v1.7.0/design-document/02-observability/04-zipkin.md rename to versioned_docs/version-v1.7.0/design-document/12-zipkin.md diff --git a/versioned_docs/version-v1.7.0/design-document/13-webhook.md b/versioned_docs/version-v1.7.0/design-document/13-webhook.md new file mode 100644 index 0000000000..e30e63dbd3 --- /dev/null +++ b/versioned_docs/version-v1.7.0/design-document/13-webhook.md @@ -0,0 +1,270 @@ + +## Webhook usage process +#### The first step: Configure webhook related information in eventmesh and start + +##### Configuration +``` +# Whether to start the webhook admin service +eventMesh.webHook.admin.start=true + +# webhook event configuration storage mode. But currently only supports file and nacos +eventMesh.webHook.operationMode=file + +# The file path of fileMode. If you write #{eventMeshHome}, in the eventMesh root directory +eventMesh.webHook.fileMode.filePath= #{eventMeshHome}/webhook + +# The nacos storage mode. The configuration naming rule is eventMesh.webHook.nacosMode.{nacos native configuration key} For the specific configuration, please see [nacos github api](https://github.com/alibaba/nacos/blob/develop/api/src/main/java /com/alibaba/nacos/api/SystemPropertyKeyConst.java) +## address of nacos +eventMesh.webHook.nacosMode.serverAddr=127.0.0.1:8848 + +# webhook eventcloud send mode. Same as eventMesh.connector.plugin.type configuration +eventMesh.webHook.producer.connector=standalone +``` + +#### The second step: Add webhook configuration information + +Configuration information description + +```java + /** + * The path called by the manufacturer. Manufacturer event call address, [http or https]://[domain or IP]:[port]/webhook/[callbackPath] + * for example: http://127.0.0.1:10504/webhook/test/event , The full url needs to be filled in the manufacturer call input + * callbackPath is the only + */ + private String callbackPath; + + /** + * manufacturer name, like github + */ + private String manufacturerName; + + /** + * webhook event name, like rep-push + */ + private String manufacturerEventName; + + /** + * http header content type + */ + private String contentType = "application/json"; + + /** + * description of this WebHookConfig + */ + private String description; + + /** + * secret key, for authentication + */ + private String secret; + + /** + * userName, for HTTP authentication + */ + private String userName; + + /** + * password, for HTTP authentication + */ + private String password; + + + /** + * roll out event name, like topic to mq + */ + private String cloudEventName; + + /** + * roll out data format -> CloudEvent serialization mode + * If HTTP protocol is used, the request header contentType needs to be marked + */ + private String dataContentType = "application/json";; + + /** + * source of event + */ + private String cloudEventSource; + + /** + * id of cloudEvent, like uuid/manufacturerEventId + */ + private String cloudEventIdGenerateMode; + +``` + +##### Add webhook config + +path: /webhook/insertWebHookConfig +method: POST +contentType: application/json + +input params: +| field | desc | type | necessary | default | +| -- | -- | -- | -- | -- | +| callbackPath | call address, unique address | string | Y | null | +| manufacturerName | manufacturer name | string | Y | null | +| manufacturerEventName | manufacturer EventName | string | Y | null | +| contentType | http connettype | string | N | application/json | +| description | configuration instructions | string | N | null | +| secret | signature string | string | N | null | +| userName | username | string | N | null | +| password | password | string | N | null | +| cloudEventName | cloudEvent name | string | Y | null | +| cloudEventSource | cloudEvent source | string | Y | null | +| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N manufacturerEventId | + +E.g: + +```json + +{ + "callbackPath":"/webhook/github/eventmesh/all", + "manufacturerName":"github", + "manufacturerEventName":"all", + "secret":"eventmesh", + "cloudEventName":"github-eventmesh", + "cloudEventSource":"github" +} + +``` + +Output params: 1 for success, 0 for failure + +##### delete webhook config +path: /webhook/deleteWebHookConfig +method: POST +contentType: application/json + +input params: +| field | desc | type | necessary | default | +| -- | -- | -- | -- | -- | +| callbackPath | call address, unique address | string | Y | null | + + +E.g: + +```json + +{ + "callbackPath":"/webhook/github/eventmesh/all" +} + +``` + +Output params: 1 for success, 0 for failure + +##### select WebHookConfig by callbackPath +path: /webhook/queryWebHookConfigById +method: POST +contentType: application/json + +input params: +| field | desc | type | necessary | default | +| -- | -- | -- | -- | -- | +| callbackPath | call address, unique address | string | Y | null | + + +E.g: + +```json + +{ + "callbackPath":"/webhook/github/eventmesh/all" +} + +``` + +Output params: +| field | desc | type | necessary | default | +| -- | -- | -- | -- | -- | +| callbackPath | call address, unique address | string | Y | null | +| manufacturerName | manufacturer name | string | Y | null | +| manufacturerEventName | manufacturer event name | string | Y | null | +| contentType | http connettype | string | N | application/json | +| description | configuration instructions | string | N | null | +| secret | signature key | string | N | null | +| userName | user name | string | N | null | +| password | password | string | N | null | +| cloudEventName | cloudEvent name | string | Y | null | +| cloudEventSource | cloudEvent source | string | Y | null | +| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N | manufacturerEventId | + + +##### 通过manufacturer查询WebHookConfig列表 +path: /webhook/queryWebHookConfigByManufacturer +method: POST +contentType: application/json + +input params: +| field | desc | type | necessary | default | +| -- | -- | -- | -- | -- | +| manufacturerName | manufacturer name | string | Y | null | + + +E.g: + +```json + +{ + "manufacturerName":"github" +} + +``` + +Output params: +| field | desc | type | necessary | default | +| -- | -- | -- | -- | -- | +| callbackPath | call address, unique address | string | Y | null | +| manufacturerName | manufacturer name | string | Y | null | +| manufacturerEventName | manufacturer event name | string | Y | null | +| contentType | http connettype | string | N | application/json | +| description | configuration instructions | string | N | null | +| secret | signature key | string | N | null | +| userName | user name | string | N | null | +| password | password | string | N | null | +| cloudEventName | cloudEvent name | string | Y | null | +| cloudEventSource | cloudEvent source | string | Y | null | +| cloudEventIdGenerateMode | cloudEvent event object identification method, uuid or event id | string | N | manufacturerEventId | + + +#### The third step: Check if the configuration is successful + +1. file storage mode. Please go to the eventMesh.webHook.fileMode.filePath directory to view. filename callbackPath. + +2. nacos storage mode. Please go to the nacos service configured by eventMesh.webHook.nacosMode.serverAddr to see. + +#### The fourth step: Configure the consumer of cloudevent + +#### The fifth step: Configure webhook related information in the manufacturer + +> For manufacturer's operation, please refer to [Manufacturer's webhook operation instructions] . + +## Manufacturer's webhook operation instructions + +### github sign up + +#### The first step: Enter the corresponding project + +#### The second step: click setting + +![](../../../static/images/design-document/webhook/webhook-github-setting.png) + +#### The third step: click Webhooks + +![](../../../static/images/design-document/webhook/webhook-github-webhooks.png) + +#### The fourth step: Click on Add webhook + +![](../../../static/images/design-document/webhook/webhook-github-add.png) + +#### The fifth step: Fill in the webhook information + +![](../../../static/images/design-document/webhook/webhook-github-info.png) + +Payload URL: Service address and pahts. [http or https]://[domain or IP]:[port]/webhook/[callbackPath] +Content type: http header content type +secret: signature string + + + + diff --git a/versioned_docs/version-v1.7.0/design-document/14-https.md b/versioned_docs/version-v1.7.0/design-document/14-https.md new file mode 100644 index 0000000000..a100ba3977 --- /dev/null +++ b/versioned_docs/version-v1.7.0/design-document/14-https.md @@ -0,0 +1,32 @@ +# HTTPS + +1.在eventmesh-runtime 中配置 + +``` +eventMesh.properties(添加如下配置) +eventMesh.server.useTls.enabled=true //默认值 false + + +config env varible +-Dssl.server.protocol=TLSv1.1 //默认值 TLSv1.1 +-Dssl.server.cer=sChat2.jks //把文件放到启动脚本start.sh 指定的conPath目录下 +-Dssl.server.pass=sNetty +``` + +2.在eventmesh-sdk-java 中配置 + +``` +//创建producer +LiteClientConfig eventMeshHttpClientConfig = new eventMeshHttpClientConfig(); +... + +//设置开启TLS +eventMeshHttpClientConfig.setUseTls(true); +LiteProducer producer = new LiteProducer(eventMeshHttpClientConfig); + + +//配置环境变量 +-Dssl.client.protocol=TLSv1.1 //默认值 TLSv1.1 +-Dssl.client.cer=sChat2.jks //把文件放到应用指定的conPath目录下 +-Dssl.client.pass=sNetty +``` diff --git a/versioned_docs/version-v1.7.0/instruction/00-eclipse.md b/versioned_docs/version-v1.7.0/instruction/00-eclipse.md deleted file mode 100644 index 7ef27d5358..0000000000 --- a/versioned_docs/version-v1.7.0/instruction/00-eclipse.md +++ /dev/null @@ -1,42 +0,0 @@ -# Import EventMesh into eclipse - -We recommend using `Intellij IDEA` for development, if you wish to use `Eclipse`, you can refer to the following steps to import the project. - -### 1. Dependencies - -``` -64-bit JDK 1.8+. -Gradle is at least 7.0, 7.0.* recommended; -eclipse installed gradle plugin or eclipse comes with gradle plugin; -``` - -### 2. Download source code - -```shell -git@github.com:apache/eventmesh.git -``` - -### 3. Project compile eclipse environment - -Open a command line terminal and run `gradlew cleanEclipse eclipse` - -### 4. Configuration changes - -Modify the project name to match the `settings.gradle` configuration file parameter `rootProject.name`. - -### 5. Modify `eclipse.init` configuration file, configure lombok to 1.18.8 version for example - -``` --javaagent:lombok-1.18.8.jar --XBootclasspath/a:lombok-1.18.8.jar -``` - -### 6. 202106 version, `eclipse.init` add configuration parameters - -``` ---illegal-access=permit -``` - -### 7. Import projetc - -Open eclipse, import gradle project to IDE. \ No newline at end of file diff --git a/versioned_docs/version-v1.7.0/instruction/01-store-with-docker.md b/versioned_docs/version-v1.7.0/instruction/01-store-with-docker.md new file mode 100644 index 0000000000..8c102b2496 --- /dev/null +++ b/versioned_docs/version-v1.7.0/instruction/01-store-with-docker.md @@ -0,0 +1,71 @@ +# Guidelines of eventmesh-store with Docker + +## Dependencies + +``` +64-bit OS,we recommend Linux/Unix; +64-bit JDK 1.8+; +Gradle 7.0+, we recommend 7.0.* +4g+ available disk to deploy eventmesh-store +If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer. +``` + + +## Download + +Download the Binary code (recommended: 4.9.*) from [RocketMQ Official](https://rocketmq.apache.org/dowloading/releases/). Here we take 4.9.2 as an example. + +``` +unzip rocketmq-all-4.9.2-bin-release.zip +cd rocketmq-4.9.2/ +``` + + +## Deploy + +- #### Start Name Server + +``` +nohup sh bin/mqnamesrv & +tail -f ~/logs/rocketmqlogs/namesrv.log +``` + +- #### Start Broker + +``` +nohup sh bin/mqbroker -n localhost:9876 & +tail -f ~/logs/rocketmqlogs/broker.log +``` + +The deployment of eventmesh-store has finished, please go to the next step: [Start Eventmesh-Runtime](02-runtime.md) + + + +## Deploy +Pull RocketMQ image from Docker Hub: + +```shell +#获取namesrv镜像 +sudo docker pull rocketmqinc/rocketmq-namesrv:4.5.0-alpine +#获取broker镜像 +sudo docker pull rocketmqinc/rocketmq-broker:4.5.0-alpine +``` + +Start namesrv and broker + +```shell +#运行namerv容器 +sudo docker run -d -p 9876:9876 -v `pwd`/data/namesrv/logs:/root/logs -v `pwd`/data/namesrv/store:/root/store --name rmqnamesrv rocketmqinc/rocketmq-namesrv:4.5.0-alpine sh mqnamesrv + +#运行broker容器 +sudo docker run -d -p 10911:10911 -p 10909:10909 -v `pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store --name rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" rocketmqinc/rocketmq-broker:4.5.0-alpine sh mqbroker -c ../conf/broker.conf +``` + +Please note that the **rocketmq-broker ip** is **pod ip**. If you want to modify this ip, you can set it your custom value in **broker.conf**。 + + +By now, the deployment of eventmesh-store has finished, please go to the next step: [Start Eventmesh-Runtime Using Docker](02-runtime-with-docker.md) + + +## Reference +For more details about RocketMQ,please refer to diff --git a/versioned_docs/version-v1.7.0/instruction/01-store.md b/versioned_docs/version-v1.7.0/instruction/01-store.md index 0abf341598..26ab6cfd36 100644 --- a/versioned_docs/version-v1.7.0/instruction/01-store.md +++ b/versioned_docs/version-v1.7.0/instruction/01-store.md @@ -1,8 +1,8 @@ -# EventMesh Store +# Guidelines of eventmesh-store -## 1 Dependencies +## Dependencies -```text +``` 64-bit OS,we recommend Linux/Unix; 64-bit JDK 1.8+; Gradle 7.0+, we recommend 7.0.* @@ -10,37 +10,35 @@ Gradle 7.0+, we recommend 7.0.* If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer. ``` -## 2 Download -Download the Binary code (recommended: 4.9.*) from [RocketMQ Official](https://rocketmq.apache.org/download/). Here we take 4.9.4 as an example. +## Download + +Download the Binary code (recommended: 4.9.*) from [RocketMQ Official](https://rocketmq.apache.org/dowloading/releases/). Here we take 4.9.2 as an example. ``` -unzip rocketmq-all-4.9.4-bin-release.zip -cd rocketmq-4.9.4/ +unzip rocketmq-all-4.9.2-bin-release.zip +cd rocketmq-4.9.2/ ``` -![rocketmq_1](/images/install/rocketmq_1.png) -### 3 Start +## Deploy -Start Name Server: +- #### Start Name Server -```console +``` nohup sh bin/mqnamesrv & tail -f ~/logs/rocketmqlogs/namesrv.log ``` -![rocketmq_2](/images/install/rocketmq_2.png) - -Start Broker: +- #### Start Broker -```console +``` nohup sh bin/mqbroker -n localhost:9876 & tail -f ~/logs/rocketmqlogs/broker.log ``` -The deployment of eventmesh-store has finished, please go to the next step: [Start Eventmesh-Runtime](03-runtime.md) +The deployment of eventmesh-store has finished, please go to the next step: [Start Eventmesh-Runtime](02-runtime.md) -## Reference -For more details about RocketMQ, please refer to \ No newline at end of file +## Reference +For more details about RocketMQ,please refer to diff --git a/versioned_docs/version-v1.7.0/instruction/04-runtime-with-docker.md b/versioned_docs/version-v1.7.0/instruction/02-runtime-with-docker.md similarity index 60% rename from versioned_docs/version-v1.7.0/instruction/04-runtime-with-docker.md rename to versioned_docs/version-v1.7.0/instruction/02-runtime-with-docker.md index 38661bcf85..7da3e2a433 100644 --- a/versioned_docs/version-v1.7.0/instruction/04-runtime-with-docker.md +++ b/versioned_docs/version-v1.7.0/instruction/02-runtime-with-docker.md @@ -1,9 +1,9 @@ -# EventMesh Runtime with Docker +# EventMesh Runtime (Docker) The documentation introduces the steps to install the latest release of EventMesh Runtime with Docker and connect to Apache RocketMQ. It's recommended to use a Linux-based system with [Docker Engine](https://docs.docker.com/engine/install/). Please follow the [Docker tutorial](https://docs.docker.com/get-started/) to get familiar with the basic concepts (registry, volume, etc.) and commands of Docker. -## 1. Dependencies +## Dependencies ``` 64-bit OS,we recommend Linux/Unix; 64-bit JDK 1.8+; @@ -12,23 +12,22 @@ Gradle 7.0+, we recommend 7.0.* If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer. ``` -## 2. Pull EventMesh Image +## Pull EventMesh Image Download the pre-built image of [`eventmesh`](https://hub.docker.com/r/eventmesh/eventmesh) from Docker Hub with `docker pull`: ```console -sudo docker pull eventmesh/eventmesh:v1.4.0 +$ sudo docker pull eventmesh/eventmesh:v1.4.0 ``` To verify that the `eventmesh/eventmesh` image is successfully installed, list the downloaded images with `docker images`: ```console $ sudo docker images -REPOSITORY TAG IMAGE ID CREATED SIZE -eventmesh/eventmesh v1.4.0 6e2964599c78 16 months ago 937MB +eventmesh/eventmesh v1.4.0 6e2964599c78 2 weeks ago 937MB ``` -## 3. Edit Configuration +## Edit Configuration Edit the `eventmesh.properties` to change the configuration (e.g. TCP port, client blacklist) of EventMesh Runtime. To integrate RocketMQ as a connector, these two configuration files should be created: `eventmesh.properties` and `rocketmq-client.properties`. @@ -39,9 +38,9 @@ sudo touch eventmesh.properties sudo touch rocketmq-client.properties ``` -### 4. Configure `eventmesh.properties` +### `eventmesh.properties` -The `eventmesh.properties` file contains the properties of EventMesh runtime environment and integrated plugins. Please refer to the [default configuration file](https://github.com/apache/eventmesh/blob/master/eventmesh-runtime/conf/eventmesh.properties) for the available configuration keys. +The `eventmesh.properties` file contains the properties of EventMesh runtime environment and integrated plugins. Please refer to the [default configuration file](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-runtime/conf/eventmesh.properties) for the available configuration keys. ```shell sudo vim eventmesh.properties @@ -53,7 +52,7 @@ sudo vim eventmesh.properties | `eventMesh.server.tcp.port` | 10000 | EventMesh TCP server port | | `eventMesh.server.grpc.port` | 10205 | EventMesh gRPC server port | -### 5. Configure `rocketmq-client.properties` +### `rocketmq-client.properties` The `rocketmq-client.properties` file contains the properties of the Apache RocketMQ nameserver. @@ -61,38 +60,31 @@ The `rocketmq-client.properties` file contains the properties of the Apache Rock sudo vim rocketmq-client.properties ``` -Please refer to the [default configuration file](https://github.com/apache/eventmesh/blob/1.3.0/eventmesh-runtime/conf/rocketmq-client.properties) and change the value of `eventMesh.server.rocketmq.namesrvAddr` to the nameserver address of RocketMQ. +Please refer to the [default configuration file](https://github.com/apache/incubator-eventmesh/blob/1.3.0/eventmesh-runtime/conf/rocketmq-client.properties) and change the value of `eventMesh.server.rocketmq.namesrvAddr` to the nameserver address of RocketMQ. | Configuration Key | Default Value | Description | |-|-|-| | `eventMesh.server.rocketmq.namesrvAddr` | `127.0.0.1:9876;127.0.0.1:9876` | The address of RocketMQ nameserver | -## 6. Run and Manage EventMesh Container +## Run and Manage EventMesh Container Run an EventMesh container from the `eventmesh/eventmesh` image with the `docker run` command. The `-p` option of the command binds the container port with the host machine port. The `-v` option of the command mounts the configuration files from files in the host machine. ```shell sudo docker run -d -p 10000:10000 -p 10105:10105 \ --v `pwd`/data/eventmesh/rocketmq/conf/eventmesh.properties:/data/app/eventmesh/conf/eventmesh.properties \ --v `pwd`/data/eventmesh/rocketmq/conf/rocketmq-client.properties:/data/app/eventmesh/conf/rocketmq-client.properties \ +-v /data/eventmesh/rocketmq/conf/eventmesh.properties:/data/app/eventmesh/conf/eventmesh.properties \ +-v /data/eventmesh/rocketmq/conf/rocketmq-client.properties:/data/app/eventmesh/conf/rocketmq-client.properties \ eventmesh/eventmesh:v1.4.0 ``` The `docker ps` command lists the details (id, name, status, etc.) of the running containers. The container id is the unique identifier of the container. -```shell +```console $ sudo docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -5bb6b6092672 eventmesh/eventmesh:v1.4.0 "/bin/sh -c 'sh star…" 5 seconds ago Up 3 seconds 0.0.0.0:10000->10000/tcp, :::10000->10000/tcp, 0.0.0.0:10105->10105/tcp, :::10105->10105/tcp eager_driscoll +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + eventmesh/eventmesh:v1.4.0 "/bin/sh -c 'sh star…" About a minute ago Up About a minute 0.0.0.0:10000->10000/tcp, :::10000->10000/tcp, 0.0.0.0:10105->10105/tcp, :::10105->10105/tcp ``` -As you can see from this message, the ```container id``` is ``5bb6b6092672``, and the ```name`` is ``eager_driscoll``, and they can both be used to uniquely identify this container. **Note**: On your computer, their values may be different from the ones here. - -## 7. Managing EventMesh Containers - -After successfully running an EventMesh container, you can manage the container by entering it, viewing logs, deleting it, and so on. - - To connect to the EventMesh container: ```shell @@ -113,8 +105,3 @@ sudo docker stop [container id or name] sudo docker rm -f [container id or name] ``` -## 8. Explore more - -Now that EventMesh is running through a container, you can refer to the [``eventmesh-examples`` module](https://github.com/apache/eventmesh/tree/master/eventmesh-examples) to write and test your own code. - -I hope you enjoy the process and get more out of it! \ No newline at end of file diff --git a/versioned_docs/version-v1.7.0/instruction/02-runtime.md b/versioned_docs/version-v1.7.0/instruction/02-runtime.md new file mode 100644 index 0000000000..66bfca7f6c --- /dev/null +++ b/versioned_docs/version-v1.7.0/instruction/02-runtime.md @@ -0,0 +1,107 @@ +# EventMesh Runtime + +EventMesh Runtime is the core component of Apache EventMesh (Incubating). It is the middleware that transmits events between producers and consumers. The documentation introduces the step to install and start the latest release of EventMesh Runtime in the local or test environment. The EventMesh Runtime requires a Linux-based system with JDK (Java Development Kit) 8+. + +Here, we take JDK 8 as an example. JDK 8 could be installed with the system package manager or the [openjdk:8-jdk](https://hub.docker.com/_/openjdk) Docker image. + + +## 1 Run on your local machine + +### 1.1 Dependencies + +``` +64-bit OS,we recommend Linux/Unix; +64-bit JDK 1.8+; +Gradle 7.0+, we recommend 7.0.* +4g+ available disk to deploy eventmesh-store +If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer. +``` + +### 1.2 Download Source Code + +Gradle is the build automation tool used by Apache EventMesh (Incubating). Please refer to the [offical guide](https://docs.gradle.org/current/userguide/installation.html) to install the latest release of Gradle. + +Download and extract the source code of the latest release from [EventMesh download](https://eventmesh.apache.org/download). + +```console +wget https://dlcdn.apache.org/incubator/eventmesh/{version}-incubating/apache-eventmesh-{version}-incubating-source.tar.gz + +tar -xvzf apache-eventmesh-1.5.0-incubating-source.tar.gz +``` + +Build the source code with Gradle. + +```console +cd apache-eventmesh-1.5.0-incubating-source +gradle clean dist +``` + +Edit the `eventmesh.properties` to change the configuration (e.g. TCP port, client blacklist) of EventMesh Runtime. + +```console +cd dist +vim conf/eventmesh.properties +``` + +Execute the `start.sh` script to start the EventMesh Runtime server. + +```console +bash bin/start.sh +``` + +### 1.3 Build and Load Plugins + +Apache EventMesh (Incubating) introduces the SPI (Service Provider Interface) mechanism, which enables EventMesh to discover and load the plugins at runtime. The plugins could be installed with these methods: + +- Gradle Dependencies: Declare the plugins as the build dependencies in `eventmesh-starter/build.gradle`. + +```gradle +dependencies { + implementation project(":eventmesh-runtime") + + // Example: Load the RocketMQ plugin + implementation project(":eventmesh-connector-plugin:eventmesh-connector-rocketmq") +} +``` + +- Plugin directory: EventMesh loads the plugins in the `dist/plugin` directory based on `eventmesh.properties`. The `installPlugin` task of Gradle builds and moves the plugins into the `dist/plugin` directory. + +```console +gradle installPlugin +``` + + +## 2 Remote deployment +### 2.1 Dependencies + +``` +64-bit OS,we recommend Linux/Unix; +64-bit JDK 1.8+; +Gradle 7.0+, we recommend 7.0.* +4g+ available disk to deploy eventmesh-store +If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer. +``` + +### 2.2 Download +Download and extract the executable binaries of the latest release from [EventMesh download](https://eventmesh.apache.org/download). + +```console +wget https://dlcdn.apache.org/incubator/eventmesh/1.5.0-incubating/apache-eventmesh-1.5.0-incubating-bin.tar.gz + +tar -xvzf apache-eventmesh-1.5.0-incubating-bin.tar.gz +``` + +### 2.3 Deploy +Edit the `eventmesh.properties` to change the configuration (e.g. TCP port, client blacklist) of EventMesh Runtime. The executable binaries contain all plugins in the bundle, thus there's no need to build them from source code. + +```console +cd apache-eventmesh-1.5.0-incubating +vim conf/eventmesh.properties +``` + +Execute the `start.sh` script to start the EventMesh Runtime server. + +```console +bash bin/start.sh +``` + diff --git a/versioned_docs/version-v1.7.0/instruction/02-store-with-docker.md b/versioned_docs/version-v1.7.0/instruction/02-store-with-docker.md deleted file mode 100644 index b728b3cca0..0000000000 --- a/versioned_docs/version-v1.7.0/instruction/02-store-with-docker.md +++ /dev/null @@ -1,73 +0,0 @@ -# EventMesh Store with Docker - -If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer. - -## 1. Dependencies - -``` -64-bit OS,we recommend Linux/Unix; -64-bit JDK 1.8+; -Gradle 7.0+, we recommend 7.0.* -4g+ available disk to deploy eventmesh-store -``` - -## 2. Deploy - -### 2.1 Pull Images - -Pull RocketMQ image from Docker Hub: - -```shell -#Pull rocketmq image -sudo docker pull apache/rocketmq:4.9.4 -``` - -You can list and view existing local mirrors with the following command: - -```shell -sudo docker images -``` - -If the terminal displays the image information as shown below, the EventMesh image has been successfully downloaded locally. - -```shell -REPOSITORY TAG IMAGE ID CREATED SIZE -apache/rocketmq 4.9.4 a2a50ca263c3 13 months ago 548MB -``` - -![rocketmq_docker_1](/images/install/rocketmq_docker_1.png) - -### 2.2 Run Docker - -Run namerv container: - -```shell - -sudo docker run -d -p 9876:9876 \ - -v `pwd`/data/namesrv/logs:/root/logs \ - -v `pwd`/data/namesrv/store:/root/store \ - --name rmqnamesrv \ - apache/rocketmq:4.9.4 \ - sh mqnamesrv - -``` - -Run broker container: - -```shell -sudo docker run -d -p 10911:10911 -p 10909:10909 \ - -v `pwd`/data/broker/logs:/root/logs \ - -v `pwd`/data/broker/store:/root/store \ - --name rmqbroker \ - --link rmqnamesrv:namesrv \ - -e "NAMESRV_ADDR=namesrv:9876" \ - apache/rocketmq:4.9.4 \ - sh mqbroker -c ../conf/broker.conf - -``` - -![rocketmq_docker_2](/images/install/rocketmq_docker_2.png) - -Please note that the **rocketmq-broker ip** is **pod ip**. If you want to modify this ip, you can set it your custom value in **broker.conf**。 - -By now, the deployment of eventmesh-store has finished, please go to the next step: [Start Eventmesh-Runtime Using Docker](04-runtime-with-docker.md) diff --git a/versioned_docs/version-v1.7.0/instruction/05-demo.md b/versioned_docs/version-v1.7.0/instruction/03-demo.md similarity index 61% rename from versioned_docs/version-v1.7.0/instruction/05-demo.md rename to versioned_docs/version-v1.7.0/instruction/03-demo.md index 0b270e32be..3be075f884 100644 --- a/versioned_docs/version-v1.7.0/instruction/05-demo.md +++ b/versioned_docs/version-v1.7.0/instruction/03-demo.md @@ -1,4 +1,4 @@ -# Run eventmesh-sdk-java demo +# Run our demos [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.eventmesh/eventmesh-sdk-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.eventmesh/eventmesh-sdk-java) @@ -8,9 +8,9 @@ > > EventMesh-sdk-java support HTTP, TCP and gRPC. -The test demos of TCP, HTTP 和 GRPC are in the module **eventmesh-examples**: +The test demos of TCP, HTTP 和 GRPC are in the module **eventmesh-examples** -## 1. TCP DEMO +## 1 TCP DEMO ### 1.1 ASYNC @@ -45,6 +45,7 @@ More information about EventMesh-TCP, please refer to [EventMesh TCP](../sdk-jav ## 2 HTTP DEMO + ### 2.1 ASYNC - The subscriber is a SpringBoot demo, so run this demo to start subscriber (we have created the topic TEST-TOPIC-HTTP-ASYNC by default, you can also create other topic to test) @@ -100,109 +101,52 @@ Run the main method of org.apache.eventmesh.grpc.pub.eventmeshmessage.BatchPubli More information about EventMesh-gRPC, please refer to [EventMesh gRPC](../sdk-java/04-grpc.md) -## 4. Run these demos by yourself +## 4 Run these demos by yourself -Please refer to [EventMesh Store](./01-store.md) and [EventMesh Runtime](./03-runtime.md) to finish the necessary deployment before try our demo +Please refer to [EventMesh Store](../instruction/01-store.md) and [EventMesh Runtime](../instruction/02-runtime.md) to finish the necessary deployment before try our demo After finishing the deployment of store and runtime, you can run our demos in module `eventmesh-examples`: -gradle: - -```shell -cd apache-eventmesh-1.9.0-src/eventmesh-examples -gradle clean dist +### TCP Sub -cd ./dist/bin -``` + ```shell + cd bin + sh tcp_eventmeshmessage_sub.sh + ``` -![demo_1](/images/install/demo_1.png) +### TCP Pub -### 4.1 TCP -TCP Sub - -```shell -bash tcp_eventmeshmessage_sub.sh -``` + ```shell + cd bin + sh tcp_pub_eventmeshmessage.sh + ``` -Open the corresponding log file to view the log: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_pub.out -``` -![demo_2](/images/install/demo_2.png) +### TCP Sub Broadcast -TCP Pub + ```shell + cd bin + sh tcp_sub_eventmeshmessage_broadcast.sh + ``` -```shell -bash tcp_pub_eventmeshmessage.sh -``` +### TCP Pub Broadcast -Open the corresponding log file to view the log: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_sub.out -``` + ```shell + cd bin + sh tcp_pub_eventmeshmessage_broadcast.sh + ``` -![demo_3](/images/install/demo_3.png) +### HTTP Sub -### 4.2 TCP Broadcast + ```shell + cd bin + sh http_sub.sh + ``` -TCP Sub Broadcast - -```shell -sh tcp_sub_eventmeshmessage_broadcast.sh -``` - -Open the corresponding log file to view the log: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_sub_broadcast.out -``` - -![demo_4](/images/install/demo_4.png) - -TCP Pub Broadcast - -```shell -sh tcp_pub_eventmeshmessage_broadcast.sh -``` - -Open the corresponding log file to view the log: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_tcp_pub_broadcast.out -``` - -![demo_5](/images/install/demo_5.png) - -### 4.3 HTTP - -HTTP Sub - -```shell -sh http_sub.sh -``` - -Open the corresponding log file to view the log: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_http_sub.out -``` - -![demo_6](/images/install/demo_6.png) - -HTTP Pub - -```shell -sh http_pub_eventmeshmessage.sh -``` - -Open the corresponding log file to view the log: -``` -cd /root/apache-eventmesh-1.9.0-src/eventmesh-examples/dist/logs -tail -f demo_http_pub.out -``` +### HTTP Pub -![demo_7](/images/install/demo_7.png) + ```shell + cd bin + sh http_pub_eventmeshmessage.sh + ``` -You can see the run logs for the different modes under the `/logs` directory. \ No newline at end of file +You can review the log in the folder `/logs` diff --git a/versioned_docs/version-v1.7.0/instruction/03-runtime.md b/versioned_docs/version-v1.7.0/instruction/03-runtime.md deleted file mode 100644 index dce9e6f54a..0000000000 --- a/versioned_docs/version-v1.7.0/instruction/03-runtime.md +++ /dev/null @@ -1,197 +0,0 @@ -# EventMesh Runtime - -The EventMesh Runtime is a stateful mesh node in an EventMesh cluster that is responsible for event transfer between the Source Connector and the Sink Connector, and can use EventMesh Storage as a storage queue for events. - -## 1 Run on your local machine - -### 1.1 Run from source code - -#### 1.1.1 Dependencies - -``` -64-bit OS,we recommend Linux/Unix; -64-bit JDK 1.8+; -Gradle 7.0+, we recommend 7.0.*; -``` -#### 1.1.2 Download source code - -Download and extract the source code of the latest release from [EventMesh download](https://eventmesh.apache.org/download). For example, with the current latest version, you will get `apache-eventmesh-1.9.0-source.tar.gz`. - -#### 1.1.3 Run form local - -**1.1.3.1 Description of the project structure:** - -- eventmesh-common : eventmesh public classes and methods module -- eventmesh-connector-api : eventmesh connector plugin interface definition module -- eventmesh-connector-plugin : eventmesh connector plugin module -- eventmesh-runtime : eventmesh runtime module -- eventmesh-sdk-java : eventmesh java client sdk -- eventmesh-starter : eventmesh local startup and runtime project portal -- eventmesh-spi : eventmesh SPI loader module - -> Note: Plugin modules follow the SPI specification defined by eventmesh, custom SPI interfaces need to be marked with the annotation @EventMeshSPI. -> Plugin instances need to be configured in the corresponding module under /main/resources/META-INF/eventmesh with a mapping file of the relevant interfaces to their implementation classes, with the name of the file being the full class name of the SPI interface. -> The content of the file is the mapping from the plugin instance name to the plugin instance, see eventmesh-connector-rocketmq plugin module for details. - -**1.1.3.2 Plugin Description** - -***1.1.3.2.1 Installing the plugin*** - -There are two ways to install the plugin - -- classpath loading: Local developers can install the plugin by declaring it in the eventmesh-starter module build.gradle, e.g., declare that it uses the rocketmq plugin - -```gradle - implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq") -``` - -- File loading: By installing the plugin to the plugin directory, EventMesh will automatically load the plugins in the plugin directory according to the conditions at runtime, you can install the plugin by executing the following command - -```shell -. /gradlew clean jar dist && . /gradlew installPlugin -``` - -***1.1.3.2.2 Using Plugins *** - -EventMesh will load plugins in the dist/plugin directory by default, you can change the plugin directory with `-DeventMeshPluginDir=your_plugin_directory`. Examples of plugins to be used at runtime can be found in the -`confPath` directory under `eventmesh.properties`. For example declare the use of the rocketmq plugin at runtime with the following settings. - -```properties -#connector plugin -eventMesh.connector.plugin.type=rocketmq -``` - -**1.1.3.3 Configuring the VM startup parameters** - -```properties --Dlog4j.configurationFile=eventmesh-runtime/conf/log4j2.xml --Deventmesh.log.home=eventmesh-runtime/logs --Deventmesh.home=eventmesh-runtime --DconfPath=eventmesh-runtime/conf -``` - -> Note: If your operating system is Windows, you may need to replace the file separator with '\'. - -**1.1.3.4 Getting up and running** - -``` -Run org.apache.eventmesh.starter. -``` - -### 1.2 Run form local binary - -#### 1.1.1 Dependencies - -``` -64-bit OS,we recommend Linux/Unix; -64-bit JDK 1.8+; -Gradle 7.0+, we recommend 7.0.*; -``` - -Gradle is the build automation tool used by Apache EventMesh. Please refer to the [offical guide](https://docs.gradle.org/current/userguide/installation.html) to install the latest release of Gradle. - -### 1.1.2 Download Source Code - -Download and extract the source code of the latest release from [EventMesh download](https://eventmesh.apache.org/download). For example, with the current latest version, you will get `apache-eventmesh-1.9.0-source.tar.gz`. - -```console -tar -xvzf apache-eventmesh-1.9.0-source.tar.gz -cd apache-eventmesh-1.9.0-src/ -``` - -Build the source code with Gradle. - -```console -gradle clean dist -``` - -Edit the `eventmesh.properties` to change the configuration (e.g. TCP port, client blacklist) of EventMesh Runtime. - -```console -cd dist -vim conf/eventmesh.properties -``` - -### 1.1.3 Build and Load Plugins - -Apache EventMesh introduces the SPI (Service Provider Interface) mechanism, which enables EventMesh to discover and load the plugins at runtime. The plugins could be installed with these methods: - -- Gradle Dependencies: Declare the plugins as the build dependencies in `eventmesh-starter/build.gradle`. - -```gradle -dependencies { - implementation project(":eventmesh-runtime") - - // Example: Load the RocketMQ plugin - implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq") -} -``` - -- Plugin directory: EventMesh loads the plugins in the `dist/plugin` directory based on `eventmesh.properties`. The `installPlugin` task of Gradle builds and moves the plugins into the `dist/plugin` directory. - -```console -gradle installPlugin -``` -### 1.1.4 启动Runtime - -Execute the `start.sh` script to start the EventMesh Runtime server. - -```console -bash bin/start.sh -``` - -View the output log: - -```console -tail -f logs/eventmesh.out -``` - -## 2 Remote deployment - -### 2.1 Dependencies - -``` -64-bit OS,we recommend Linux/Unix; -64-bit JDK 1.8+; -Gradle 7.0+, we recommend 7.0.*; -4g+ available disk to deploy eventmesh-store; -``` - -### 2.2 Download - -Download and extract the executable binaries of the latest release from [EventMesh download](https://eventmesh.apache.org/download).For example, with the current latest version, you will get `apache-eventmesh-1.9.0.tar.gz`. - - -```console -tar -xvzf apache-eventmesh-1.9.0-bin.tar.gz -cd apache-eventmesh-1.9.0 -``` - -### 2.3 Deploy - -Edit the `eventmesh.properties` to change the configuration (e.g. TCP port, client blacklist) of EventMesh Runtime. The executable binaries contain all plugins in the bundle, thus there's no need to build them from source code. - -```console -vim conf/eventmesh.properties -``` - -Execute the `start.sh` script to start the EventMesh Runtime server. - -```console -bash bin/start.sh -``` - -If you see "EventMeshTCPServer[port=10000] started...." , then the setup was successful. - -View the output log: - -```console -cd /root/apache-eventmesh-1.9.0/logs -tail -f eventmesh.out -``` - -You can stop the run with the following command: - -```console -bash bin/stop.sh -``` diff --git a/versioned_docs/version-v1.7.0/introduction.md b/versioned_docs/version-v1.7.0/introduction.md index 27503ffa44..991f81e10e 100644 --- a/versioned_docs/version-v1.7.0/introduction.md +++ b/versioned_docs/version-v1.7.0/introduction.md @@ -4,26 +4,39 @@ sidebar_position: 0 # Introduction to EventMesh -[![CI status](https://img.shields.io/github/actions/workflow/status/apache/eventmesh/ci.yml?logo=github&style=for-the-badge)](https://github.com/apache/eventmesh/actions/workflows/ci.yml) -[![CodeCov](https://img.shields.io/codecov/c/gh/apache/eventmesh/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/apache/eventmesh) -[![License](https://img.shields.io/github/license/apache/eventmesh?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0.html) -[![GitHub Release](https://img.shields.io/github/v/release/apache/eventmesh?style=for-the-badge)](https://github.com/apache/eventmesh/releases) -[![Slack Status](https://img.shields.io/badge/slack-join_chat-blue.svg?logo=slack&style=for-the-badge)](https://join.slack.com/t/the-asf/shared_invite/zt-1y375qcox-UW1898e4kZE_pqrNsrBM2g) +[![CI status](https://img.shields.io/github/workflow/status/apache/incubator-eventmesh/Continuous%20Integration?logo=github&style=for-the-badge)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml) +[![CodeCov](https://img.shields.io/codecov/c/gh/apache/incubator-eventmesh/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/apache/incubator-eventmesh) +[![Code Quality: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18&style=for-the-badge)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java) +[![Total Alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18&style=for-the-badge)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/) +[![License](https://img.shields.io/github/license/apache/incubator-eventmesh?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0.html) +[![GitHub Release](https://img.shields.io/github/v/release/apache/eventmesh?style=for-the-badge)](https://github.com/apache/incubator-eventmesh/releases) +[![Slack Status](https://img.shields.io/badge/slack-join_chat-blue.svg?logo=slack&style=for-the-badge)](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-16y1n77va-q~JepYy3RqpkygDYmQaQbw) -**Apache EventMesh** is a fully serverless platform used to build distributed [event-driven](https://en.wikipedia.org/wiki/Event-driven_architecture) applications. +**Apache EventMesh (Incubating)** is a dynamic event-driven application runtime used to decouple the application and backend middleware layer, which supports a wide range of use cases that encompass complex multi-cloud, widely distributed topologies using diverse technology stacks. ## Features -Apache EventMesh has a vast amount of features to help users achieve their goals. Let us share with you some of the key features EventMesh has to offer: - -- Built around the [CloudEvents](https://cloudevents.io) specification. -- Rapidly extensible language sdk around [gRPC](https://grpc.io) protocols. -- Rapidly extensible middleware by connectors such as [Apache RocketMQ](https://rocketmq.apache.org), [Apache Kafka](https://kafka.apache.org), [Apache Pulsar](https://pulsar.apache.org), [RabbitMQ](https://rabbitmq.com), [Redis](https://redis.io), [Pravega](https://cncf.pravega.io), and [RDMS](https://en.wikipedia.org/wiki/Relational_database)(in progress) using [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity). -- Rapidly extensible controller such as [Consul](https://consulproject.org/en/), [Nacos](https://nacos.io), [ETCD](https://etcd.io) and [Zookeeper](https://zookeeper.apache.org/). -- Guaranteed at-least-once delivery. -- Deliver events between multiple EventMesh deployments. -- Event schema management by catalog service. -- Powerful event orchestration by [Serverless workflow](https://serverlessworkflow.io/) engine. -- Powerful event filtering and transformation. -- Rapid, seamless scalability. -- Easy Function develop and framework integration. +- **Communication Protocol**: EventMesh could communicate with clients with TCP, HTTP, or gRPC. +- **CloudEvents**: EventMesh supports the [CloudEvents](https://cloudevents.io) specification as the format of the events. CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms, and systems. +- **Schema Registry**: EventMesh implements a schema registry that receives and stores schemas from clients and provides an interface for other clients to retrieve schemas. +- **Observability**: EventMesh exposed a range of metrics, such as the average latency of the HTTP protocol and the number of delivered messages. The metrics could be collected and analyzed with Prometheus or OpenTelemetry. +- **Event Workflow Orchestration**: EventMesh Workflow could receive an event and decide which command to trigger next based on the workflow definitions and the current workflow state. The workflow definition could be written with the [Serverless Workflow](https://serverlessworkflow.io) DSL. + +## Components + +Apache EventMesh (Incubating) consists of multiple components that integrate different middlewares and messaging protocols to enhance the functionalities of the application runtime. + +- **eventmesh-runtime**: The middleware that transmits events between producers and consumers, which supports cloud-native apps and microservices. +- **eventmesh-sdk-java**: The Java SDK that supports HTTP, TCP, and [gRPC](https://grpc.io) protocols. +- **eventmesh-connector-plugin**: The collection of plugins that connects middlewares such as [Apache Kafka](https://kafka.apache.org), [Apache RocketMQ](https://rocketmq.apache.org), [Apache Pulsar](https://pulsar.apache.org/), and [Redis](https://redis.io). +- **eventmesh-registry-plugin**: The collection of plugins that integrate service registries such as [Nacos](https://nacos.io) and [etcd](https://etcd.io). +- **eventmesh-security-plugin**: The collection of plugins that implement security mechanisms, such as ACL (access control list), authentication, and authorization. +- **eventmesh-protocol-plugin**: The collection of plugins that implement messaging protocols, such as [CloudEvents](https://cloudevents.io) and [MQTT](https://mqtt.org). +- **eventmesh-admin**: The control plane that manages clients, topics, and subscriptions. + +## Contributors + +Each contributor has played an important role in promoting the robust development of Apache EventMesh (Incubating). We sincerely appreciate all contributors who have contributed code and documents. The following is the list of contributors in EventMesh-related repositories. + +- [apache/incubator-eventmesh](https://github.com/apache/incubator-eventmesh/graphs/contributors) +- [apache/incubator-eventmesh-site](https://github.com/apache/incubator-eventmesh-site/graphs/contributors) diff --git a/versioned_docs/version-v1.7.0/roadmap.md b/versioned_docs/version-v1.7.0/roadmap.md index 950e4b73f1..b32faaa259 100644 --- a/versioned_docs/version-v1.7.0/roadmap.md +++ b/versioned_docs/version-v1.7.0/roadmap.md @@ -4,48 +4,47 @@ sidebar_position: 1 # Development Roadmap -The development roadmap of Apache EventMesh is an overview of the planned features and milestones involved in the next several releases. The recent features and bug fixes are documented in the [release notes](https://eventmesh.apache.org/events/release-notes/v1.9.0/). The order of the features listed below doesn't correspond to their priorities. +The development roadmap of Apache EventMesh (Incubating) is an overview of the planned features and milestones involved in the next several releases. The recent features and bug fixes are documented in the [release notes](https://eventmesh.apache.org/events/release-notes/v1.4.0). The order of the features listed below doesn't correspond to their priorities. ## List of Features and Milestones | Status | Description | Reference | |-------------------------------------------|---------------------------------| --- | -| **Implemented in 1.0.0** | Support HTTP | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.0.0** | Support TCP | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.0.0** | Support Pub/Sub Event | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.1.1** | Provide Java SDK | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.1.1** | Support HTTPS | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.2.0** | Support RocketMQ as EventStore | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.2.0** | Support Heartbeat | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.3.0** | Integrate with OpenSchema | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.3.0** | Integrate with OpenTelemetry | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.3.0** | Support CloudEvents | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.4.0** | Support gRPC | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.5.0** | Provide Golang SDK | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.5.0** | Support Nacos Registry | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.5.0** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.5.0** | Support Federal Government | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.5.0** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.6.0** | Integrate with Consul | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.6.0** | Support Webhook | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.6.0** | Support etcd | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.7.0** | Support Knative Eventing Infrastructure | [GitHub Issue](https://github.com/apache/issues/790), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-463) | -| **Implemented in 1.7.0** | Support Pravega as EventStore | [GitHub Issue](https://github.com/apache/issues/270) | -| **Implemented in 1.7.0** | Support Kafka as EventStore | [GitHub Issue](https://github.com/apache/issues/676) | -| **Implemented in 1.7.0** | Support Pulsar as EventStore | [GitHub Issue](https://github.com/apache/issues/676) | -| **Implemented in 1.7.0** | Support CNCF Serverless Workflow| [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.7.0** | Support Redis | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.7.0** | Provide Rust SDK | [GitHub Issue](https://github.com/apache/issues/815) | -| **Implemented in 1.7.0** | Support Zookeeper | [GitHub Issue](https://github.com/apache/issues/417) | -| **Implemented in 1.7.0** | Support RabbitMQ as EventStore | [GitHub Issue](https://github.com/apache/issues/1553) | -| **Implemented in 1.8.0** | Provide Dashboard | [GitHub Issue](https://github.com/apache/issues/700), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-465) -| **In Progress** | Source/Sink Connector | [GitHub Issue](https://github.com/apache/eventmesh/issues/3492) | -| **In Progress** | K8s integration | [GitHub Issue](https://github.com/apache/eventmesh/issues/3327) | -| **In Progress** | OpenFunction integration | [GitHub Issue](https://github.com/apache/eventmesh/issues/2040) | -| **In Progress** | OpenSergo integration | [GitHub Issue](https://github.com/apache/eventmesh/issues/2805) | -| Planned | Transaction Event | [GitHub Issue](https://github.com/apache/issues/697) | -| Planned | Provide NodeJS SDK | [GitHub Issue](https://github.com/apache/eventmesh/) | -| Planned | Provide PHP SDK | [GitHub Issue](https://github.com/apache/eventmesh/3) | -| Planned | Event Query Language (EQL) | [GitHub Issue](https://github.com/apache/eventmesh/) | -| Planned | WebAssembly Runtime | [GitHub Issue](https://github.com/apache/eventmesh/) | +| **Implemented in 1.0.0** | Support HTTP | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.0.0** | Support TCP | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.0.0** | Support Pub/Sub Event | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.1.1** | Provide Java SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.1.1** | Support HTTPS | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.2.0** | Support RocketMQ as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.2.0** | Support Heartbeat | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.3.0** | Integrate with OpenSchema | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.3.0** | Integrate with OpenTelemetry | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.3.0** | Support CloudEvents | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.4.0** | Support gRPC | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Provide Golang SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Nacos Registry | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Federal Government | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.5.0** | Support Mesh Bridge | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.6.0** | Integrate with Consul | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.6.0** | Support Webhook | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.6.0** | Support etcd | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0(to be release)** | Support Knative Eventing Infrastructure | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/790), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-463) | +| **Implemented in 1.7.0(to be release)** | Support Pravega as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/270) | +| **Implemented in 1.7.0(to be release)** | Support Kafka as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/676) | +| **Implemented in 1.7.0(to be release)** | Support Pulsar as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/676) | +| **Implemented in 1.7.0(to be release)** | Support CNCF Serverless Workflow| [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0(to be release)** | Support Redis | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0(to be release)** | Provide Rust SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/815) | +| **Implemented in 1.7.0(to be release)** | Support Zookeeper | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0(to be release)** | Support RabbitMQ as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/1553) | +| **In Progress** | Provide Dashboard | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/700), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-465) +| **In Progress** | Support Filter Chain | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/664) | +| **In Progress** | Metadata consistency persistent | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/817) | +| Planned | Support Dledger | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| Planned | Provide NodeJS SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| Planned | Provide PHP SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/1193) | +| Planned | Transaction Event | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/697) | +| Planned | Event Query Language (EQL) | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/778) | +| Planned | WebAssembly Runtime | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/576) | diff --git a/versioned_docs/version-v1.7.0/sdk-java/01-intro.md b/versioned_docs/version-v1.7.0/sdk-java/01-intro.md index 2c1a74bbef..42b9c41942 100644 --- a/versioned_docs/version-v1.7.0/sdk-java/01-intro.md +++ b/versioned_docs/version-v1.7.0/sdk-java/01-intro.md @@ -1,16 +1,12 @@ # Installation -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.eventmesh/eventmesh-sdk-java/badge.svg?style=for-the-badge)](https://maven-badges.herokuapp.com/maven-central/org.apache.eventmesh/eventmesh-sdk-java) -EventMesh SDK for Java is a collection of Java libraries to integrate EventMesh in a Java application. The SDK supports sending and receiving synchronous messages, asynchronous messages, and broadcast messages in TCP, HTTP, and gRPC protocols. The SDK implements EventMesh Message, CloudEvents, and OpenMessaging formats. The demo project is available in the [`eventmesh-example`](https://github.com/apache/eventmesh/tree/master/eventmesh-examples) module. +EventMesh SDK for Java is a collection of Java libraries to integrate EventMesh in a Java application. The SDK supports sending and receiving synchronous messages, asynchronous messages, and broadcast messages in TCP, HTTP, and gRPC protocols. The SDK implements EventMesh Message, CloudEvents, and OpenMessaging formats. The demo project is available in the [`eventmesh-example`](https://github.com/apache/incubator-eventmesh/tree/master/eventmesh-examples) module. - - +## Gradle -​ To install EventMesh SDK for Java with Gradle, declare `org.apache.eventmesh:eventmesh-sdk-java` as `implementation` in the dependencies block of the module's `build.gradle` file. +To install EventMesh SDK for Java with Gradle, declare `org.apache.eventmesh:eventmesh-sdk-java` as `implementation` in the dependencies block of the module's `build.gradle` file. ```groovy dependencies { @@ -18,10 +14,7 @@ dependencies { } ``` - - - - +## Maven To install EventMesh SDK for Java with Maven, declare `org.apache.eventmesh:eventmesh-sdk-java` as a dependency in the dependencies block of the project's `pom.xml` file. @@ -34,8 +27,3 @@ To install EventMesh SDK for Java with Maven, declare `org.apache.eventmesh:even ``` - - - - - diff --git a/versioned_docs/version-v1.7.0/sdk-java/02-http.md b/versioned_docs/version-v1.7.0/sdk-java/02-http.md index 5e5ae8b4db..bf2e5c6efa 100644 --- a/versioned_docs/version-v1.7.0/sdk-java/02-http.md +++ b/versioned_docs/version-v1.7.0/sdk-java/02-http.md @@ -53,7 +53,7 @@ public class HTTP { } ``` -The EventMesh runtime will send a POST request that contains the message in the [CloudEvents format](https://github.com/cloudevents/spec) to the callback URL. The [`SubController.java` file](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/controller/SubController.java) implements a Spring Boot controller that receives and parses the callback messages. +The EventMesh runtime will send a POST request that contains the message in the [CloudEvents format](https://github.com/cloudevents/spec) to the callback URL. The [`SubController.java` file](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/controller/SubController.java) implements a Spring Boot controller that receives and parses the callback messages. ## HTTP Producer diff --git a/versioned_docs/version-v1.7.0/sdk-java/03-tcp.md b/versioned_docs/version-v1.7.0/sdk-java/03-tcp.md index 87a682dc15..1643a41dca 100644 --- a/versioned_docs/version-v1.7.0/sdk-java/03-tcp.md +++ b/versioned_docs/version-v1.7.0/sdk-java/03-tcp.md @@ -21,7 +21,7 @@ public class AsyncSubscribe implements ReceiveMsgHook { ## TCP Consumer -The consumer should implement the `ReceiveMsgHook` class, which is defined in [`ReceiveMsgHook.java`](https://github.com/apache/eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java). +The consumer should implement the `ReceiveMsgHook` class, which is defined in [`ReceiveMsgHook.java`](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java). ```java public interface ReceiveMsgHook { diff --git a/versioned_docs/version-v1.7.0/sdk-java/04-grpc.md b/versioned_docs/version-v1.7.0/sdk-java/04-grpc.md index 79d0d4ae57..81f03a8d83 100644 --- a/versioned_docs/version-v1.7.0/sdk-java/04-grpc.md +++ b/versioned_docs/version-v1.7.0/sdk-java/04-grpc.md @@ -24,7 +24,7 @@ public class CloudEventsAsyncSubscribe implements ReceiveMsgHook { ### Stream Consumer -The EventMesh runtime sends the message from producers to the stream consumer as a series of event streams. The consumer should implement the `ReceiveMsgHook` class, which is defined in [`ReceiveMsgHook.java`](https://github.com/apache/eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/ReceiveMsgHook.java). +The EventMesh runtime sends the message from producers to the stream consumer as a series of event streams. The consumer should implement the `ReceiveMsgHook` class, which is defined in [`ReceiveMsgHook.java`](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/ReceiveMsgHook.java). ```java public interface ReceiveMsgHook { @@ -77,7 +77,7 @@ public class CloudEventsAsyncSubscribe implements ReceiveMsgHook { ### Webhook Consumer -The `subscribe` method of the `EventMeshGrpcConsumer` class accepts a list of `SubscriptionItem` that defines the topics to be subscribed and an optional callback URL. If the callback URL is provided, the EventMesh runtime will send a POST request that contains the message in the [CloudEvents format](https://github.com/cloudevents/spec) to the callback URL. The [`SubController.java` file](https://github.com/apache/eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/controller/SubController.java) implements a Spring Boot controller that receives and parses the callback messages. +The `subscribe` method of the `EventMeshGrpcConsumer` class accepts a list of `SubscriptionItem` that defines the topics to be subscribed and an optional callback URL. If the callback URL is provided, the EventMesh runtime will send a POST request that contains the message in the [CloudEvents format](https://github.com/cloudevents/spec) to the callback URL. The [`SubController.java` file](https://github.com/apache/incubator-eventmesh/blob/master/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/controller/SubController.java) implements a Spring Boot controller that receives and parses the callback messages. ```java import org.apache.eventmesh.client.grpc.consumer.EventMeshGrpcConsumer; diff --git a/versioned_docs/version-v1.7.0/upgrade-guide/01-upgrade-guide.md b/versioned_docs/version-v1.7.0/upgrade-guide/01-upgrade-guide.md deleted file mode 100644 index e300cdf57e..0000000000 --- a/versioned_docs/version-v1.7.0/upgrade-guide/01-upgrade-guide.md +++ /dev/null @@ -1,15 +0,0 @@ -# EventMesh Upgrade Guide - -> This article briefly introduces the precautions for upgrading EventMesh from version 1.2.0 to the latest version. - -## 1. Precautions - -**If you are using EventMesh for the first time, you can ignore this chapter.** - -## 2. Service upgrade installation - -The upgrade and startup of the EventMesh runtime module can be done in accordance with the [deployment guide](https://eventmesh.apache.org/docs/instruction/runtime). - -For differences and changes between versions, please refer to the [release notes](https://eventmesh.apache.org/events/release-notes) of different versions. Compatibility between versions can be achieved. - -If you need to use the latest features, follow the release note to upgrade to the corresponding version That’s it, and different plug-in module components can be packaged and configured separately. You can refer to the corresponding [feature design documents and guidelines](https://eventmesh.apache.org/docs/design-document/) diff --git a/versioned_docs/version-v1.7.0/upgrade-guide/_category_.json b/versioned_docs/version-v1.7.0/upgrade-guide/_category_.json deleted file mode 100644 index af764643e9..0000000000 --- a/versioned_docs/version-v1.7.0/upgrade-guide/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 7, - "label": "Upgrade Guide", - "collapsed": false -} diff --git a/versioned_sidebars/version-v1.7.0-sidebars.json b/versioned_sidebars/version-v1.7.0-sidebars.json index c4f2c9c665..560c1736ba 100644 --- a/versioned_sidebars/version-v1.7.0-sidebars.json +++ b/versioned_sidebars/version-v1.7.0-sidebars.json @@ -19,57 +19,22 @@ "label": "Design Document", "collapsible": true, "collapsed": false, - "items": [ - { - "type": "category", - "label": "Event Handling and Integration", - "collapsible": true, - "collapsed": false, - "items": [ - { - "type": "autogenerated", - "dirName": "design-document/01-event-handling-and-integration" - } - ] - }, - { - "type": "category", - "label": "Observability", - "collapsible": true, - "collapsed": false, - "items": [ - { - "type": "autogenerated", - "dirName": "design-document/02-observability" - } - ] - }, - "design-document/schema-registry", - "design-document/spi", - "design-document/stream" - ] - }, - { - "type": "category", - "label": "EventMesh SDK for Java", - "collapsible": true, - "collapsed": false, "items": [ { "type": "autogenerated", - "dirName": "sdk-java" + "dirName": "design-document" } ] }, { "type": "category", - "label": "Upgrade Guide", + "label": "EventMesh SDK for Java", "collapsible": true, "collapsed": false, "items": [ { "type": "autogenerated", - "dirName": "upgrade-guide" + "dirName": "sdk-java" } ] }