diff --git a/.asf.yaml b/.asf.yaml index 0ca3390e94..97c0778c42 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -16,7 +16,7 @@ # github: - description: EventMesh 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. + description: EventMesh is a fully serverless platform used to build distributed event-driven applications. homepage: https://eventmesh.apache.org/ labels: - pubsub @@ -36,6 +36,8 @@ github: - multi-runtime - microservice - state-management + - hacktoberfest + - hacktoberfest2022 enabled_merge_buttons: squash: true merge: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1bc7ac8d31..6595e7f6ee 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,7 +20,7 @@ --> Fixes #. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d17ca19232..04f8e32117 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,10 +37,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 - + uses: actions/checkout@v3 + - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. @@ -49,8 +49,9 @@ jobs: languages: ${{ matrix.language }} - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: + distribution: 'zulu' java-version: ${{ matrix.java }} - name: Build @@ -58,7 +59,7 @@ jobs: - name: Install plugin run: ./gradlew installPlugin - + - name: Perform CodeQL analysis uses: github/codeql-action/analyze@v1 @@ -71,7 +72,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check license header uses: apache/skywalking-eyes@main @@ -79,5 +80,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Check third party dependencies - run: | + run: | ./gradlew clean jar dist -x test -x checkstyleMain -x javaDoc && ./gradlew installPlugin && ./gradlew tar && sh tools/dependency-check/check-dependencies.sh && echo "Thirty party dependencies check success" diff --git a/.github/workflows/eventmesh-server-go.yml b/.github/workflows/eventmesh-server-go.yml new file mode 100644 index 0000000000..2d3ed9a542 --- /dev/null +++ b/.github/workflows/eventmesh-server-go.yml @@ -0,0 +1,52 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: "Continuous Integration of EventMesh Server Go" + +on: + push: + branches: ['*'] + pull_request: + branches: ['*'] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version-file: 'eventmesh-server-go/go.mod' + - run: go version + + - name: Download components + run: go mod tidy + working-directory: eventmesh-server-go + + - name: Build application + run: make build + working-directory: eventmesh-server-go + + - name: Test application + run: make test + working-directory: eventmesh-server-go \ No newline at end of file diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 7ce1a31e46..22b04d8325 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -61,8 +61,9 @@ jobs: Want to get closer to the community? - WeChat Group: - ![wechat_qr](https://github.com/apache/incubator-eventmesh/blob/master/docs/images/contact/wechat-assistant.jpg?raw=true) + |WeChat Assistant|WeChat Public Account|Slack| + |-|-|-| + |||[Join Slack Chat](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1ooav8slu-ijUI98MiEI501jhK1cabKQ)| Mailing Lists: | Name | Description |Subscribe |Unsubscribe|Archive diff --git a/.gitignore b/.gitignore index 817436eb14..244764cf97 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ logs *.iws *.class *.log +*.log.* .idea build .classpath diff --git a/.licenserc.yaml b/.licenserc.yaml index 92aff62557..10eb24fc30 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -38,9 +38,10 @@ header: - '**/Cargo.lock' - 'LICENSE' - 'NOTICE' - - 'DISCLAIMER-WIP' + - 'DISCLAIMER' - 'gradlew' - 'gradlew.bat' - '**/*.txt' + - 'DISCLAIMER' comment: on-failure diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 70dff529b9..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,109 +0,0 @@ -# Contributing to EventMesh - -Welcome to EventMesh! This document is a guideline about how to contribute to EventMesh. If you find something incorrect -or missing, please leave comments / suggestions. - -## Before you get started - -### Setting up your development environment - -You should have JDK installed in your develop environment. - -### Code style - -Import [EventMesh CheckStyle](./style/checkStyle.xml) file to your IDE. - -For IDEA, you can import check style file by: -```shell -Editor -> Code Style -> Java -> Scheme -> Import Scheme -> CheckStyle Configuration -``` -If you can't see CheckStyle Configuration section under Import Scheme, you can install CheckStyle-IDEA plugin first, and you will see it. - -You can also use `./gradlew check` to check the code style. -(NOTE: this command will check all file in project, when you submit a pr, the ci will only check the file has been changed in this pr). -## Contributing - -We are always very happy to have contributions, whether for typo fix, bug fix or big new features. Please do not ever -hesitate to ask a question or send a pull request. - -We strongly value documentation and integration with other projects. We are very glad to accept improvements for these -aspects. - -### GitHub workflow - -We use the `develop` branch as the development branch, which indicates that this is an unstable branch. - -Here are the workflow for contributors: - -1. Fork to your own -2. Clone fork to local repository -```git -git clone git@github.com:yourgithub/incubator-eventmesh.git -``` -3. Create a new branch and work on it -```git -git checkout -b fix_patch_xx -``` -4. Keep your branch in sync -```git -git remote add upstream git@github.com:apache/incubator-eventmesh.git -git fetch upstream develop:upstream_develop -git rebase upstream_develop -``` -5. Commit your changes (make sure your commit message concise) -6. Push your commits to your forked repository -7. Create a pull request - -Please follow [the pull request template](./.github/PULL_REQUEST_TEMPLATE.md). Please make sure the PR has a -corresponding issue. [GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) - -After creating a PR, one or more committers will help to review the pull request, after approve, this PR will be merged in to -EventMesh repository, and the related Issue will be closed. - -### Open an issue / PR - -We use [GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) -and [Pull Requests](https://github.com/apache/incubator-eventmesh/pulls) for trackers. - -If you find a bug in code, or want new features, or want to give suggestions, you -can [open an issue on GitHub](https://github.com/apache/incubator-eventmesh/issues/new) to report it. Please follow the -guideline message in the issue template. - -If you want to contribute, please follow the [contribution workflow](#github-workflow) and create a new pull request. Your PR title should start with [ISSUE #xx]. -If your PR contains large changes, e.g. component refactor or new components, please write detailed documents about its -design and usage. - -If your change is about a typo or small optimize, you needn't create an Issue, just submit a PR and title with [MINOR]. - -[Note]: A single pull request should not be too large. If heavy changes are required, it's better to separate the -changes to a few individual PRs. - -### PR review - -All code should be well reviewed by one or more committers. Some principles: - -- Readability: Important code should be well-documented. Comply with our [code style](./style/checkStyle.xml). -- Elegance: New functions, classes or components should be well-designed. -- Testability: Important code should be well-tested (high unit test coverage). - -### License review - -EventMesh follows [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) policy. All source files should -have the Apache License header added to the file header. EventMesh uses the [apache/skywalking-eyes](https://github.com/apache/skywalking-eyes) to check -the source file header. - -EventMesh uses [check-dependencies.sh](tools/dependency-check/check-dependencies.sh) script to check for third-part dependencies. -When you need to add a three-part dependency, you need to register the newly added dependency in tool/license/known-dependencies.txt. The newly added three-part libraries need to meet [ASF 3RD PARTY LICENSE POLICY](https://apache.org/legal/resolved.html). -It is highly recommended communicating with EventMesh community before you need to add a three-part library. - -### PR merge - -After a PR is approved by at least one committer, it can be merged. Before the merge, the committer can make changes to the commits message, requiring the commits -message to be clear without duplication, and use Squash and Merge to make sure one PR should only contain one commits. -For large multi-person PR, use Merge to merge, and fix the commits by rebase before merging. - -## Community - -### Contact us - -Mail: dev@eventmesh.apache.org diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md deleted file mode 100644 index 2e9e7a721b..0000000000 --- a/CONTRIBUTING.zh-CN.md +++ /dev/null @@ -1,99 +0,0 @@ -# 贡献给EventMesh - -欢迎使用EventMesh! 本文档是有关如何为EventMesh做出贡献的指南。 如果发现不正确或缺失的内容,请留下评论/建议。 - -## 开始之前 - -### 设置您的开发环境 - -您应该在开发环境中安装了JDK。 - -### Code Style - -将 [EventMesh CheckStyle](./style/checkStyle.xml) 文件导入开发者工具。如果你使用IDEA,你可以通过以下步骤导入: -```shell -Editor -> Code Style -> Java -> Scheme -> Import Scheme -> CheckStyle Configuration -``` -如果你在Import Scheme下看不到CheckStyle Configuration选项,你可以先安装CheckStyle-IDEA插件,然后你就可以看到这个选项了。 - -你也可以通过执行`./gradlew check`来检查代码格式。(NOTE: 这个命令将会检查整个项目中的代码格式, 当你提交一个PR时,CI只会检查在此次PR中被被修改的文件的代码格式) -## 贡献 - -无论是对于拼写错误,BUG修复还是重要的新功能,我们总是很乐意接受您的贡献。请不要犹豫,在Github Issue上提出或者通过邮件列表进行讨论。 - -我们非常重视文档以及与其他项目的集成,我们很高兴接受这些方面的改进。 - -### GitHub工作流程 - -我们将`develop`分支用作开发分支,这表明这是一个不稳定的分支。 - -这是贡献者的工作流程 : - -1. Fork到您个人仓库 -2. 克隆到本地存储库 -```git -git clone git@github.com:yourgithub/incubator-eventmesh.git -``` -3. 创建一个新分支并对其进行处理 -```git -git checkout -b fix_patch_xx -``` -4. 保持分支与主库同步 -```git -git remote add upstream git@github.com:apache/incubator-eventmesh.git -git fetch upstream develop:upstream_develop -git rebase upstream_develop -``` -5. 提交您的更改(确保您的提交消息简明扼要) -6. 将您的提交推送到分叉的存储库 -7. 创建PR合并请求 - -请遵循[Pull Requests模板](./.github/PULL_REQUEST_TEMPLATE.md). -请确保PR对应有相应的问题. [GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) - -创建PR后,社区会有committer成员帮助review,review通过之后,PR将会合并到主库,相应的Issue会被关闭。 - -### 打开问题/ PR - -我们将使用Issues和Pull Requests作为跟踪器 -- [GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) -- [Pull Requests](https://github.com/apache/incubator-eventmesh/pulls) - -如果您发现新的Bug,想要新功能或提出新当建议,您可以在GitHub上[创建Issue](https://github.com/apache/incubator-eventmesh/issues/new) ,请按照Issue模板中的准则进行操作。 -如果您在文档中发现拼写错误,或者发现代码中存在可以进行微小的优化的地方,您可以无需创建Issue, 直接提交一个PR。 - -如果您想贡献,请遵循[贡献工作流程](#github-workflow)并创建一个新的拉取请求。 如果您的PR包含较大的更改,例如组件重构或新组件,请写详细文档 有关其设计和使用的信息。 -对于PR的标题请依照[ISSUE #xx]进行开头,如果是细小的改动请以[MINOR]进行开头。 - -【注意】: 单个PR不应太大。如果需要进行重大更改,最好将更改分开 到一些个人PR。 - -### PR审查 - -所有PR应由一个或多个committer进行良好的审查。一些原则: - -- 可读性: 重要代码应有详细记录。符合我们的[代码风格](./style/checkStyle.xml) -- 优雅: 新功能,类或组件应经过精心设计 -- 可测试性: 重要代码应经过良好测试(较高的单元测试覆盖率) - -### License审查 - -EventMesh遵循[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 政策。 -所有的源代码文件应该在文件头部添加Apache License header,EventMesh会使用[apache/skywalking-eyes](https://github.com/apache/skywalking-eyes) -对源代码文件头进行校验。 - -EventMesh使用[check-dependencies.sh](tools/dependency-check/check-dependencies.sh)脚本 -检查第三方依赖,当你需要添加三方依赖时,你需要将新添加的依赖注册在tool/license/known-dependencies.txt中, -同时新添加的三方库需要满足[Apache对于第三方的政策](https://apache.org/legal/resolved.html)。 - -当添加依赖时遇到问题时,社区PPMC会协助解决,非常建议在需要添加三方依赖之前与EventMesh社区进行沟通。 - -### PR合并 - -PR经过至少一个committer approve之后会由committer负责合并,在合并的时候,committer可以对commits信息进行修改,要求commits信息简洁明了,不重复。 -在合并时使用Squash and merge, 要求一个PR保留一个commits。对于大型多人协助的PR,使用Merge进行合并,在合并之前通过rebase修正commits。 - -## 社区 - -### 联系我们 - -邮件:dev@eventmesh.apache.org diff --git a/DISCLAIMER-WIP b/DISCLAIMER similarity index 100% rename from DISCLAIMER-WIP rename to DISCLAIMER diff --git a/NOTICE b/NOTICE index 76091d57bb..73cb68fe13 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache EventMesh (incubating) -Copyright 2021-2022 The Apache Software Foundation +Copyright 2021-2023 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/README.md b/README.md index 8f00d4a07b..5b21efe28a 100644 --- a/README.md +++ b/README.md @@ -11,47 +11,41 @@ [![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-1fal6hggw-PJ3~N6Js_ZFlEvPtpQR7jg) +[![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-1ooav8slu-ijUI98MiEI501jhK1cabKQ) [📦 Documentation](https://eventmesh.apache.org/docs/introduction) | [📔 Examples](https://github.com/apache/incubator-eventmesh/tree/master/eventmesh-examples) | -[⚙️ Roadmap](https://eventmesh.apache.org/docs/roadmap) | +[⚙️ Roadmap](https://github.com/apache/incubator-eventmesh/blob/master/docs/en/roadmap.md) | [🌐 简体中文](README.zh-CN.md) # Apache EventMesh (Incubating) -**Apache EventMesh (Incubating)** is a dynamic [event-driven](https://en.wikipedia.org/wiki/Event-driven_architecture) application multi-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. +**Apache EventMesh (Incubating)** is a fully serverless platform used to build distributed [event-driven](https://en.wikipedia.org/wiki/Event-driven_architecture) applications. -## Features - -### Multi-Runtime Architecture - -![EventMesh Architecture](docs/images/eventmesh-architecture.png) +### EventMesh Architecture -### Orchestration +![EventMesh Architecture](docs/images/eventmesh-architecture-2.png) -![EventMesh Orchestration](docs/images/eventmesh-orchestration.png) +### EventMesh Dashboard +![EventMesh Dashboard](docs/images/dashboard.png) -### Data Mesh - -![EventMesh Data Mesh](docs/images/eventmesh-bridge.png) - -## Components +## Features -Apache EventMesh (Incubating) consists of multiple components that integrate different middlewares and messaging protocols to enhance the functionalities of the application runtime. +Apache EventMesh (Incubating) 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: -- **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-sdk-go**: The Golang SDK that supports HTTP, TCP, and [gRPC](https://grpc.io) protocols. -- **eventmesh-connector-plugin**: The collection of plugins that connects middlewares such as [Apache RocketMQ](https://rocketmq.apache.org)(implemented) [Apache Kafka](https://kafka.apache.org)(in progress), [Apache Pulsar](https://pulsar.apache.org/)(in progress), [Pravega](https://cncf.pravega.io/)(in progress), [Redis](https://redis.io) (in progress) and [RDMS](https://en.wikipedia.org/wiki/Relational_database) using [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity) (in progress). -- **eventmesh-registry-plugin**: The collection of plugins that integrate service registries such as [Consul](https://consulproject.org/en/), [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), [AMQP](https://www.amqp.org/) and [MQTT](https://mqtt.org). -- **eventmesh-workflow-go**: The [Serverless workflow](https://serverlessworkflow.io/) engine implementation. -- **eventmesh-catalog-go**: The catalog implementation follow [AsyncAPI](https://www.asyncapi.com/). -- **eventmesh-admin**: The control plane that manages clients, topics, and subscriptions. +- Built around the [CloudEvents](https://cloudevents.io) specification. +- Rapidty extendsible language sdk around [gRPC](https://grpc.io) protocols. +- Rapidty extendsible 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). +- Rapidty extendsible 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. ## Roadmap @@ -78,7 +72,7 @@ Besides, we also provide the docker-version guidelines for you if you prefer Doc 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. -- [Contributing Guideline](https://github.com/apache/incubator-eventmesh/blob/master/docs/en/contribute/03-new-contributor-guidelines.md) +- [Contributing Guideline](https://eventmesh.apache.org/community/contribute/contribute) - [Good First Issues](https://github.com/apache/incubator-eventmesh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) Here is the [List of Contributors](https://github.com/apache/incubator-eventmesh/graphs/contributors), thank you all! :) @@ -107,7 +101,7 @@ Apache EventMesh (Incubating) is licensed under the [Apache License, Version 2.0 |WeChat Assistant|WeChat Public Account|Slack| |-|-|-| -|||[Join Slack Chat](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1fal6hggw-PJ3~N6Js_ZFlEvPtpQR7jg)| +|||[Join Slack Chat](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1ooav8slu-ijUI98MiEI501jhK1cabKQ)| ### Mailing List diff --git a/README.zh-CN.md b/README.zh-CN.md index 8477f1816d..4814b3438a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -38,7 +38,7 @@ ![EventMesh Data Mesh](docs/images/eventmesh-bridge.png) ## 组件 - + **Apache EventMesh (Incubating)** 由多个组件组成,这些组件集成了不同的中间件和消息传输协议,以增强应用程序运行时的功能。 - **eventmesh-runtime**: 在生产者和消费者之间传输事件的中间件,它支持云原生应用程序和微服务。 @@ -79,7 +79,7 @@ 每一名贡献者都在这个项目的发展上都是至关重要的。我们真诚地感谢所有对代码和文档的贡献者!想要尝试贡献的可以看看以下三个链接。 -- [贡献准则](https://eventmesh.apache.org/docs/contribute/contribute) +- [贡献准则](https://eventmesh.apache.org/zh/community/contribute/contribute) - [值得新人尝试的 Issue](https://github.com/apache/incubator-eventmesh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) 这是项目的[贡献者名单](https://github.com/apache/incubator-eventmesh/graphs/contributors) diff --git a/build.gradle b/build.gradle index b9b1b744ce..bc25039774 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,8 @@ import java.util.concurrent.TimeUnit + + buildscript { repositories { maven { @@ -62,6 +64,11 @@ allprojects { compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" + java { + sourceCompatibility = "1.8" + targetCompatibility = "1.8" + } + clean.doFirst { delete 'build' delete 'dist' @@ -419,7 +426,7 @@ subprojects { sign publishing.publications.mavenJava } - def grpcVersion = '1.42.2' + def grpcVersion = '1.43.2' dependencyManagement { dependencies { @@ -427,9 +434,10 @@ subprojects { dependency "org.apache.commons:commons-collections4:4.1" dependency "org.apache.commons:commons-text:1.9" + dependency "commons-io:commons-io:2.11.0" dependency "com.google.guava:guava:31.0.1-jre" - + dependency "org.slf4j:slf4j-api:1.7.30" dependency "org.apache.logging.log4j:log4j-api:2.17.1" dependency "org.apache.logging.log4j:log4j-core:2.17.1" @@ -444,7 +452,7 @@ subprojects { dependency "org.asynchttpclient:async-http-client:2.12.0" dependency "org.apache.httpcomponents:httpclient:4.5.13" - dependency "io.netty:netty-all:4.1.73.Final" + dependency "io.netty:netty-all:4.1.79.Final" dependency 'io.dropwizard.metrics:metrics-core:4.1.0' dependency "io.dropwizard.metrics:metrics-healthchecks:4.1.0" @@ -459,6 +467,7 @@ subprojects { dependency 'io.prometheus:simpleclient_httpserver:0.8.1' dependency 'io.opentelemetry:opentelemetry-exporter-zipkin:1.3.0' dependency 'io.opentelemetry:opentelemetry-semconv:1.3.0-alpha' + dependency 'io.opentelemetry:opentelemetry-exporter-jaeger:1.4.0' dependency "io.openmessaging:openmessaging-api:2.2.1-pubsub" @@ -493,6 +502,18 @@ subprojects { dependency "org.yaml:snakeyaml:1.30" dependency "org.javassist:javassist:3.24.0-GA" + dependency "com.alibaba.nacos:nacos-client:2.1.0" + + dependency 'org.apache.zookeeper:zookeeper:3.4.6' + dependency 'org.apache.curator:curator-client:4.0.1' + dependency 'org.apache.curator:curator-framework:4.0.1' + dependency 'org.apache.curator:curator-recipes:4.0.1' + dependency 'org.apache.curator:curator-test:2.12.0' + + dependency "org.projectlombok:lombok:1.18.22" + dependency "com.github.seancfoley:ipaddress:5.3.3" + dependency "javax.annotation:javax.annotation-api:1.3.2" + dependency "com.alibaba:fastjson:1.2.83" } } } diff --git a/docs/en/contribute/01-release.md b/docs/en/contribute/01-release.md deleted file mode 100644 index 0810a75772..0000000000 --- a/docs/en/contribute/01-release.md +++ /dev/null @@ -1,731 +0,0 @@ -# Release Creation Process - -:::caution -The documentation of Release Creation Process is WIP (Work-in-Progress). -::: - -## 理解 Apache 发布的内容和流程 - -Source Release 是 Apache 关注的重点,也是发布的必须内容;而 Binary Release 是可选项, - -请参考以下链接,找到更多关于 ASF 的发布指南: - -- [Apache Release Guide](http://www.apache.org/dev/release-publishing) -- [Apache Release Policy](http://www.apache.org/dev/release.html) -- [Maven Release Info](http://www.apache.org/dev/publishing-maven-artifacts.html) - - -## 本地构建环境准备 - -主要包括签名工具、Maven 仓库认证相关准备 - -### 1.安装GPG - -在[GnuPG官网](https://www.gnupg.org/download/index.html)下载安装包。GnuPG的1.x版本和2.x版本的命令有细微差别,下列说明以**GnuPG-2.x**版本为例 - -```sh -$ gpg --version #检查版本,应该为2.x -``` - -### 2.用gpg生成key - -根据提示,生成 key - -> 注意:请使用Apache邮箱生成GPG的Key - -```shell -$ gpg --full-gen-key -gpg (GnuPG) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc. -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -Please select what kind of key you want: - (1) RSA and RSA (default) - (2) DSA and Elgamal - (3) DSA (sign only) - (4) RSA (sign only) -Your selection? 1 -RSA keys may be between 1024 and 4096 bits long. -What keysize do you want? (2048) 4096 -Requested keysize is 4096 bits -Please specify how long the key should be valid. - 0 = key does not expire - = key expires in n days - w = key expires in n weeks - m = key expires in n months - y = key expires in n years -Key is valid for? (0) -Key does not expire at all -Is this correct? (y/N) y - -GnuPG needs to construct a user ID to identify your key. - -Real name: ${输入用户名} -Email address: ${邮箱地址} -Comment: CODE SIGNING KEY -You selected this USER-ID: - "${输入用户名} (CODE SIGNING KEY) <${邮箱地址}>" - -Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O -You need a Passphrase to protect your secret key. # 填入密码,以后打包过程中会经常用到 -``` - -### 3.查看 key - -```shell -$ gpg --list-keys -pub rsa4096/579C25F5 2021-04-26 # 579C25F5就是key id -uid [ultimate] ${输入用户名} <${邮箱地址}> -sub rsa4096 2021-04-26 - -# 通过key id发送public key到keyserver -$ gpg --keyserver pgpkeys.mit.edu --send-key 579C25F5 -# 其中,pgpkeys.mit.edu为随意挑选的keyserver,keyserver列表为:https://sks-keyservers.net/status/,相互之间是自动同步的,选任意一个都可以。 -$ gpg --keyserver hkp://pgpkeys.mit.edu --recv-keys 579C25F5 # 验证是否同步到公网,网络不好可能需多试几次 -``` - -**注:如果有多个 public key,设置默认 key。**修改`~/.gnupg/gpg.conf` - -```sh -# If you have more than 1 secret key in your keyring, you may want to -# uncomment the following option and set your preferred keyid. -default-key 28681CB1 -``` - -**如果有多个 public key, 也可以删除无用的 key:** - -```shell -$ gpg --delete-secret-keys 29BBC3CB # 先删除私钥,指明key id -gpg (GnuPG) 2.2.27; Copyright (C) 2021 g10 Code GmbH -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -sec rsa4096/EE8DAE7D29BBC3CB 2021-04-27 mikexue - -Delete this key from the keyring? (y/N) y -This is a secret key! - really delete? (y/N) y -``` - -```shell -$ gpg --delete-keys 29BBC3CB # 删除公钥,指明key id -gpg (GnuPG) 2.2.27; Copyright (C) 2021 g10 Code GmbH -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - - -pub rsa4096/EE8DAE7D29BBC3CB 2021-04-27 mikexue - -Delete this key from the keyring? (y/N) y -``` - -由于公钥服务器没有检查机制,任何人都可以用你的名义上传公钥,所以没有办法保证服务器上的公钥的可靠性。 通常,你可以在网站上公布一个公钥指纹,让其他人核对下载到的公钥是否为真。 - -```shell -# fingerprint参数生成公钥指纹: -$gpg --fingerprint mikexue -pub rsa4096 2021-04-26 [SCA] - F84A 0041 D70B 37AF 9C7B F0B3 39F4 29D7 579C 25F5 -uid [ultimate] mikexue -sub rsa4096 2021-04-26 [E] -``` - -登录 [https://id.apache.org](https://id.apache.org/), 将上面的 fingerprint (即 F84A 0041 D70B 37AF 9C7B F0B3 39F4 29D7 579C 25F5) 粘贴到自己的用户信息中 OpenPGP Public Key Primary Fingerprint - - - -## 发布Apache Maven仓库 - -> 注:EventMesh使用Gradle构建,需修改gradle相关配置 - -### 1.导出私钥文件 - -```shell -$ gpg --export-secret-keys -o secring.gpg #私钥文件妥善保管,后面配置需要 -``` - -### 2.准备分支 - -从主干分支拉取新分支作为发布分支,如现在要发布$`{release_version}`版本,则从develop分支拉出新分支`${release_version}-release`,此后`${release_version}` Release Candidates涉及的修改及打标签等都在`${release_version}-release`分支进行,最终发布完成后合入主干分支。 - -### 3.更新版本说明 - -更新官网项目的如下文件,并提交至master分支: - -https://github.com/apache/incubator-eventmesh-site/tree/master/events/release-notes - -### 4.配置根项目下gradle.properties文件 - -```shell -group=org.apache.eventmesh -version=1.2.0-release -#40位公钥的最后8位 -signing.keyId=579C25F5 -#生成密钥时填的passphrase -signing.password= -#导出的私钥文件secring.gpg路径 -signing.secretKeyRingFile=../secring.gpg -#apache 账号 -apacheUserName= -#apache 密码 -apachePassWord= -``` - -### 5.检查子模块下gradle.properties文件 - -```shell -group=org.apache.eventmesh -version=${release_version} -``` - -### 6.检查并配置根项目下build.gradle文件 - -```shell -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - artifact packageSources - artifact packageJavadoc - versionMapping { - usage('java-api') { - fromResolutionOf('runtimeClasspath') - } - usage('java-runtime') { - fromResolutionResult() - } - } - pom { - name = 'EventMesh' - description = 'Apache EventMesh' - url = 'https://github.com/apache/incubator-eventmesh' - licenses { - license { - name = 'The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id = 'Apache EventMesh(incubating)' - name = 'Apache EventMesh(incubating) of ASF' - url = 'https://eventmesh.apache.org/' - } - } - scm { - connection = 'scm:git:git@github.com:apache/incubator-eventmesh.git' - developerConnection = 'scm:git:git@github.com:apache/incubator-eventmesh.git' - url = 'https://github.com/apache/incubator-eventmesh' - } - } - } - } - repositories { - maven { - def releasesRepoUrl = 'https://repository.apache.org/service/local/staging/deploy/maven2/' - def snapshotsRepoUrl = 'https://repository.apache.org/content/repositories/snapshots/' - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username apacheUserName - password apachePassWord - } - - } - } -} - -signing { - sign publishing.publications.mavenJava -} -``` - -### 7.上传发布包 - -执行如下命令,需要对jar、源码包、doc和pom等文件签名加密 - -```shell -$ gradle signMavenJavaPublication publish -``` - -上述命令执行成功后,待发布版本会自动上传到Apache的临时筹备仓库(staging repository)。所有被deploy到远程[maven仓库](http://repository.apache.org/)的Artifacts都会处于staging状态,访问https://repository.apache.org/#stagingRepositories, 使用Apache的LDAP账户登录后,就会看到上传的版本,`Repository`列的内容即为${STAGING.REPOSITORY}。 点击`Close`来告诉Nexus这个构建已经完成,只有这样该版本才是可用的。 如果电子签名等出现问题,`Close`会失败,可以通过`Activity`查看失败信息。 - - - -## 发布Apache SVN仓库 - -### 1.准备svn本机环境(Apache使用svn托管项目的发布内容) - -### 2.checkout到本地目录 - -```shell -$ svn checkout https://dist.apache.org/repos/dist/dev/incubator/eventmesh/ -# 假定本地目录为 ~/apache/eventmesh -``` - -### 3.添加gpg公钥 - -添加public key到[KEYS](https://dist.apache.org/repos/dist/dev/incubator/eventmesh/KEYS)文件并提交到SVN仓库(第一次做发布的人需要做这个操作,具体操作参考KEYS文件里的说明)。KEYS主要是让参与投票的人在本地导入,用来校验sign的正确性 - -Windows - -```sh -$ gpg --list-sigs | out-file -append KEYS -encoding utf8 -$ gpg --armor --export | out-file -append KEYS -encoding utf8 -``` - -> Mac OS/Linux - -```sh -$ (gpg --list-sigs && gpg --armor --export ) >> KEYS -``` - -### 4.添加待发布内容到SVN目录 - -```shell -$ cd ~/apache/eventmesh # eventmesh svn根目录 -$ mkdir ${release_version}-${rc_version} -``` - -#### 4.1 创建tag - -在`${release_version}-release`分支上创建tag,需带有rc版本,为预发布版本 - -```shell -$ git tag -a v{$release_version}-{$rc_version} -m "Tagging the ${release_version} first Release Candidate (Candidates start at zero)" -$ git push origin --tags -``` - -#### 4.2 打包源码 - -检查项目源码命名,将源码命名为`apache-eventmesh-${release_version}-incubating-src`,将源码打包为tar.gz格式 - -```shell -$ tar -czvf apache-eventmesh-${release_version}-incubating-source.tar.gz apache-eventmesh-${release_version}-incubating-src -``` - -#### 4.3 打包二进制 - -> 编译上一步打包的源码 - -检查编译后的文件命名,将二进制文件命名为`apache-eventmesh-${release_version}-incubating` - -> 注:需将源码根目录下的`NOTICE`文件,`DISCLAIMER-WIP`文件以及`tools/third-party-licenses`目录下的`LICENSE`文件拷贝到二进制的包中 - -```shell -$ gradle clean jar dist && gradle installPlugin && gradle tar -x test -$ tar -czvf apache-eventmesh-${release_version}-incubating-bin.tar.gz apache-eventmesh-${release_version}-incubating -``` - -压缩source包、bin包,并将相关的压缩包拷贝到svn本地仓库下`/apache/eventmesh/${release_version}-${rc_version}` - -### 5.生成签名/sha512文件 - -> 针对源码包与二进制包生成签名/sha512文件 - -```shell -$ for i in *.tar.gz; do echo $i; gpg --print-md SHA512 $i > $i.sha512 ; done #计算sha512 -$ for i in *.tar.gz; do echo $i; gpg --armor --output $i.asc --detach-sig $i ; done #计算签名 -``` - -### 6.提交到Apache svn - -```shell -$ cd ~/apache/eventmesh # eventmesh svn根目录 -$ svn status -$ svn commit -m 'prepare for ${release_version}-${rc_version}' -``` - - - -## 验证Release Candidates - -详细检查列表请参考官方的[check list](https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist) - -从以下地址下载要发布的Release Candidates到本地环境: - -```shell -https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version}/ -``` - -然后开始验证环节,验证包含但不限于以下内容和形式 - -### 1.检查签名和hash等信息 - -> 由于操作系统不同,检查的命令或有差异,具体可参考[官方检查步骤](https://www.apache.org/info/verification.html) - -#### 1.1检查sha512哈希 - -> Mac OS/Linux - -```shell -$ shasum -a apache-eventmesh-${release_version}-incubating-source.tar.gz -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-source.tar.gz.sha512文件内容作对比 -$ shasum -a apache-eventmesh-${release_version}-incubating-bin.tar.gz -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-bin.tar.gz.sha512文件内容作对比 -``` - -> Windows - -```shell -$ certUtil -hashfile apache-eventmesh-${release_version}-incubating-source.tar.gz SHA512 -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-source.tar.gz.sha512文件内容作对比 -$ certUtil -hashfile apache-eventmesh-${release_version}-incubating-bin.tar.gz SHA512 -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-bin.tar.gz.sha512文件内容作对比 -``` - -#### 1.2检查gpg签名 - -首先导入发布人公钥。从svn仓库导入KEYS到本地环境。(发布版本的人不需要再导入,帮助做验证的人需要导入,用户名填发版人的即可) - -```shell -$ curl https://dist.apache.org/repos/dist/dev/incubator/eventmesh/KEYS >> KEYS -$ gpg --import KEYS -$ gpg --edit-key "${发布人的gpg用户名}" - > trust - -Please decide how far you trust this user to correctly verify other users' keys -(by looking at passports, checking fingerprints from different sources, etc.) - - 1 = I don't know or won't say - 2 = I do NOT trust - 3 = I trust marginally - 4 = I trust fully - 5 = I trust ultimately - m = back to the main menu - -Your decision? 5 - - > save -``` - -然后使用如下命令检查签名 - -```shell -$ gpg --verify apache-eventmesh-${release_version}-incubating-source.tar.gz.asc apache-eventmesh-${release_version}-incubating-source-tar.gz -$ gpg --verify apache-eventmesh-${release_version}-incubating-bin.tar.gz.asc apache-eventmesh-${release_version}-incubating-bin.tar.gz -``` - -### 2.检查源码包的文件内容 - -解压缩`apache-eventmesh-${release_version}-incubating-source-tar.gz`,进行如下检查: - -- 检查源码包是否包含由于包含不必要文件,致使tar包过于庞大 -- 文件夹包含单词`incubating` -- 存在`LICENSE`和`NOTICE`文件 -- 存在`DISCLAIMER`文件 -- `NOTICE`文件中的年份正确 -- 只存在文本文件,不存在二进制文件 -- 所有文件的开头都有ASF许可证 -- 能够正确编译,单元测试可以通过 (./gradle build) (目前支持JAVA 8/gradle 7.0/idea 2021.1.1及以上) -- 检查是否有多余文件或文件夹,例如空文件夹等 - -### 3.检查二进制包的文件内容 - -- 文件夹包含单词`incubating` -- 存在`LICENSE`和`NOTICE`文件 -- 存在`DISCLAIMER`文件 -- `NOTICE`文件中的年份正确 -- 所有文本文件开头都有ASF许可证 -- 检查第三方依赖许可证: - - 第三方依赖的许可证兼容 - - 所有第三方依赖的许可证都在`LICENSE`文件中声名 - - 依赖许可证的完整版全部在`license`目录 - - 如果依赖的是Apache许可证并且存在`NOTICE`文件,那么这些`NOTICE`文件也需要加入到版本的`NOTICE`文件中 - -你可以参考此文章:[ASF第三方许可证策](https://apache.org/legal/resolved.html) - -## 发起投票 - -> EventMesh 仍在孵化阶段,需要进行两次投票 - -- EventMesh社区投票,发送邮件至:`dev@eventmesh.apache.org` -- incubator社区投票,发送邮件至:`general@incubator.apache.org` EventMesh毕业后,只需要在EventMesh社区投票 - -### 1.EventMesh社区投票阶段 - -1. EventMesh社区投票,发起投票邮件到`dev@eventmesh.apache.org`。PMC需要先按照文档检查版本的正确性,然后再进行投票。 经过至少72小时并统计到3个`+1 PMC member`票后,即可进入下一阶段的投票。 -2. 宣布投票结果,发起投票结果邮件到`dev@eventmesh.apache.org`。 - -### 2.EventMesh社区投票模板 - -标题: - -``` -[VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -正文: - -``` -Hello EventMesh Community, - - This is a call for vote to release Apache EventMesh (incubating) version ${release_version}-${rc_version}. - - Release notes: - https://github.com/apache/incubator-eventmesh/releases/tag/v${release_version}-${rc_version} - - The release candidates: - https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version}/ - - Maven artifacts are available in a staging repository at: - https://repository.apache.org/content/repositories/orgapacheeventmesh-{staging-id} - - Git tag for the release: - https://github.com/apache/incubator-eventmesh/tree/v${release_version}-${rc_version} - - Keys to verify the Release Candidate: - https://downloads.apache.org/incubator/eventmesh/KEYS - - Hash for the release tag: - #hashCode of this release tag - - GPG user ID: - ${YOUR.GPG.USER.ID} - - The vote will be open for at least 72 hours or until necessary number of votes are reached. - - Please vote accordingly: - - [ ] +1 approve - - [ ] +0 no opinion - - [ ] -1 disapprove with the reason - - Checklist for reference: - - [ ] Download links are valid. - - [ ] Checksums and PGP signatures are valid. - - [ ] Source code distributions have correct names matching the current release. - - [ ] LICENSE and NOTICE files are correct for each EventMesh repo. - - [ ] All files have license headers if necessary. - - [ ] No compiled archives bundled in source archive. - - More detail checklist please refer: - https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist - -Thanks, -Your EventMesh Release Manager -``` - -### 3.宣布投票结果模板 - -标题: - -``` -[RESULT][VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -正文: - -``` -Hello Apache EventMesh PPMC and Community, - - The vote closes now as 72hr have passed. The vote PASSES with - - xx (+1 non-binding) votes from the PPMC, - xx (+1 binding) votes from the IPMC, - xx (+1 non-binding) votes from the rest of the developer community, - and no further 0 or -1 votes. - - The vote thread: {vote_mail_address} - - I will now bring the vote to general@incubator.apache.org to get approval by the IPMC. - If this vote passes also, the release is accepted and will be published. - -Thank you for your support. -Your EventMesh Release Manager -``` - -### 4.Incubator社区投票阶段 - -1. Incubator社区投票,发起投票邮件到`general@incubator.apache.org`,需3个 `+1 IPMC Member`投票,方可进入下一阶段。 -2. 宣布投票结果,发起投票结果邮件到`general@incubator.apache.org` 并抄送至`dev@eventmesh.apache.org`。 - -### 5.Incubator社区投票模板 - -标题: - -``` -[VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -内容: - -``` -Hello Incubator Community, - - This is a call for a vote to release Apache EventMesh(Incubating) version ${release_version} ${rc_version} - - The Apache EventMesh community has voted on and approved a proposal to release - Apache EventMesh(Incubating) version ${release_version} ${rc_version} - - We now kindly request the Incubator PMC members review and vote on this - incubator release. - - EventMesh community vote thread: - • [投票链接] - - Vote result thread: - • [投票结果链接] - - The release candidate: - •https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version}/ - - Git tag for the release: - • https://github.com/apache/incubator-eventmesh/tree/${release_version}-${rc_version} - Release notes: - • https://github.com/apache/incubator-eventmesh/releases/tag/${release_version}-${rc_version} - - The artifacts signed with PGP key [填写你个人的KEY], corresponding to [填写你个人的邮箱], that can be found in keys file: - • https://downloads.apache.org/incubator/eventmesh/KEYS - - The vote will be open for at least 72 hours or until necessary number of votes are reached. - - Please vote accordingly: - - [ ] +1 approve - [ ] +0 no opinion - [ ] -1 disapprove with the reason - -Thanks, -On behalf of Apache EventMesh(Incubating) community -``` - -### 6.宣布投票结果模板 - -标题: - -``` -[RESULT][VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -内容: - -``` -Hi all, - - Thanks for reviewing and voting for Apache EventMesh(Incubating) version ${release_version} ${rc_version} release, I am happy to announce the release voting has passed with [投票结果数] binding votes, no +0 or -1 votes. - - Binding votes are from IPMC - - xxx - - xxx - - xxx - - Non-binding votes: - +1 xxx - +0 xxx - -1 xxx - - The voting thread is: - • [投票结果链接] - - Many thanks for all our mentors helping us with the release procedure, and all IPMC helped us to review and vote for Apache EventMesh(Incubating) release. I will be working on publishing the artifacts soon. - -Thanks, -On behalf of Apache EventMesh(Incubating) community -``` - -## 正式发布 - -### 1.合并分支 - -合并`${release_version}-release`分支的改动到`master`分支,合并完成后删除`release`分支 - -```shell -$ git checkout master -$ git merge origin/${release_version}-release -$ git pull -$ git push origin master -$ git push --delete origin ${release_version}-release -$ git branch -d ${release_version}-release -``` - -### 2.迁移源码与二进制包 - -将源码和二进制包从svn的`dev`目录移动到`release`目录 - -```shell -$ svn mv https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version} https://dist.apache.org/repos/dist/release/incubator/eventmesh/ -m "transfer packages for ${release_version}-${rc_version}" #移动源码包与二进制包 -$ svn delete https://dist.apache.org/repos/dist/release/incubator/eventmesh/KEYS -m "delete KEYS" #清除原有release目录下的KEYS -$ svn cp https://dist.apache.org/repos/dist/dev/incubator/eventmesh/KEYS https://dist.apache.org/repos/dist/release/incubator/eventmesh/ -m "transfer KEYS for ${release_version}-${rc_version}" #拷贝dev目录KEYS到release目录 -``` - -### 3.确认dev和release下的包是否正确 - -- 确认[dev](https://dist.apache.org/repos/dist/dev/incubator/eventmesh/)下的`${release_version}-${rc_version}`已被删除 -- 删除[release](https://dist.apache.org/repos/dist/release/incubator/eventmesh/)目录下上一个版本的发布包,这些包会被自动保存在[这里](https://archive.apache.org/dist/incubator/eventmesh/) - -```shell -$ svn delete https://dist.apache.org/repos/dist/release/incubator/eventmesh/${last_release_version} -m "Delete ${last_release_version}" -``` - -### 4.在Apache Staging仓库发布版本 - -- 登录http://repository.apache.org , 使用Apache账号登录 -- 点击左侧的Staging repositories, -- 搜索EventMesh关键字,选择你最近上传的仓库,投票邮件中指定的仓库 -- 点击上方的`Release`按钮,这个过程会进行一系列检查 - -> 等仓库同步到其他数据源,一般需要24小时 - -### 5.GitHub版本发布 - -1.Tag the commit (on which the vote happened) with the release version without `-${RELEASE_CANDIDATE}`. 例如:after a successful vote on `v1.2-rc5`, the hash will be tagged again with `v1.2` only. - -2.在 [GitHub Releases](https://github.com/apache/incubator-eventmesh/releases) 页面的 `${release_version}` 版本上点击 `Edit` - -编辑版本号及版本说明,并点击 `Publish release` - -### 6.更新下载页面 - -等待并确认新的发布版本同步至 Apache 镜像后,更新如下页面: - -https://eventmesh.apache.org/download/ - -https://eventmesh.apache.org/zh/download/ - -GPG签名文件和哈希校验文件的下载连接应该使用这个前缀:`https://downloads.apache.org/incubator/eventmesh/` - -> 注意:项目下载链接应该使用 https://www.apache.org/dyn/closer.lua 而不是 closer.cgi 或者 mirrors.cgi - -### 7.邮件通知版本发布完成 - -> 请确保Apache Staging仓库已发布成功,一般是在该步骤的24小时后发布邮件 - -发邮件到 `dev@eventmesh.apache.org` 、 `announce@apache.org`和`general@incubator.apache.org` - -标题: - -``` -[ANNOUNCE] Apache EventMesh (incubating) ${release_version} available -``` - -正文: - -``` -Hi all, - -Apache EventMesh (incubating) Team is glad to announce the new release of Apache EventMesh (incubating) ${release_version}. - -Apache EventMesh (incubating) is a dynamic cloud-native eventing infrastructure 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. - -Download Links: https://eventmesh.apache.org/projects/eventmesh/download/ - -Release Notes: https://eventmesh.apache.org/events/release-notes/v${release_version}/ - -Website: https://eventmesh.apache.org/ - -EventMesh Resources: -- Issue: https://github.com/apache/incubator-eventmesh/issues -- Mailing list: dev@eventmesh.apache.org - - - -Apache EventMesh (incubating) Team -``` - diff --git a/docs/en/contribute/02-write-unit-test.md b/docs/en/contribute/02-write-unit-test.md deleted file mode 100644 index 0c48e46bc6..0000000000 --- a/docs/en/contribute/02-write-unit-test.md +++ /dev/null @@ -1,77 +0,0 @@ -# Unit Test Requirement - -- Each unit test case should use assertions instead of `System.out` output or `if` statement -- Each unit test case shouldn't call other cases or depend on the order of execution. -- Each unit test case should be repeatable and not depend on the external environment because the test might be executed in the continuous integration. -- The scope of each unit test should be small enough to help locate the problem at the method level. - -## Location and Naming Rules - -- The unit test should be placed in `src/test/java`. -- The unit test configuration file should be placed in `src/test/resources`. For example: - - Class to be tested: `src/main/java/org/apache/eventmesh/common/protocol/http/body/BaseResponseBody.java` - - Unit test: `src/test/java/org/apache/eventmesh/common/protocol/http/body/BaseResponseBodyTest.java` - - Unit test configuration: `src/test/resources/configuration.properties` -- The package name of the unit test class should be identical to the class to be tested. -- The name of the unit test class should be `{class or interface to be tested}Test`. For example: - - Class to be tested: `EventMeshUtil` - - Unit test class: `EventMeshUtilTest` -- The name of each test case should be `test{method name}`. For example: - - Method to be tested: `addProp(String key, String val)` - - Unit test case: `testAddProp` - -## Assertion Usage - -### Common Assertion - -| Methods | Instructions | -| :-------------- | :-------------- | -| `assertEquals` | Determines whether two objects or primitive types are equal | -| `assertNotEquals` | Determines whether two objects or primitive types are not equal | -| `assertTrue` | Determines whether the given Boolean value is `true` | -| `assertFalse` | Determines whether the given Boolean value is `false` | -| `assertNull` | Determines whether the given object reference is `null` | -| `assertNotNull` | Determines whether the given object reference is not `null` | -| `assertAll` | When multiple decision logic are processed together if only one error is reported, the whole test will fail | - -### Example - -#### `assertEquals()` - -```java -configuration.init(); -Assert.assertEquals("value1", configuration.eventMeshEnv); -``` - -#### `assertTrue()` - -```java -BaseResponseHeader header = BaseResponseHeader.buildHeader("200"); -Assert.assertTrue(header.toMap().containsKey(ProtocolKey.REQUEST_CODE)); -``` - -#### `assertFalse()` - -```java -Class nacosRegistryServiceClass = NacosRegistryService.class; -Field initStatus = nacosRegistryServiceClass.getDeclaredField("INIT_STATUS"); -initStatus.setAccessible(true); -Object initStatusField = initStatus.get(nacosRegistryService); -Assert.assertFalse((Boolean.parseBoolean(initStatusField.toString()))); -``` - -#### `assertNull()` - -```java -DefaultFullHttpResponse response = httpCommand.httpResponse(); -Assert.assertNull(response); -``` - -#### `assertNotNull()` - -```java -Codec.Decoder cd = new Codec.Decoder(); -ArrayList result = new ArrayList<>(); -cd.decode(null, buf, result); -Assert.assertNotNull(result.get(0)); -``` diff --git a/docs/en/contribute/03-new-contributor-guidelines.md b/docs/en/contribute/03-new-contributor-guidelines.md deleted file mode 100644 index 8c63375c35..0000000000 --- a/docs/en/contribute/03-new-contributor-guidelines.md +++ /dev/null @@ -1,145 +0,0 @@ - -# How to Contribution - -If you are a new contributor who wants to contribute to the eventmesh community, please read this document, which describes how to contribute to the community, and if you find any questions in the document, feel free to leave comments or suggestions. - -## Preparation - -### Development environment - -- You should have the JDK installed in your development environment. - -### Code Style - -Import [EventMesh CheckStyle](https://github.com/apache/incubator-eventmesh/blob/master/style/checkStyle.xml) file to your IDEA. - -For IDEA, you can import check style file by: -```shell - Editor -> Code Style -> Java -> Scheme -> Import Scheme -> CheckStyle Configuration -``` - -If you can't see CheckStyle Configuration section under Import Scheme, you can install CheckStyle-IDEA plugin first, and you will see it. - -You can also use `./gradlew check` to check the code style. -(Note: this command will check all file in project, when you submit a pr, the ci will only check the file has been changed in this pr). - -### Workflow - -Here are the workflow for contributors: - -1. Fork to your own - -2. Clone fork to local repository -```git -git clone git@github.com:yourgithub/incubator-eventmesh.git -``` - -3. Create a new branch and work on it -```git -git checkout -b fix_patch_xx -``` - -4. Keep your branch in sync -```git -git remote add upstream git@github.com:apache/incubator-eventmesh.git -git fetch upstream develop:upstream_develop -git rebase upstream_develop -``` - -5. Commit your changes (make sure your commit message concise) - -6. Push your commits to your forked repository - -7. Create a pull request - -## Explanation - -The original warehouse: https://github.com/apache/incubator-eventmesh The apache warehouse of eventmesh is called the original warehouse in the text. - -The Fork library: From https://github.com/apache/eventmesh fork to your own personal repository to become a fork library. - -So fork the original EventMesh repository into your own repository. - -## Development branch - -**The current development branch of eventmesh is Master. Please submit PR to this branch.** - -- We recommend that you create a new branch in your repository for development and submit the branch to the master branch of eventmesh. - -## Contribution Categories - -### Bug feedback or bug fixes - -- Whether it's a bug feedback or a fix, an issue needs to be created first to describe the bug in detail, so that the community can easily find and view the problem and code through the issue record. bug feedback issues usually need to contain a complete description of the bug information and reproducible scenarios. - -### Implementation of functions, refactoring - -- If you plan to implement a new feature (or refactoring), be sure to communicate with the eventmesh core development team via an Issue or other means, and describe the new feature (or refactoring), mechanism and scenario in detail during the communication process. - -### Documentation Improvement - -- You can find the eventmesh documentation at [evenmesh-docs](https://github.com/apache/incubator-eventmesh/tree/master/docs), and the documentation is supplemented or improved in a way that is also essential for eventmesh. - -## Contribution method - -There are two ways for new contributors to contribute to the eventmesh community: - -- If you find a bug in the eventmesh code that you want to fix, or if you provide a new feature for the eventmesh, submit an issue in the eventmesh and submit a pr to the eventmesh. - -- Other contributors in the eventmesh community have raised issues, the [`issue for first-time contributors`](https://github.com/apache/incubator-eventmesh/issues/888) sorted out by the community here are relatively simple PR, which can help you familiarize yourself with the process of making contributions to the eventmesh community. - -## Submit issue guidelines - -- If you don't know how to raise an issue on eventmesh, please read [about the issue](https://docs.github.com/cn/issues/tracking-your-work-with-issues/quickstart). - -- In the eventmesh community, there are issue templates that can be used for reference, if the type matches please use the template, if the issue template does not meet your requirements, you can open an empty issue template, for the issue please bring its matching feature labels. - -- For the name of the issue, please briefly describe your question or purpose in one sentence, and write in English for better global communication. - -## pull request (pr) submission guidelines - -- If you don't know how to initiate a pr for eventmesh, please see [about pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). - -- Whether it's a bug fix, or a new feature development (if this pr is a new feature development, then documentation updates about the new feature should be included in this pr), please submit a PR to the current development branch master. - -- The pr submission should follow the template provided by eventmesh as well as the need to write the submission information, a brief description of what the pr you are submitting does is sufficient, please see the [template for details](https://github.com/apache/incubator-eventmesh/blob/master/.github/PULL_REQUEST_TEMPLATE.md). - -- The pr you submit needs to be associated with the issue you are fixing, or the issue you are raising,so your PR title should start with [ISSUE #xx]. - -- If your change is about a typo or small optimize, you needn't create an Issue, just submit a PR and title with [MINOR]. - -**Note:** - - - A single pull request should not be too large. If heavy changes are required, it's better to separate the changes to a few individual PRs. - - - After creating a PR, one or more committers will help to review the pull request, after approve, this PR will be merged in to eventmesh repository, and the related Issue will be closed. - -## review - -### PR review - -All code should be well reviewed by one or more committers. Some principles: - -- Readability: Important code should be well-documented. Comply with our [code style](https://github.com/apache/incubator-eventmesh/blob/master/style/checkStyle.xml). - -- Elegance: New functions, classes or components should be well-designed. - -- Testability: Important code should be well-tested (high unit test coverage). - -### License review - -EventMesh follows [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) policy. All source files should -have the Apache License header added to the file header. EventMesh uses the [apache/skywalking-eyes](https://github.com/apache/skywalking-eyes) to check -the source file header. - -### PR merge - -After a PR is approved by at least one committer, it can be merged. Before the merge, the committer can make changes to the commits message, requiring the commits -message to be clear without duplication, and use Squash and Merge to make sure one PR should only contain one commits. -For large multi-person PR, use Merge to merge, and fix the commits by rebase before merging. - -## Community - -### Contact us - -Mail: dev@eventmesh.apache.org \ No newline at end of file diff --git a/docs/en/contribute/_category_.json b/docs/en/contribute/_category_.json deleted file mode 100644 index 56d36f918e..0000000000 --- a/docs/en/contribute/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 5, - "label": "Contribute", - "collapsed": false -} diff --git a/docs/en/design-document/01-workflow.md b/docs/en/design-document/01-workflow.md index fecae1ee66..1adc258c07 100644 --- a/docs/en/design-document/01-workflow.md +++ b/docs/en/design-document/01-workflow.md @@ -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/getting-started) +See AsyncAPI detail in the [official site](https://www.asyncapi.com/docs/guides) ### Workflow Example diff --git a/docs/en/design-document/02-runtime-protocol.md b/docs/en/design-document/02-runtime-protocol.md index 1583e2fda0..b992bf896b 100644 --- a/docs/en/design-document/02-runtime-protocol.md +++ b/docs/en/design-document/02-runtime-protocol.md @@ -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/incubator-eventmesh/blob/master/eventmesh-protocol-plugin/eventmesh-protocol-grpc/src/main/proto/eventmesh-client.proto) of the Evenmesh 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/docs/en/design-document/04-schema-registry.md b/docs/en/design-document/04-schema-registry.md index 2cab152651..5c0b65f98e 100644 --- a/docs/en/design-document/04-schema-registry.md +++ b/docs/en/design-document/04-schema-registry.md @@ -43,7 +43,7 @@ OpenSchema[[5]](#References) proposes a specification for data schema when excha ### Process of Transferring Messages under Schema Registry -![Process](.././images/design-document/schema-registry-process.jpg) +![Process](../../images/design-document/schema-registry-process.jpg) The highlevel process of messages transmission contains 10 steps as follows: diff --git a/docs/en/design-document/09-event-bridge.md b/docs/en/design-document/09-event-bridge.md index b74b78e015..36a09b1488 100644 --- a/docs/en/design-document/09-event-bridge.md +++ b/docs/en/design-document/09-event-bridge.md @@ -153,4 +153,4 @@ Event Bridge 可以支持跨mesh集群的消息投递,下面展示这一功能 "TEST-TOPIC-HTTP-ASYNC" ] } -``` \ No newline at end of file +``` diff --git a/docs/en/design-document/13-jaeger.md b/docs/en/design-document/13-jaeger.md new file mode 100644 index 0000000000..e9452c3554 --- /dev/null +++ b/docs/en/design-document/13-jaeger.md @@ -0,0 +1,44 @@ +# Collect Trace with Jaeger + +## Jaeger + +[Jaeger](https://www.jaegertracing.io/), inspired by [Dapper](https://research.google.com/pubs/pub36356.html) and [OpenZipkin](https://zipkin.io/), is a distributed tracing platform created by [Uber Technologies](https://uber.github.io/) and donated to [Cloud Native Computing Foundation](https://cncf.io/). It can be used for monitoring microservices-based distributed systems. + +For the installation of Jaeger, you can refer to the [official documentation](https://www.jaegertracing.io/docs/latest/getting-started/) of Jaeger. It is recommended to use docker image `jaegertracing/all-in-one` to quickly build the environment for testing. + +## Configuration + +To enable the trace exporter of EventMesh Runtime, set the `eventMesh.server.trace.enabled` field in the `conf/eventmesh.properties` file to `true`. + +```conf +# Trace plugin +eventMesh.server.trace.enabled=true +eventMesh.trace.plugin=jaeger +``` + +To customize the behavior of the trace exporter such as timeout or export interval, edit the `exporter.properties` file. + +```conf +# Set the maximum batch size to use +eventmesh.trace.max.export.size=512 +# Set the queue size. This must be >= the export batch size +eventmesh.trace.max.queue.size=2048 +# Set the max amount of time an export can run before getting(TimeUnit=SECONDS) +eventmesh.trace.export.timeout=30 +# Set time between two different exports (TimeUnit=SECONDS) +eventmesh.trace.export.interval=5 +``` + +To send the exported trace data to Jaeger, edit the `eventmesh.trace.jaeger.ip` and `eventmesh.trace.jaeger.port` fields in the `conf/jaeger.properties` file to match the configuration of the Jaeger server. + +```conf +# Jaeger's IP and Port +eventmesh.trace.jaeger.ip=localhost +eventmesh.trace.jaeger.port=14250 +``` + +## Migrating from Zipkin + +Collector service exposes Zipkin compatible REST API `/api/v1/spans` which accepts both Thrift and JSON. Also there is `/api/v2/spans` for JSON and Proto. + +So you can also use the `eventmesh-trace-zipkin` plugin to collect trace with Jaeger. Please refer to the `eventmesh-trace-zipkin` documentation for the specific configuration. By default this feature in Jaeger is disabled. It can be enabled with `--collector.zipkin.host-port=:9411`. \ No newline at end of file diff --git a/docs/en/design-document/14-webhook.md b/docs/en/design-document/14-webhook.md new file mode 100644 index 0000000000..c726e73b6c --- /dev/null +++ b/docs/en/design-document/14-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 + +![](../../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: 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/docs/en/instruction/01-store-with-docker.md b/docs/en/instruction/01-store-with-docker.md index e772db60b5..ea20975204 100644 --- a/docs/en/instruction/01-store-with-docker.md +++ b/docs/en/instruction/01-store-with-docker.md @@ -10,62 +10,29 @@ 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. ``` - -## 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](docs/en/instruction/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 +#Get RocketMQ image +sudo docker pull apache/rocketmq:4.9.4 ``` 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 +#Run namerv container +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容器 -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 +#Run broker container +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 ``` 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](docs/en/instruction/02-runtime-with-docker.md) - +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/docs/en/instruction/01-store.md b/docs/en/instruction/01-store.md index d5b5eb9c19..f409d6522c 100644 --- a/docs/en/instruction/01-store.md +++ b/docs/en/instruction/01-store.md @@ -2,7 +2,7 @@ ## Dependencies -``` +```text 64-bit OS,we recommend Linux/Unix; 64-bit JDK 1.8+; Gradle 7.0+, we recommend 7.0.* @@ -10,7 +10,6 @@ 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. ``` - ## 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. @@ -20,25 +19,24 @@ unzip rocketmq-all-4.9.2-bin-release.zip cd rocketmq-4.9.2/ ``` - ## Deploy -- #### Start Name Server +### Start Name Server -``` +```console nohup sh bin/mqnamesrv & tail -f ~/logs/rocketmqlogs/namesrv.log ``` -- #### 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](docs/en/instruction/02-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 + +For more details about RocketMQ, please refer to diff --git a/docs/en/instruction/02-runtime-with-docker.md b/docs/en/instruction/02-runtime-with-docker.md index 7da3e2a433..31e5c29c95 100644 --- a/docs/en/instruction/02-runtime-with-docker.md +++ b/docs/en/instruction/02-runtime-with-docker.md @@ -2,8 +2,8 @@ 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. - ## Dependencies + ``` 64-bit OS,we recommend Linux/Unix; 64-bit JDK 1.8+; @@ -17,7 +17,7 @@ If you choose standalone mode, you could skip this file and go to the next step: 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`: @@ -104,4 +104,3 @@ sudo docker stop [container id or name] sudo docker rm -f [container id or name] ``` - diff --git a/docs/en/instruction/02-runtime.md b/docs/en/instruction/02-runtime.md index 900f86864a..3f398d8af8 100644 --- a/docs/en/instruction/02-runtime.md +++ b/docs/en/instruction/02-runtime.md @@ -1,11 +1,10 @@ # 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+. +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 Run on your local machine ### 1.1 Dependencies @@ -70,8 +69,8 @@ dependencies { gradle installPlugin ``` - ## 2 Remote deployment + ### 2.1 Dependencies ``` @@ -83,15 +82,17 @@ If you choose standalone mode, you could skip this file and go to the next step: ``` ### 2.2 Download + Download and extract the executable binaries of the latest release from [EventMesh download](https://eventmesh.apache.org/download). ```console -wget https://github.com/apache/incubator-eventmesh/releases/download/v1.4.0/apache-eventmesh-1.4.0-incubating-bin.tar.gz +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 @@ -104,4 +105,3 @@ Execute the `start.sh` script to start the EventMesh Runtime server. ```console bash bin/start.sh ``` - diff --git a/docs/en/instruction/03-demo.md b/docs/en/instruction/03-demo.md index 8545e05fb7..28e2e17e65 100644 --- a/docs/en/instruction/03-demo.md +++ b/docs/en/instruction/03-demo.md @@ -6,7 +6,7 @@ > > EventMesh-sdk-java support both async and broadcast. > -> EventMesh-sdk-java support HTT, TCP and gRPC. +> EventMesh-sdk-java support HTTP, TCP and gRPC. The test demos of TCP, HTTP 和 GRPC are in the module **eventmesh-examples** @@ -40,7 +40,7 @@ Run the main method of org.apache.eventmesh.tcp.demo.sub.eventmeshmessage.AsyncS Run the main method of org.apache.eventmesh.tcp.demo.pub.eventmeshmessage.AsyncPublishBroadcast ``` -More information about EventMesh-TCP, please refer to [EventMesh TCP](docs/zh/sdk-java/03-tcp.md) +More information about EventMesh-TCP, please refer to [EventMesh TCP](/docs/en/sdk-java/03-tcp.md) ## 2 HTTP DEMO @@ -48,7 +48,7 @@ More information about EventMesh-TCP, please refer to [EventMesh TCP](docs/zh/sd ### 2.1 ASYNC -- The subscriber is a SpringBoot demo, so run this demo to start subscriber (we have created the topic TEST-TOPIC-HTTP-ASYNCT by default, you can also create other topic to test) +- 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) ``` Run the main method of org.apache.eventmesh.http.demo.sub.SpringBootDemoApplication @@ -59,11 +59,11 @@ Run the main method of org.apache.eventmesh.http.demo.sub.SpringBootDemoApplicat ``` Run the main method of org.apache.eventmesh.http.demo.pub.eventmeshmessage.AsyncPublishInstance ``` -More information about EventMesh-HTTP, please refer to [EventMesh HTTP](docs/zh/sdk-java/02-http.md) +More information about EventMesh-HTTP, please refer to [EventMesh HTTP](/docs/en/sdk-java/02-http.md) ## 3 GRPC DEMO -### 3.1 ASYNC PUBLISH & WEBHOOK SUBSCRIBE +### 3.1 ASYNC PUBLISH & WEBHOOK SUBSCRIBE - Start publisher to publish message (we have created the topic TEST-TOPIC-GRPC-ASYNC by default, you can also create other topic to test) @@ -88,7 +88,7 @@ Run the main method of org.apache.eventmesh.grpc.pub.eventmeshmessage.RequestRep - Start stream subscriber ``` -Run the main method of org.apache.eventmesh.grpc.sub.EventmeshAsyncSubscribe +Run the main method of org.apache.eventmesh.grpc.sub.EventMeshAsyncSubscribe ``` ### 3.3 PUBLISH BATCH MESSAGE @@ -99,11 +99,11 @@ Run the main method of org.apache.eventmesh.grpc.sub.EventmeshAsyncSubscribe Run the main method of org.apache.eventmesh.grpc.pub.eventmeshmessage.BatchPublishInstance ``` -More information about EventMesh-gRPC, please refer to [EventMesh gRPC](docs/zh/sdk-java/04-grpc.md) +More information about EventMesh-gRPC, please refer to [EventMesh gRPC](/docs/en/sdk-java/04-grpc.md) ## 4 Run these demos by yourself -Please refer to [EventMesh Store](docs/zh/instruction/01-store.md) and [EventMesh Runtime](docs/zh/instruction/02-runtime.md) to finish the necessary deployment before try our demo +Please refer to [EventMesh Store](/docs/en/instruction/01-store.md) and [EventMesh Runtime](/docs/en/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`: diff --git a/docs/en/roadmap.md b/docs/en/roadmap.md index 0f36cc2b5b..193c1be620 100644 --- a/docs/en/roadmap.md +++ b/docs/en/roadmap.md @@ -29,21 +29,21 @@ The development roadmap of Apache EventMesh (Incubating) is an overview of the p | **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) | -| **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** | 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** | Rust SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/815) | -| **In Progress** | Filter Chain | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/664) | +| **Implemented in 1.7.0** | 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** | Support Pravega as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/270) | +| **Implemented in 1.7.0** | Support Kafka as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/676) | +| **Implemented in 1.7.0** | Support Pulsar as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/676) | +| **Implemented in 1.7.0** | Support CNCF Serverless Workflow| [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0** | Support Redis | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0** | Provide Rust SDK | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/815) | +| **Implemented in 1.7.0** | Support Zookeeper | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| **Implemented in 1.7.0** | Support RabbitMQ as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/1553) | +| **Implemented in 1.8.0** | Provide Dashboard | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/700), [GSoC '22](https://issues.apache.org/jira/browse/COMDEV-465) +| **In Progress** | Filter and transform | [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) | -| **In Progress** | Support Pravega as EventStore | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/270) | -| Planned | Support Dledger | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | -| Planned | Support Zookeeper | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/417) | +| Planned | Transaction Event | [GitHub Issue](https://github.com/apache/incubator-eventmesh/issues/697) | | 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/docs/en/sdk-java/intro.md b/docs/en/sdk-java/01-intro.md similarity index 100% rename from docs/en/sdk-java/intro.md rename to docs/en/sdk-java/01-intro.md diff --git a/docs/en/upgrade-guide/01-upgrade-guide.md b/docs/en/upgrade-guide/01-upgrade-guide.md new file mode 100644 index 0000000000..e300cdf57e --- /dev/null +++ b/docs/en/upgrade-guide/01-upgrade-guide.md @@ -0,0 +1,15 @@ +# 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/docs/en/upgrade-guide/_category_.json b/docs/en/upgrade-guide/_category_.json new file mode 100644 index 0000000000..af764643e9 --- /dev/null +++ b/docs/en/upgrade-guide/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 7, + "label": "Upgrade Guide", + "collapsed": false +} diff --git a/docs/images/contribute/checkstyle01.png b/docs/images/contribute/checkstyle01.png new file mode 100644 index 0000000000..84ceb3fab5 Binary files /dev/null and b/docs/images/contribute/checkstyle01.png differ diff --git a/docs/images/contribute/checkstyle02.png b/docs/images/contribute/checkstyle02.png new file mode 100644 index 0000000000..fb3a2e7764 Binary files /dev/null and b/docs/images/contribute/checkstyle02.png differ diff --git a/docs/images/contribute/checkstyle03.png b/docs/images/contribute/checkstyle03.png new file mode 100644 index 0000000000..e3cd16717a Binary files /dev/null and b/docs/images/contribute/checkstyle03.png differ diff --git a/docs/images/contribute/checkstyle04.png b/docs/images/contribute/checkstyle04.png new file mode 100644 index 0000000000..87723c9717 Binary files /dev/null and b/docs/images/contribute/checkstyle04.png differ diff --git a/docs/images/contribute/checkstyle05.png b/docs/images/contribute/checkstyle05.png new file mode 100644 index 0000000000..f8c6ec2812 Binary files /dev/null and b/docs/images/contribute/checkstyle05.png differ diff --git a/docs/images/contribute/checkstyle06.png b/docs/images/contribute/checkstyle06.png new file mode 100644 index 0000000000..cbfbf320a3 Binary files /dev/null and b/docs/images/contribute/checkstyle06.png differ diff --git a/docs/images/contribute/zh/contribute01.png b/docs/images/contribute/zh/contribute01.png new file mode 100644 index 0000000000..3e26d1c2e1 Binary files /dev/null and b/docs/images/contribute/zh/contribute01.png differ diff --git a/docs/images/contribute/zh/contribute02.png b/docs/images/contribute/zh/contribute02.png new file mode 100644 index 0000000000..0fdb57a96f Binary files /dev/null and b/docs/images/contribute/zh/contribute02.png differ diff --git a/docs/images/contribute/zh/contribute03.png b/docs/images/contribute/zh/contribute03.png new file mode 100644 index 0000000000..25feb79450 Binary files /dev/null and b/docs/images/contribute/zh/contribute03.png differ diff --git a/docs/images/contribute/zh/contribute04.png b/docs/images/contribute/zh/contribute04.png new file mode 100644 index 0000000000..fd7fe75938 Binary files /dev/null and b/docs/images/contribute/zh/contribute04.png differ diff --git a/docs/images/contribute/zh/contribute05.png b/docs/images/contribute/zh/contribute05.png new file mode 100644 index 0000000000..ea3f37840f Binary files /dev/null and b/docs/images/contribute/zh/contribute05.png differ diff --git a/docs/images/contribute/zh/contribute06.png b/docs/images/contribute/zh/contribute06.png new file mode 100644 index 0000000000..77a5711700 Binary files /dev/null and b/docs/images/contribute/zh/contribute06.png differ diff --git a/docs/images/contribute/zh/contribute07.png b/docs/images/contribute/zh/contribute07.png new file mode 100644 index 0000000000..1fe3218a39 Binary files /dev/null and b/docs/images/contribute/zh/contribute07.png differ diff --git a/docs/images/contribute/zh/contribute08.png b/docs/images/contribute/zh/contribute08.png new file mode 100644 index 0000000000..735e45b7c9 Binary files /dev/null and b/docs/images/contribute/zh/contribute08.png differ diff --git a/docs/images/contribute/zh/contribute09.png b/docs/images/contribute/zh/contribute09.png new file mode 100644 index 0000000000..76532380ca Binary files /dev/null and b/docs/images/contribute/zh/contribute09.png differ diff --git a/docs/images/contribute/zh/contribute10.png b/docs/images/contribute/zh/contribute10.png new file mode 100644 index 0000000000..446c788b8a Binary files /dev/null and b/docs/images/contribute/zh/contribute10.png differ diff --git a/docs/images/contribute/zh/contribute11.png b/docs/images/contribute/zh/contribute11.png new file mode 100644 index 0000000000..45677c587c Binary files /dev/null and b/docs/images/contribute/zh/contribute11.png differ diff --git a/docs/images/contribute/zh/contribute12.png b/docs/images/contribute/zh/contribute12.png new file mode 100644 index 0000000000..dee6656c7d Binary files /dev/null and b/docs/images/contribute/zh/contribute12.png differ diff --git a/docs/images/contribute/zh/contribute13.png b/docs/images/contribute/zh/contribute13.png new file mode 100644 index 0000000000..bacf42e15b Binary files /dev/null and b/docs/images/contribute/zh/contribute13.png differ diff --git a/docs/images/contribute/zh/contribute14.png b/docs/images/contribute/zh/contribute14.png new file mode 100644 index 0000000000..2abb07c82e Binary files /dev/null and b/docs/images/contribute/zh/contribute14.png differ diff --git a/docs/images/contribute/zh/contribute15.png b/docs/images/contribute/zh/contribute15.png new file mode 100644 index 0000000000..bb439af584 Binary files /dev/null and b/docs/images/contribute/zh/contribute15.png differ diff --git a/docs/images/contribute/zh/contribute16.png b/docs/images/contribute/zh/contribute16.png new file mode 100644 index 0000000000..cc9d653eb8 Binary files /dev/null and b/docs/images/contribute/zh/contribute16.png differ diff --git a/docs/images/contribute/zh/contribute17.png b/docs/images/contribute/zh/contribute17.png new file mode 100644 index 0000000000..85683c4832 Binary files /dev/null and b/docs/images/contribute/zh/contribute17.png differ diff --git a/docs/images/dashboard.png b/docs/images/dashboard.png new file mode 100644 index 0000000000..7b90d139ba Binary files /dev/null and b/docs/images/dashboard.png differ diff --git a/docs/images/eventmesh-architecture-2.png b/docs/images/eventmesh-architecture-2.png new file mode 100644 index 0000000000..7accab6157 Binary files /dev/null and b/docs/images/eventmesh-architecture-2.png differ diff --git a/docs/zh/contribute/01-release.md b/docs/zh/contribute/01-release.md deleted file mode 100644 index 0810a75772..0000000000 --- a/docs/zh/contribute/01-release.md +++ /dev/null @@ -1,731 +0,0 @@ -# Release Creation Process - -:::caution -The documentation of Release Creation Process is WIP (Work-in-Progress). -::: - -## 理解 Apache 发布的内容和流程 - -Source Release 是 Apache 关注的重点,也是发布的必须内容;而 Binary Release 是可选项, - -请参考以下链接,找到更多关于 ASF 的发布指南: - -- [Apache Release Guide](http://www.apache.org/dev/release-publishing) -- [Apache Release Policy](http://www.apache.org/dev/release.html) -- [Maven Release Info](http://www.apache.org/dev/publishing-maven-artifacts.html) - - -## 本地构建环境准备 - -主要包括签名工具、Maven 仓库认证相关准备 - -### 1.安装GPG - -在[GnuPG官网](https://www.gnupg.org/download/index.html)下载安装包。GnuPG的1.x版本和2.x版本的命令有细微差别,下列说明以**GnuPG-2.x**版本为例 - -```sh -$ gpg --version #检查版本,应该为2.x -``` - -### 2.用gpg生成key - -根据提示,生成 key - -> 注意:请使用Apache邮箱生成GPG的Key - -```shell -$ gpg --full-gen-key -gpg (GnuPG) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc. -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -Please select what kind of key you want: - (1) RSA and RSA (default) - (2) DSA and Elgamal - (3) DSA (sign only) - (4) RSA (sign only) -Your selection? 1 -RSA keys may be between 1024 and 4096 bits long. -What keysize do you want? (2048) 4096 -Requested keysize is 4096 bits -Please specify how long the key should be valid. - 0 = key does not expire - = key expires in n days - w = key expires in n weeks - m = key expires in n months - y = key expires in n years -Key is valid for? (0) -Key does not expire at all -Is this correct? (y/N) y - -GnuPG needs to construct a user ID to identify your key. - -Real name: ${输入用户名} -Email address: ${邮箱地址} -Comment: CODE SIGNING KEY -You selected this USER-ID: - "${输入用户名} (CODE SIGNING KEY) <${邮箱地址}>" - -Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O -You need a Passphrase to protect your secret key. # 填入密码,以后打包过程中会经常用到 -``` - -### 3.查看 key - -```shell -$ gpg --list-keys -pub rsa4096/579C25F5 2021-04-26 # 579C25F5就是key id -uid [ultimate] ${输入用户名} <${邮箱地址}> -sub rsa4096 2021-04-26 - -# 通过key id发送public key到keyserver -$ gpg --keyserver pgpkeys.mit.edu --send-key 579C25F5 -# 其中,pgpkeys.mit.edu为随意挑选的keyserver,keyserver列表为:https://sks-keyservers.net/status/,相互之间是自动同步的,选任意一个都可以。 -$ gpg --keyserver hkp://pgpkeys.mit.edu --recv-keys 579C25F5 # 验证是否同步到公网,网络不好可能需多试几次 -``` - -**注:如果有多个 public key,设置默认 key。**修改`~/.gnupg/gpg.conf` - -```sh -# If you have more than 1 secret key in your keyring, you may want to -# uncomment the following option and set your preferred keyid. -default-key 28681CB1 -``` - -**如果有多个 public key, 也可以删除无用的 key:** - -```shell -$ gpg --delete-secret-keys 29BBC3CB # 先删除私钥,指明key id -gpg (GnuPG) 2.2.27; Copyright (C) 2021 g10 Code GmbH -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - -sec rsa4096/EE8DAE7D29BBC3CB 2021-04-27 mikexue - -Delete this key from the keyring? (y/N) y -This is a secret key! - really delete? (y/N) y -``` - -```shell -$ gpg --delete-keys 29BBC3CB # 删除公钥,指明key id -gpg (GnuPG) 2.2.27; Copyright (C) 2021 g10 Code GmbH -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. - - -pub rsa4096/EE8DAE7D29BBC3CB 2021-04-27 mikexue - -Delete this key from the keyring? (y/N) y -``` - -由于公钥服务器没有检查机制,任何人都可以用你的名义上传公钥,所以没有办法保证服务器上的公钥的可靠性。 通常,你可以在网站上公布一个公钥指纹,让其他人核对下载到的公钥是否为真。 - -```shell -# fingerprint参数生成公钥指纹: -$gpg --fingerprint mikexue -pub rsa4096 2021-04-26 [SCA] - F84A 0041 D70B 37AF 9C7B F0B3 39F4 29D7 579C 25F5 -uid [ultimate] mikexue -sub rsa4096 2021-04-26 [E] -``` - -登录 [https://id.apache.org](https://id.apache.org/), 将上面的 fingerprint (即 F84A 0041 D70B 37AF 9C7B F0B3 39F4 29D7 579C 25F5) 粘贴到自己的用户信息中 OpenPGP Public Key Primary Fingerprint - - - -## 发布Apache Maven仓库 - -> 注:EventMesh使用Gradle构建,需修改gradle相关配置 - -### 1.导出私钥文件 - -```shell -$ gpg --export-secret-keys -o secring.gpg #私钥文件妥善保管,后面配置需要 -``` - -### 2.准备分支 - -从主干分支拉取新分支作为发布分支,如现在要发布$`{release_version}`版本,则从develop分支拉出新分支`${release_version}-release`,此后`${release_version}` Release Candidates涉及的修改及打标签等都在`${release_version}-release`分支进行,最终发布完成后合入主干分支。 - -### 3.更新版本说明 - -更新官网项目的如下文件,并提交至master分支: - -https://github.com/apache/incubator-eventmesh-site/tree/master/events/release-notes - -### 4.配置根项目下gradle.properties文件 - -```shell -group=org.apache.eventmesh -version=1.2.0-release -#40位公钥的最后8位 -signing.keyId=579C25F5 -#生成密钥时填的passphrase -signing.password= -#导出的私钥文件secring.gpg路径 -signing.secretKeyRingFile=../secring.gpg -#apache 账号 -apacheUserName= -#apache 密码 -apachePassWord= -``` - -### 5.检查子模块下gradle.properties文件 - -```shell -group=org.apache.eventmesh -version=${release_version} -``` - -### 6.检查并配置根项目下build.gradle文件 - -```shell -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - artifact packageSources - artifact packageJavadoc - versionMapping { - usage('java-api') { - fromResolutionOf('runtimeClasspath') - } - usage('java-runtime') { - fromResolutionResult() - } - } - pom { - name = 'EventMesh' - description = 'Apache EventMesh' - url = 'https://github.com/apache/incubator-eventmesh' - licenses { - license { - name = 'The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id = 'Apache EventMesh(incubating)' - name = 'Apache EventMesh(incubating) of ASF' - url = 'https://eventmesh.apache.org/' - } - } - scm { - connection = 'scm:git:git@github.com:apache/incubator-eventmesh.git' - developerConnection = 'scm:git:git@github.com:apache/incubator-eventmesh.git' - url = 'https://github.com/apache/incubator-eventmesh' - } - } - } - } - repositories { - maven { - def releasesRepoUrl = 'https://repository.apache.org/service/local/staging/deploy/maven2/' - def snapshotsRepoUrl = 'https://repository.apache.org/content/repositories/snapshots/' - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username apacheUserName - password apachePassWord - } - - } - } -} - -signing { - sign publishing.publications.mavenJava -} -``` - -### 7.上传发布包 - -执行如下命令,需要对jar、源码包、doc和pom等文件签名加密 - -```shell -$ gradle signMavenJavaPublication publish -``` - -上述命令执行成功后,待发布版本会自动上传到Apache的临时筹备仓库(staging repository)。所有被deploy到远程[maven仓库](http://repository.apache.org/)的Artifacts都会处于staging状态,访问https://repository.apache.org/#stagingRepositories, 使用Apache的LDAP账户登录后,就会看到上传的版本,`Repository`列的内容即为${STAGING.REPOSITORY}。 点击`Close`来告诉Nexus这个构建已经完成,只有这样该版本才是可用的。 如果电子签名等出现问题,`Close`会失败,可以通过`Activity`查看失败信息。 - - - -## 发布Apache SVN仓库 - -### 1.准备svn本机环境(Apache使用svn托管项目的发布内容) - -### 2.checkout到本地目录 - -```shell -$ svn checkout https://dist.apache.org/repos/dist/dev/incubator/eventmesh/ -# 假定本地目录为 ~/apache/eventmesh -``` - -### 3.添加gpg公钥 - -添加public key到[KEYS](https://dist.apache.org/repos/dist/dev/incubator/eventmesh/KEYS)文件并提交到SVN仓库(第一次做发布的人需要做这个操作,具体操作参考KEYS文件里的说明)。KEYS主要是让参与投票的人在本地导入,用来校验sign的正确性 - -Windows - -```sh -$ gpg --list-sigs | out-file -append KEYS -encoding utf8 -$ gpg --armor --export | out-file -append KEYS -encoding utf8 -``` - -> Mac OS/Linux - -```sh -$ (gpg --list-sigs && gpg --armor --export ) >> KEYS -``` - -### 4.添加待发布内容到SVN目录 - -```shell -$ cd ~/apache/eventmesh # eventmesh svn根目录 -$ mkdir ${release_version}-${rc_version} -``` - -#### 4.1 创建tag - -在`${release_version}-release`分支上创建tag,需带有rc版本,为预发布版本 - -```shell -$ git tag -a v{$release_version}-{$rc_version} -m "Tagging the ${release_version} first Release Candidate (Candidates start at zero)" -$ git push origin --tags -``` - -#### 4.2 打包源码 - -检查项目源码命名,将源码命名为`apache-eventmesh-${release_version}-incubating-src`,将源码打包为tar.gz格式 - -```shell -$ tar -czvf apache-eventmesh-${release_version}-incubating-source.tar.gz apache-eventmesh-${release_version}-incubating-src -``` - -#### 4.3 打包二进制 - -> 编译上一步打包的源码 - -检查编译后的文件命名,将二进制文件命名为`apache-eventmesh-${release_version}-incubating` - -> 注:需将源码根目录下的`NOTICE`文件,`DISCLAIMER-WIP`文件以及`tools/third-party-licenses`目录下的`LICENSE`文件拷贝到二进制的包中 - -```shell -$ gradle clean jar dist && gradle installPlugin && gradle tar -x test -$ tar -czvf apache-eventmesh-${release_version}-incubating-bin.tar.gz apache-eventmesh-${release_version}-incubating -``` - -压缩source包、bin包,并将相关的压缩包拷贝到svn本地仓库下`/apache/eventmesh/${release_version}-${rc_version}` - -### 5.生成签名/sha512文件 - -> 针对源码包与二进制包生成签名/sha512文件 - -```shell -$ for i in *.tar.gz; do echo $i; gpg --print-md SHA512 $i > $i.sha512 ; done #计算sha512 -$ for i in *.tar.gz; do echo $i; gpg --armor --output $i.asc --detach-sig $i ; done #计算签名 -``` - -### 6.提交到Apache svn - -```shell -$ cd ~/apache/eventmesh # eventmesh svn根目录 -$ svn status -$ svn commit -m 'prepare for ${release_version}-${rc_version}' -``` - - - -## 验证Release Candidates - -详细检查列表请参考官方的[check list](https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist) - -从以下地址下载要发布的Release Candidates到本地环境: - -```shell -https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version}/ -``` - -然后开始验证环节,验证包含但不限于以下内容和形式 - -### 1.检查签名和hash等信息 - -> 由于操作系统不同,检查的命令或有差异,具体可参考[官方检查步骤](https://www.apache.org/info/verification.html) - -#### 1.1检查sha512哈希 - -> Mac OS/Linux - -```shell -$ shasum -a apache-eventmesh-${release_version}-incubating-source.tar.gz -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-source.tar.gz.sha512文件内容作对比 -$ shasum -a apache-eventmesh-${release_version}-incubating-bin.tar.gz -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-bin.tar.gz.sha512文件内容作对比 -``` - -> Windows - -```shell -$ certUtil -hashfile apache-eventmesh-${release_version}-incubating-source.tar.gz SHA512 -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-source.tar.gz.sha512文件内容作对比 -$ certUtil -hashfile apache-eventmesh-${release_version}-incubating-bin.tar.gz SHA512 -#并将输出内容与 apache-eventmesh-${release_version}-${rc_version}-incubating-bin.tar.gz.sha512文件内容作对比 -``` - -#### 1.2检查gpg签名 - -首先导入发布人公钥。从svn仓库导入KEYS到本地环境。(发布版本的人不需要再导入,帮助做验证的人需要导入,用户名填发版人的即可) - -```shell -$ curl https://dist.apache.org/repos/dist/dev/incubator/eventmesh/KEYS >> KEYS -$ gpg --import KEYS -$ gpg --edit-key "${发布人的gpg用户名}" - > trust - -Please decide how far you trust this user to correctly verify other users' keys -(by looking at passports, checking fingerprints from different sources, etc.) - - 1 = I don't know or won't say - 2 = I do NOT trust - 3 = I trust marginally - 4 = I trust fully - 5 = I trust ultimately - m = back to the main menu - -Your decision? 5 - - > save -``` - -然后使用如下命令检查签名 - -```shell -$ gpg --verify apache-eventmesh-${release_version}-incubating-source.tar.gz.asc apache-eventmesh-${release_version}-incubating-source-tar.gz -$ gpg --verify apache-eventmesh-${release_version}-incubating-bin.tar.gz.asc apache-eventmesh-${release_version}-incubating-bin.tar.gz -``` - -### 2.检查源码包的文件内容 - -解压缩`apache-eventmesh-${release_version}-incubating-source-tar.gz`,进行如下检查: - -- 检查源码包是否包含由于包含不必要文件,致使tar包过于庞大 -- 文件夹包含单词`incubating` -- 存在`LICENSE`和`NOTICE`文件 -- 存在`DISCLAIMER`文件 -- `NOTICE`文件中的年份正确 -- 只存在文本文件,不存在二进制文件 -- 所有文件的开头都有ASF许可证 -- 能够正确编译,单元测试可以通过 (./gradle build) (目前支持JAVA 8/gradle 7.0/idea 2021.1.1及以上) -- 检查是否有多余文件或文件夹,例如空文件夹等 - -### 3.检查二进制包的文件内容 - -- 文件夹包含单词`incubating` -- 存在`LICENSE`和`NOTICE`文件 -- 存在`DISCLAIMER`文件 -- `NOTICE`文件中的年份正确 -- 所有文本文件开头都有ASF许可证 -- 检查第三方依赖许可证: - - 第三方依赖的许可证兼容 - - 所有第三方依赖的许可证都在`LICENSE`文件中声名 - - 依赖许可证的完整版全部在`license`目录 - - 如果依赖的是Apache许可证并且存在`NOTICE`文件,那么这些`NOTICE`文件也需要加入到版本的`NOTICE`文件中 - -你可以参考此文章:[ASF第三方许可证策](https://apache.org/legal/resolved.html) - -## 发起投票 - -> EventMesh 仍在孵化阶段,需要进行两次投票 - -- EventMesh社区投票,发送邮件至:`dev@eventmesh.apache.org` -- incubator社区投票,发送邮件至:`general@incubator.apache.org` EventMesh毕业后,只需要在EventMesh社区投票 - -### 1.EventMesh社区投票阶段 - -1. EventMesh社区投票,发起投票邮件到`dev@eventmesh.apache.org`。PMC需要先按照文档检查版本的正确性,然后再进行投票。 经过至少72小时并统计到3个`+1 PMC member`票后,即可进入下一阶段的投票。 -2. 宣布投票结果,发起投票结果邮件到`dev@eventmesh.apache.org`。 - -### 2.EventMesh社区投票模板 - -标题: - -``` -[VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -正文: - -``` -Hello EventMesh Community, - - This is a call for vote to release Apache EventMesh (incubating) version ${release_version}-${rc_version}. - - Release notes: - https://github.com/apache/incubator-eventmesh/releases/tag/v${release_version}-${rc_version} - - The release candidates: - https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version}/ - - Maven artifacts are available in a staging repository at: - https://repository.apache.org/content/repositories/orgapacheeventmesh-{staging-id} - - Git tag for the release: - https://github.com/apache/incubator-eventmesh/tree/v${release_version}-${rc_version} - - Keys to verify the Release Candidate: - https://downloads.apache.org/incubator/eventmesh/KEYS - - Hash for the release tag: - #hashCode of this release tag - - GPG user ID: - ${YOUR.GPG.USER.ID} - - The vote will be open for at least 72 hours or until necessary number of votes are reached. - - Please vote accordingly: - - [ ] +1 approve - - [ ] +0 no opinion - - [ ] -1 disapprove with the reason - - Checklist for reference: - - [ ] Download links are valid. - - [ ] Checksums and PGP signatures are valid. - - [ ] Source code distributions have correct names matching the current release. - - [ ] LICENSE and NOTICE files are correct for each EventMesh repo. - - [ ] All files have license headers if necessary. - - [ ] No compiled archives bundled in source archive. - - More detail checklist please refer: - https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist - -Thanks, -Your EventMesh Release Manager -``` - -### 3.宣布投票结果模板 - -标题: - -``` -[RESULT][VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -正文: - -``` -Hello Apache EventMesh PPMC and Community, - - The vote closes now as 72hr have passed. The vote PASSES with - - xx (+1 non-binding) votes from the PPMC, - xx (+1 binding) votes from the IPMC, - xx (+1 non-binding) votes from the rest of the developer community, - and no further 0 or -1 votes. - - The vote thread: {vote_mail_address} - - I will now bring the vote to general@incubator.apache.org to get approval by the IPMC. - If this vote passes also, the release is accepted and will be published. - -Thank you for your support. -Your EventMesh Release Manager -``` - -### 4.Incubator社区投票阶段 - -1. Incubator社区投票,发起投票邮件到`general@incubator.apache.org`,需3个 `+1 IPMC Member`投票,方可进入下一阶段。 -2. 宣布投票结果,发起投票结果邮件到`general@incubator.apache.org` 并抄送至`dev@eventmesh.apache.org`。 - -### 5.Incubator社区投票模板 - -标题: - -``` -[VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -内容: - -``` -Hello Incubator Community, - - This is a call for a vote to release Apache EventMesh(Incubating) version ${release_version} ${rc_version} - - The Apache EventMesh community has voted on and approved a proposal to release - Apache EventMesh(Incubating) version ${release_version} ${rc_version} - - We now kindly request the Incubator PMC members review and vote on this - incubator release. - - EventMesh community vote thread: - • [投票链接] - - Vote result thread: - • [投票结果链接] - - The release candidate: - •https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version}/ - - Git tag for the release: - • https://github.com/apache/incubator-eventmesh/tree/${release_version}-${rc_version} - Release notes: - • https://github.com/apache/incubator-eventmesh/releases/tag/${release_version}-${rc_version} - - The artifacts signed with PGP key [填写你个人的KEY], corresponding to [填写你个人的邮箱], that can be found in keys file: - • https://downloads.apache.org/incubator/eventmesh/KEYS - - The vote will be open for at least 72 hours or until necessary number of votes are reached. - - Please vote accordingly: - - [ ] +1 approve - [ ] +0 no opinion - [ ] -1 disapprove with the reason - -Thanks, -On behalf of Apache EventMesh(Incubating) community -``` - -### 6.宣布投票结果模板 - -标题: - -``` -[RESULT][VOTE] Release Apache EventMesh (incubating) ${release_version} ${rc_version} -``` - -内容: - -``` -Hi all, - - Thanks for reviewing and voting for Apache EventMesh(Incubating) version ${release_version} ${rc_version} release, I am happy to announce the release voting has passed with [投票结果数] binding votes, no +0 or -1 votes. - - Binding votes are from IPMC - - xxx - - xxx - - xxx - - Non-binding votes: - +1 xxx - +0 xxx - -1 xxx - - The voting thread is: - • [投票结果链接] - - Many thanks for all our mentors helping us with the release procedure, and all IPMC helped us to review and vote for Apache EventMesh(Incubating) release. I will be working on publishing the artifacts soon. - -Thanks, -On behalf of Apache EventMesh(Incubating) community -``` - -## 正式发布 - -### 1.合并分支 - -合并`${release_version}-release`分支的改动到`master`分支,合并完成后删除`release`分支 - -```shell -$ git checkout master -$ git merge origin/${release_version}-release -$ git pull -$ git push origin master -$ git push --delete origin ${release_version}-release -$ git branch -d ${release_version}-release -``` - -### 2.迁移源码与二进制包 - -将源码和二进制包从svn的`dev`目录移动到`release`目录 - -```shell -$ svn mv https://dist.apache.org/repos/dist/dev/incubator/eventmesh/${release_version}-${rc_version} https://dist.apache.org/repos/dist/release/incubator/eventmesh/ -m "transfer packages for ${release_version}-${rc_version}" #移动源码包与二进制包 -$ svn delete https://dist.apache.org/repos/dist/release/incubator/eventmesh/KEYS -m "delete KEYS" #清除原有release目录下的KEYS -$ svn cp https://dist.apache.org/repos/dist/dev/incubator/eventmesh/KEYS https://dist.apache.org/repos/dist/release/incubator/eventmesh/ -m "transfer KEYS for ${release_version}-${rc_version}" #拷贝dev目录KEYS到release目录 -``` - -### 3.确认dev和release下的包是否正确 - -- 确认[dev](https://dist.apache.org/repos/dist/dev/incubator/eventmesh/)下的`${release_version}-${rc_version}`已被删除 -- 删除[release](https://dist.apache.org/repos/dist/release/incubator/eventmesh/)目录下上一个版本的发布包,这些包会被自动保存在[这里](https://archive.apache.org/dist/incubator/eventmesh/) - -```shell -$ svn delete https://dist.apache.org/repos/dist/release/incubator/eventmesh/${last_release_version} -m "Delete ${last_release_version}" -``` - -### 4.在Apache Staging仓库发布版本 - -- 登录http://repository.apache.org , 使用Apache账号登录 -- 点击左侧的Staging repositories, -- 搜索EventMesh关键字,选择你最近上传的仓库,投票邮件中指定的仓库 -- 点击上方的`Release`按钮,这个过程会进行一系列检查 - -> 等仓库同步到其他数据源,一般需要24小时 - -### 5.GitHub版本发布 - -1.Tag the commit (on which the vote happened) with the release version without `-${RELEASE_CANDIDATE}`. 例如:after a successful vote on `v1.2-rc5`, the hash will be tagged again with `v1.2` only. - -2.在 [GitHub Releases](https://github.com/apache/incubator-eventmesh/releases) 页面的 `${release_version}` 版本上点击 `Edit` - -编辑版本号及版本说明,并点击 `Publish release` - -### 6.更新下载页面 - -等待并确认新的发布版本同步至 Apache 镜像后,更新如下页面: - -https://eventmesh.apache.org/download/ - -https://eventmesh.apache.org/zh/download/ - -GPG签名文件和哈希校验文件的下载连接应该使用这个前缀:`https://downloads.apache.org/incubator/eventmesh/` - -> 注意:项目下载链接应该使用 https://www.apache.org/dyn/closer.lua 而不是 closer.cgi 或者 mirrors.cgi - -### 7.邮件通知版本发布完成 - -> 请确保Apache Staging仓库已发布成功,一般是在该步骤的24小时后发布邮件 - -发邮件到 `dev@eventmesh.apache.org` 、 `announce@apache.org`和`general@incubator.apache.org` - -标题: - -``` -[ANNOUNCE] Apache EventMesh (incubating) ${release_version} available -``` - -正文: - -``` -Hi all, - -Apache EventMesh (incubating) Team is glad to announce the new release of Apache EventMesh (incubating) ${release_version}. - -Apache EventMesh (incubating) is a dynamic cloud-native eventing infrastructure 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. - -Download Links: https://eventmesh.apache.org/projects/eventmesh/download/ - -Release Notes: https://eventmesh.apache.org/events/release-notes/v${release_version}/ - -Website: https://eventmesh.apache.org/ - -EventMesh Resources: -- Issue: https://github.com/apache/incubator-eventmesh/issues -- Mailing list: dev@eventmesh.apache.org - - - -Apache EventMesh (incubating) Team -``` - diff --git a/docs/zh/contribute/02-write-unit-test.md b/docs/zh/contribute/02-write-unit-test.md deleted file mode 100644 index 0c48e46bc6..0000000000 --- a/docs/zh/contribute/02-write-unit-test.md +++ /dev/null @@ -1,77 +0,0 @@ -# Unit Test Requirement - -- Each unit test case should use assertions instead of `System.out` output or `if` statement -- Each unit test case shouldn't call other cases or depend on the order of execution. -- Each unit test case should be repeatable and not depend on the external environment because the test might be executed in the continuous integration. -- The scope of each unit test should be small enough to help locate the problem at the method level. - -## Location and Naming Rules - -- The unit test should be placed in `src/test/java`. -- The unit test configuration file should be placed in `src/test/resources`. For example: - - Class to be tested: `src/main/java/org/apache/eventmesh/common/protocol/http/body/BaseResponseBody.java` - - Unit test: `src/test/java/org/apache/eventmesh/common/protocol/http/body/BaseResponseBodyTest.java` - - Unit test configuration: `src/test/resources/configuration.properties` -- The package name of the unit test class should be identical to the class to be tested. -- The name of the unit test class should be `{class or interface to be tested}Test`. For example: - - Class to be tested: `EventMeshUtil` - - Unit test class: `EventMeshUtilTest` -- The name of each test case should be `test{method name}`. For example: - - Method to be tested: `addProp(String key, String val)` - - Unit test case: `testAddProp` - -## Assertion Usage - -### Common Assertion - -| Methods | Instructions | -| :-------------- | :-------------- | -| `assertEquals` | Determines whether two objects or primitive types are equal | -| `assertNotEquals` | Determines whether two objects or primitive types are not equal | -| `assertTrue` | Determines whether the given Boolean value is `true` | -| `assertFalse` | Determines whether the given Boolean value is `false` | -| `assertNull` | Determines whether the given object reference is `null` | -| `assertNotNull` | Determines whether the given object reference is not `null` | -| `assertAll` | When multiple decision logic are processed together if only one error is reported, the whole test will fail | - -### Example - -#### `assertEquals()` - -```java -configuration.init(); -Assert.assertEquals("value1", configuration.eventMeshEnv); -``` - -#### `assertTrue()` - -```java -BaseResponseHeader header = BaseResponseHeader.buildHeader("200"); -Assert.assertTrue(header.toMap().containsKey(ProtocolKey.REQUEST_CODE)); -``` - -#### `assertFalse()` - -```java -Class nacosRegistryServiceClass = NacosRegistryService.class; -Field initStatus = nacosRegistryServiceClass.getDeclaredField("INIT_STATUS"); -initStatus.setAccessible(true); -Object initStatusField = initStatus.get(nacosRegistryService); -Assert.assertFalse((Boolean.parseBoolean(initStatusField.toString()))); -``` - -#### `assertNull()` - -```java -DefaultFullHttpResponse response = httpCommand.httpResponse(); -Assert.assertNull(response); -``` - -#### `assertNotNull()` - -```java -Codec.Decoder cd = new Codec.Decoder(); -ArrayList result = new ArrayList<>(); -cd.decode(null, buf, result); -Assert.assertNotNull(result.get(0)); -``` diff --git a/docs/zh/contribute/03-new-contributor-guidelines.md b/docs/zh/contribute/03-new-contributor-guidelines.md deleted file mode 100644 index 8c63375c35..0000000000 --- a/docs/zh/contribute/03-new-contributor-guidelines.md +++ /dev/null @@ -1,145 +0,0 @@ - -# How to Contribution - -If you are a new contributor who wants to contribute to the eventmesh community, please read this document, which describes how to contribute to the community, and if you find any questions in the document, feel free to leave comments or suggestions. - -## Preparation - -### Development environment - -- You should have the JDK installed in your development environment. - -### Code Style - -Import [EventMesh CheckStyle](https://github.com/apache/incubator-eventmesh/blob/master/style/checkStyle.xml) file to your IDEA. - -For IDEA, you can import check style file by: -```shell - Editor -> Code Style -> Java -> Scheme -> Import Scheme -> CheckStyle Configuration -``` - -If you can't see CheckStyle Configuration section under Import Scheme, you can install CheckStyle-IDEA plugin first, and you will see it. - -You can also use `./gradlew check` to check the code style. -(Note: this command will check all file in project, when you submit a pr, the ci will only check the file has been changed in this pr). - -### Workflow - -Here are the workflow for contributors: - -1. Fork to your own - -2. Clone fork to local repository -```git -git clone git@github.com:yourgithub/incubator-eventmesh.git -``` - -3. Create a new branch and work on it -```git -git checkout -b fix_patch_xx -``` - -4. Keep your branch in sync -```git -git remote add upstream git@github.com:apache/incubator-eventmesh.git -git fetch upstream develop:upstream_develop -git rebase upstream_develop -``` - -5. Commit your changes (make sure your commit message concise) - -6. Push your commits to your forked repository - -7. Create a pull request - -## Explanation - -The original warehouse: https://github.com/apache/incubator-eventmesh The apache warehouse of eventmesh is called the original warehouse in the text. - -The Fork library: From https://github.com/apache/eventmesh fork to your own personal repository to become a fork library. - -So fork the original EventMesh repository into your own repository. - -## Development branch - -**The current development branch of eventmesh is Master. Please submit PR to this branch.** - -- We recommend that you create a new branch in your repository for development and submit the branch to the master branch of eventmesh. - -## Contribution Categories - -### Bug feedback or bug fixes - -- Whether it's a bug feedback or a fix, an issue needs to be created first to describe the bug in detail, so that the community can easily find and view the problem and code through the issue record. bug feedback issues usually need to contain a complete description of the bug information and reproducible scenarios. - -### Implementation of functions, refactoring - -- If you plan to implement a new feature (or refactoring), be sure to communicate with the eventmesh core development team via an Issue or other means, and describe the new feature (or refactoring), mechanism and scenario in detail during the communication process. - -### Documentation Improvement - -- You can find the eventmesh documentation at [evenmesh-docs](https://github.com/apache/incubator-eventmesh/tree/master/docs), and the documentation is supplemented or improved in a way that is also essential for eventmesh. - -## Contribution method - -There are two ways for new contributors to contribute to the eventmesh community: - -- If you find a bug in the eventmesh code that you want to fix, or if you provide a new feature for the eventmesh, submit an issue in the eventmesh and submit a pr to the eventmesh. - -- Other contributors in the eventmesh community have raised issues, the [`issue for first-time contributors`](https://github.com/apache/incubator-eventmesh/issues/888) sorted out by the community here are relatively simple PR, which can help you familiarize yourself with the process of making contributions to the eventmesh community. - -## Submit issue guidelines - -- If you don't know how to raise an issue on eventmesh, please read [about the issue](https://docs.github.com/cn/issues/tracking-your-work-with-issues/quickstart). - -- In the eventmesh community, there are issue templates that can be used for reference, if the type matches please use the template, if the issue template does not meet your requirements, you can open an empty issue template, for the issue please bring its matching feature labels. - -- For the name of the issue, please briefly describe your question or purpose in one sentence, and write in English for better global communication. - -## pull request (pr) submission guidelines - -- If you don't know how to initiate a pr for eventmesh, please see [about pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). - -- Whether it's a bug fix, or a new feature development (if this pr is a new feature development, then documentation updates about the new feature should be included in this pr), please submit a PR to the current development branch master. - -- The pr submission should follow the template provided by eventmesh as well as the need to write the submission information, a brief description of what the pr you are submitting does is sufficient, please see the [template for details](https://github.com/apache/incubator-eventmesh/blob/master/.github/PULL_REQUEST_TEMPLATE.md). - -- The pr you submit needs to be associated with the issue you are fixing, or the issue you are raising,so your PR title should start with [ISSUE #xx]. - -- If your change is about a typo or small optimize, you needn't create an Issue, just submit a PR and title with [MINOR]. - -**Note:** - - - A single pull request should not be too large. If heavy changes are required, it's better to separate the changes to a few individual PRs. - - - After creating a PR, one or more committers will help to review the pull request, after approve, this PR will be merged in to eventmesh repository, and the related Issue will be closed. - -## review - -### PR review - -All code should be well reviewed by one or more committers. Some principles: - -- Readability: Important code should be well-documented. Comply with our [code style](https://github.com/apache/incubator-eventmesh/blob/master/style/checkStyle.xml). - -- Elegance: New functions, classes or components should be well-designed. - -- Testability: Important code should be well-tested (high unit test coverage). - -### License review - -EventMesh follows [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) policy. All source files should -have the Apache License header added to the file header. EventMesh uses the [apache/skywalking-eyes](https://github.com/apache/skywalking-eyes) to check -the source file header. - -### PR merge - -After a PR is approved by at least one committer, it can be merged. Before the merge, the committer can make changes to the commits message, requiring the commits -message to be clear without duplication, and use Squash and Merge to make sure one PR should only contain one commits. -For large multi-person PR, use Merge to merge, and fix the commits by rebase before merging. - -## Community - -### Contact us - -Mail: dev@eventmesh.apache.org \ No newline at end of file diff --git a/docs/zh/contribute/_category_.json b/docs/zh/contribute/_category_.json deleted file mode 100644 index 56d36f918e..0000000000 --- a/docs/zh/contribute/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 5, - "label": "Contribute", - "collapsed": false -} diff --git a/docs/zh/desing-document/01-workflow.md b/docs/zh/design-document/01-workflow.md similarity index 99% rename from docs/zh/desing-document/01-workflow.md rename to docs/zh/design-document/01-workflow.md index 444c09454d..e3cfed9ab3 100644 --- a/docs/zh/desing-document/01-workflow.md +++ b/docs/zh/design-document/01-workflow.md @@ -32,7 +32,7 @@ Serverless工作流定义了一种领域特定语言(DSL)来描述有状态 AsyncAPI是一项开源计划,旨在改善事件驱动体系结构(EDA)的当前状态。我们的长期目标是让使用EDA和使用REST API一样容易。包括从文档到代码生成、发现到事件管理。现在应用于REST API的大多数流程也适用于事件驱动/异步API。 -详见[AsyncAPI官网](https://www.asyncapi.com/docs/getting-started) +详见[AsyncAPI官网](https://www.asyncapi.com/docs/guides) ### 工作流示例 diff --git a/docs/zh/desing-document/02-runtime-protocol.md b/docs/zh/design-document/02-runtime-protocol.md similarity index 99% rename from docs/zh/desing-document/02-runtime-protocol.md rename to docs/zh/design-document/02-runtime-protocol.md index d5f155602f..c5726fbec5 100644 --- a/docs/zh/desing-document/02-runtime-protocol.md +++ b/docs/zh/design-document/02-runtime-protocol.md @@ -2,8 +2,6 @@ #### 1. 协议格式 -![dataFlow](../../images/design-document/tcp-protocol.png) - **消息组成详解:** ``` diff --git a/docs/zh/desing-document/03-stream.md b/docs/zh/design-document/03-stream.md similarity index 100% rename from docs/zh/desing-document/03-stream.md rename to docs/zh/design-document/03-stream.md diff --git a/docs/zh/design-document/05-metrics-export.md b/docs/zh/design-document/05-metrics-export.md new file mode 100644 index 0000000000..38be6e07f8 --- /dev/null +++ b/docs/zh/design-document/05-metrics-export.md @@ -0,0 +1,47 @@ +# EventMesh 指标(OpenTelemetry 和 Prometheus + +## 介绍 + +[EventMesh(incubating)](https://github.com/apache/incubator-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/docs/zh/desing-document/06-cloudevents.md b/docs/zh/design-document/06-cloudevents.md similarity index 100% rename from docs/zh/desing-document/06-cloudevents.md rename to docs/zh/design-document/06-cloudevents.md diff --git a/docs/zh/desing-document/08-spi.md b/docs/zh/design-document/08-spi.md similarity index 100% rename from docs/zh/desing-document/08-spi.md rename to docs/zh/design-document/08-spi.md diff --git a/docs/zh/desing-document/09-event-bridge.md b/docs/zh/design-document/09-event-bridge.md similarity index 99% rename from docs/zh/desing-document/09-event-bridge.md rename to docs/zh/design-document/09-event-bridge.md index b74b78e015..36a09b1488 100644 --- a/docs/zh/desing-document/09-event-bridge.md +++ b/docs/zh/design-document/09-event-bridge.md @@ -153,4 +153,4 @@ Event Bridge 可以支持跨mesh集群的消息投递,下面展示这一功能 "TEST-TOPIC-HTTP-ASYNC" ] } -``` \ No newline at end of file +``` diff --git a/docs/zh/desing-document/10-knative-connector.md b/docs/zh/design-document/10-knative-connector.md similarity index 100% rename from docs/zh/desing-document/10-knative-connector.md rename to docs/zh/design-document/10-knative-connector.md diff --git a/docs/zh/metrics-tracing/01-prometheus.md b/docs/zh/design-document/11-prometheus.md similarity index 80% rename from docs/zh/metrics-tracing/01-prometheus.md rename to docs/zh/design-document/11-prometheus.md index 067cd00abf..81e09a0805 100644 --- a/docs/zh/metrics-tracing/01-prometheus.md +++ b/docs/zh/design-document/11-prometheus.md @@ -8,18 +8,10 @@ 选择自己电脑对应的版本下载并解压缩 -![Prometheus-download](../../images/Prometheus-download.png) - ### 2、在prometheus.yml中添加配置 如果你是Prometheus的新手,可以直接复制eventmesh-runtime/conf/prometheus.yml替换 -例如:这是win-64的下载后的样子: - -![prometheus-yml](../../images/prometheus-yml.png) - -替换红框中的文件 - 如果你十分了解Prometheus,可以自行配置,eventmesh默认的导出的端口为19090。 ps:如果需要更换端口的话,请修改eventmesh-runtime/conf/eventmesh.properties中的 @@ -43,4 +35,3 @@ eventMesh.metrics.prometheus.port=19090 输入’**eventmesh_**‘ 就会出现相关的指标的提示 -![promethus-search](../../images/promethus-search.png) diff --git a/docs/zh/metrics-tracing/02-zipkin.md b/docs/zh/design-document/12-zipkin.md similarity index 100% rename from docs/zh/metrics-tracing/02-zipkin.md rename to docs/zh/design-document/12-zipkin.md diff --git a/docs/zh/design-document/13-jaeger.md b/docs/zh/design-document/13-jaeger.md new file mode 100644 index 0000000000..9ac0269342 --- /dev/null +++ b/docs/zh/design-document/13-jaeger.md @@ -0,0 +1,44 @@ +# 通过 Jaeger 观察 Trace + +## Jaeger + +[Jaeger](https://www.jaegertracing.io/) 是 [Uber](https://uber.github.io/) 开发的分布式跟踪系统,现已成为 [CNCF](https://cncf.io/) 开源项目,其灵感来源于 Google 的 [Dapper](https://research.google.com/pubs/pub36356.html) 和 Twitter 的 [Zipkin](https://zipkin.io/),用于监控基于微服务的分布式系统。 + +Jaeger 的安装可以参考[官方文档](https://www.jaegertracing.io/docs/latest/getting-started/),推荐使用官方的 Docker 镜像 `jaegertracing/all-in-one` 来快速搭建环境进行测试。 + +## 配置 + +为了启用 EventMesh Runtime 的 trace exporter,请将 `conf/eventmesh.properties` 文件中的 `eventMesh.server.trace.enabled` 字段设置为 true。 + +```conf +# Trace plugin +eventMesh.server.trace.enabled=true +eventMesh.trace.plugin=jaeger +``` + +为了定义 trace exporter 的行为,如超时时间或导出间隔,请编辑 `exporter.properties` 文件。 + +```conf +# Set the maximum batch size to use +eventmesh.trace.max.export.size=512 +# Set the queue size. This must be >= the export batch size +eventmesh.trace.max.queue.size=2048 +# Set the max amount of time an export can run before getting(TimeUnit=SECONDS) +eventmesh.trace.export.timeout=30 +# Set time between two different exports (TimeUnit=SECONDS) +eventmesh.trace.export.interval=5 +``` + +为了将导出的 trace 数据发送到 Jaeger,请编辑 `conf/jaeger.properties` 文件中的 `eventmesh.trace.jaeger.ip` 和 `eventmesh.trace.jaeger.port` 字段,来匹配 Jaeger 服务器的配置。 + +```conf +# Jaeger's IP and Port +eventmesh.trace.jaeger.ip=localhost +eventmesh.trace.jaeger.port=14250 +``` + +## 从 Zipkin 迁移 + +Jaeger 采集器服务暴露了与 Zipkin 兼容的 REST API,`/api/v1/spans` 可以接收 Thrift 和 JSON,`/api/v2/spans` 可以接收 JSON 和 Proto。 + +因此你也可以使用 `eventmesh-trace-zipkin` 插件来通过 Jaeger 观察 trace,具体配置细节请参考 `eventmesh-trace-zipkin` 的文档。默认情况下这个特性在 Jaeger 中是关闭的,可以通过 `--collector.zipkin.host-port=:9411` 启用。 \ No newline at end of file diff --git a/docs/zh/desing-document/https.md b/docs/zh/design-document/14-https.md similarity index 100% rename from docs/zh/desing-document/https.md rename to docs/zh/design-document/14-https.md diff --git a/docs/zh/design-document/15-webhook.md b/docs/zh/design-document/15-webhook.md new file mode 100644 index 0000000000..d840e75e6e --- /dev/null +++ b/docs/zh/design-document/15-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 +![](../../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: 服务地址以及pahts。[http or https ]://[域名 or IP 【厂商可以被调用】]:[端口]/webhook/[callbackPath] +Content type:http header content type +secret: 验签字符串 + + + + diff --git a/docs/zh/design-document/_category_.json b/docs/zh/design-document/_category_.json new file mode 100644 index 0000000000..dd1d530081 --- /dev/null +++ b/docs/zh/design-document/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "开发文档", + "collapsed": false +} diff --git a/docs/zh/design-document/https.md b/docs/zh/design-document/https.md new file mode 100644 index 0000000000..a100ba3977 --- /dev/null +++ b/docs/zh/design-document/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/docs/zh/desing-document/webhook.md b/docs/zh/design-document/webhook.md similarity index 100% rename from docs/zh/desing-document/webhook.md rename to docs/zh/design-document/webhook.md diff --git a/docs/zh/desing-document/_category_.json b/docs/zh/desing-document/_category_.json deleted file mode 100644 index 95b7eed067..0000000000 --- a/docs/zh/desing-document/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Documentation", - "collapsed": false -} diff --git a/docs/zh/instruction/00-eclipse.md b/docs/zh/instruction/00-eclipse.md index 27ded49524..c72c0bc6bb 100644 --- a/docs/zh/instruction/00-eclipse.md +++ b/docs/zh/instruction/00-eclipse.md @@ -9,25 +9,28 @@ eclipse 已安装gradle插件或者eclipse自带gradle插件 ``` ### 下载源码 -git init -git clone https://github.com/apache/incubator-eventmesh.git +git init + +git clone ### 项目编译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 +--illegal-access=permit ### 导入gradle -打开eclipse,导入gradle项目到IDE里 +打开eclipse,导入gradle项目到IDE里 diff --git a/docs/zh/instruction/01-store-with-docker.md b/docs/zh/instruction/01-store-with-docker.md index cd3fc1ad69..22633da80a 100644 --- a/docs/zh/instruction/01-store-with-docker.md +++ b/docs/zh/instruction/01-store-with-docker.md @@ -14,26 +14,24 @@ eventmesh在非standalone模式下,依赖RocketMQ作为存储层;若采用st 在命令行输入如下命令直接从 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 +#获取 RocketMQ 镜像 +sudo docker pull apache/rocketmq:4.9.4 ``` 在命令行输入以下命令运行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 +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 容器 -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 +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-broker ip** 是 **pod ip**, 如果你想修改这个ip, 可以通过挂载容器中 **broker.conf** 文件的方式并修改文件中的 **brokerIP1** 配置项为自定义值 -至此eventmesh-store的部署已完成,请转至下一步完成eventmesh-runtime的部署 +至此eventmesh-store的部署已完成,请转至下一步完成 [eventmesh-runtime](https://github.com/apache/incubator-eventmesh/blob/master/docs/zh/instruction/02-runtime-with-docker.md) 的部署 ## 参考 diff --git a/docs/zh/instruction/01-store.md b/docs/zh/instruction/01-store.md index d8b5599f04..7317e3ad87 100644 --- a/docs/zh/instruction/01-store.md +++ b/docs/zh/instruction/01-store.md @@ -41,7 +41,7 @@ tail -f ~/logs/rocketmqlogs/broker.log 如果在看到The broker boot success...,则说明Broker启动成功 -至此eventmesh-store的部署已完成,请转至下一步完成eventmesh-runtime的部署 +至此eventmesh-store的部署已完成,请转至下一步完成 [eventmesh-runtime](https://github.com/apache/incubator-eventmesh/blob/master/docs/zh/instruction/02-runtime.md) 的部署 ## 参考 diff --git a/docs/zh/instruction/03-demo.md b/docs/zh/instruction/03-demo.md index 5a18196660..59d76ea8ce 100644 --- a/docs/zh/instruction/03-demo.md +++ b/docs/zh/instruction/03-demo.md @@ -44,7 +44,7 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 运行 org.apache.eventmesh.tcp.demo.pub.eventmeshmessage.AsyncPublishBroadcast 的main方法 ``` -更多关于TCP部分的内容,请参考 [EventMesh TCP](docs/zh/sdk-java/03-tcp.md) +更多关于TCP部分的内容,请参考 [EventMesh TCP](/docs/zh/sdk-java/03-tcp.md) ### 2. HTTP演示 @@ -71,7 +71,7 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 ``` 运行 org.apache.eventmesh.http.demo.pub.eventmeshmessage.AsyncPublishInstance 的main方法 ``` -更多关于HTTP部分的内容,请参考 [EventMesh HTTP](docs/zh/sdk-java/02-http.md) +更多关于HTTP部分的内容,请参考 [EventMesh HTTP](/docs/zh/sdk-java/02-http.md) ### 3. GRPC 演示 @@ -111,7 +111,7 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 - 启动 stream subscriber ``` -运行 org.apache.eventmesh.grpc.sub.EventmeshAsyncSubscribe 的main方法 +运行 org.apache.eventmesh.grpc.sub.EventMeshAsyncSubscribe 的main方法 ```

批量事件发布

@@ -125,11 +125,11 @@ TCP, HTTP 和 GRPC 示例都在**eventmesh-examples**模块下 运行 org.apache.eventmesh.grpc.pub.eventmeshmessage.BatchPublishInstance 的main方法 ``` -更多关于 gRPC 部分的内容,请参考 [EventMesh gRPC](docs/zh/sdk-java/04-grpc.md) +更多关于 gRPC 部分的内容,请参考 [EventMesh gRPC](/docs/zh/sdk-java/04-grpc.md) ### 3.4 测试 -请参考[EventMesh Store](docs/zh/instruction/01-store.md) 和 [EventMesh Runtime](docs/zh/instruction/02-runtime.md) 完成运行环境的部署 +请参考[EventMesh Store](/docs/zh/instruction/01-store.md) 和 [EventMesh Runtime](/docs/zh/instruction/02-runtime.md) 完成运行环境的部署 完成 store 和 runtime 的部署后,就可以在 eventmesh-examples 模块下运行我们的 demo 来体验 eventmesh 了: diff --git a/docs/zh/instruction/_category_.json b/docs/zh/instruction/_category_.json index 06fd721fbd..838cabfe1e 100644 --- a/docs/zh/instruction/_category_.json +++ b/docs/zh/instruction/_category_.json @@ -1,4 +1,4 @@ { - "label": "Instructions", + "label": "使用教程", "collapsed": false } diff --git a/docs/zh/introduction.md b/docs/zh/introduction.md index 43c821dd61..827781d5b0 100644 --- a/docs/zh/introduction.md +++ b/docs/zh/introduction.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 0 +--- + # Apache EventMesh (Incubating) [![CI status](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-eventmesh/actions/workflows/ci.yml) @@ -7,43 +11,32 @@ [![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) -## 什么是Event Mesh? - -EventMesh是一个动态的云原生事件驱动架构基础设施,用于分离应用程序和后端中间件层,它支持广泛的用例,包括复杂的混合云、使用了不同技术栈的分布式架构。 - -![architecture1](../images/eventmesh-define.png) - -**EventMesh架构:** - -![architecture1](../images/eventmesh-runtime.png) - -**EventMesh云原生结构:** - -![architecture2](../images/eventmesh-panels.png) - -Event Mesh允许将来自一个应用程序的事件动态路由到任何其他应用程序. Event Mesh的一般功能: - -* 事件驱动; -* 事件治理; -* 动态路由; -* 云原生 +**Apache EventMesh (Incubating)** 是一个动态的云原生事件驱动架构基础设施,用于分离应用程序和后端中间件层,它支持广泛的用例,包括复杂的混合云、使用了不同技术栈的分布式架构。 -部件: +## 特性 -* eventmesh-runtime:一种中间件,用于在事件生产者和消费者之间传输事件,支持云原生应用程序和微服务 -* eventmesh-sdk-java:当前支持HTTP、HHTTP、TCP和 [gRPC](https://grpc.io) 协议 +- **通信协议**: 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 编写。 +## 组件 -## 快速开始 +Apache EventMesh (Incubating) 由多个组件组成,这些组件集成了不同的中间件和消息协议,以增强应用程序运行时的功能。 -1. 构建并部署 event-store(RocketMQ), 请参见[说明](instruction/01-store.md) -2. 构建并部署 eventmesh-runtime,请参见[说明](instruction/02-runtime.md) -3. 运行 eventmesh-sdk-java 演示,请参见[说明](instruction/03-demo.md) +- **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**:控制面板,管理客户端,主题和订阅。 -## 贡献 +## 贡献者 -永远欢迎参与共建, 请参阅[贡献](../../03-new-contributor-guidelines.md)了解详细指南 +每位贡献者都在促进 Apache EventMesh (Incubating) 健壮发展方面发挥了重要作用。我们真诚地感谢所有贡献代码和文档的贡献者。以下是在 EventMesh 相关存储库中的贡献者列表。 -您可以从发现和解决问题开始~ -[GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) +- [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/docs/zh/metrics-tracing/_category_.json b/docs/zh/metrics-tracing/_category_.json deleted file mode 100644 index 72c4414d12..0000000000 --- a/docs/zh/metrics-tracing/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "position": 4, - "label": "Metrics and Tracing", - "collapsed": false -} diff --git a/docs/zh/sdk-java/01-intro.md b/docs/zh/sdk-java/01-intro.md index cb4b87640c..c49acc230a 100644 --- a/docs/zh/sdk-java/01-intro.md +++ b/docs/zh/sdk-java/01-intro.md @@ -1,4 +1,4 @@ -# 安装 +# 安装 SDK [![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) @@ -26,4 +26,4 @@ dependencies { 1.4.0 -``` \ No newline at end of file +``` diff --git a/docs/zh/sdk-java/02-http.md b/docs/zh/sdk-java/02-http.md index 45a6698da7..9a8acd0d68 100644 --- a/docs/zh/sdk-java/02-http.md +++ b/docs/zh/sdk-java/02-http.md @@ -95,20 +95,24 @@ public class HTTP { ## 使用Curl 命令 -也可以不通过Event Mesh SDK来体验事件的收发功能 +本段落介绍通过Curl命令体验事件的收发功能 ### 事件发送 +启动EventMesh Runtime服务后,可以使用Curl命令将事件用HTTP POST方法发布到指定的主题,Body内容必须是JSON格式,执行命令示例如下: + ```shell curl -H "Content-Type:application/json" -X POST -d '{"name": "admin", "pass":"12345678"}' http://127.0.0.1:10105/eventmesh/publish/TEST-TOPIC-HTTP-ASYNC ``` -启动eventmesh运行时服务后,可以使用curl命令将事件用HTTP post方法发布到指定的主题,并且Body必须是JSON格式。发布事件的url类似于(http://127.0.0.1:10105/eventmesh/publish/TEST-TOPIC-HTTP-ASYNC),您将获得成功发布的结果。 + ### 事件订阅 +启动EventMesh Runtime服务后,可以使用Curl命令用HTTP POST方法订阅指定的主题列表,Body内容必须是JSON格式,执行命令示例如下: + ```shell curl -H "Content-Type:application/json" -X POST -d '{"url": "http://127.0.0.1:8088/sub/test", "consumerGroup":"TEST-GROUP", "topic":[{"mode":"CLUSTERING","topic":"TEST-TOPIC-HTTP-ASYNC","type":"ASYNC"}]}' http://127.0.0.1:10105/eventmesh/subscribe/local ``` -启动eventmesh运行时服务器后,可以使用curl命令用HTTP post方法订阅指定的主题列表,并且Body必须是JSON格式。订阅url类似于(http://127.0.0.1:10105/eventmesh/subscribe/local),您将获得订阅成功的结果。你应该注意Body中的`url`字段,这意味着你需要在指定的url上启动HTTP服务实现监听,你可以在`eventmesh-examples`模块中看到这个例子。 \ No newline at end of file +你可以在项目`eventmesh-examples`模块中看到这个例子。 \ No newline at end of file diff --git a/docs/zh/upgrade-guide/01-upgrade-guide.md b/docs/zh/upgrade-guide/01-upgrade-guide.md new file mode 100644 index 0000000000..733b5e1901 --- /dev/null +++ b/docs/zh/upgrade-guide/01-upgrade-guide.md @@ -0,0 +1,16 @@ +# 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/docs/zh/upgrade-guide/_category_.json b/docs/zh/upgrade-guide/_category_.json new file mode 100644 index 0000000000..af764643e9 --- /dev/null +++ b/docs/zh/upgrade-guide/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 7, + "label": "Upgrade Guide", + "collapsed": false +} diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/build.gradle b/eventmesh-admin/eventmesh-admin-rocketmq/build.gradle index 1217b33818..4819d15cad 100644 --- a/eventmesh-admin/eventmesh-admin-rocketmq/build.gradle +++ b/eventmesh-admin/eventmesh-admin-rocketmq/build.gradle @@ -26,5 +26,8 @@ dependencies { implementation project(":eventmesh-connector-plugin:eventmesh-connector-api") - testImplementation project(":eventmesh-connector-plugin:eventmesh-connector-api") + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + + testImplementation project(":eventmesh-connector-plugin:eventmesh-connector-api") } diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/controller/AdminController.java b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/controller/AdminController.java index 9b85b4521c..573a0c3661 100644 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/controller/AdminController.java +++ b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/controller/AdminController.java @@ -23,14 +23,13 @@ import java.io.IOException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import com.sun.net.httpserver.HttpServer; -public class AdminController { +import lombok.extern.slf4j.Slf4j; - private static final Logger logger = LoggerFactory.getLogger(AdminController.class); +@Slf4j +public class AdminController { public AdminController() { } @@ -39,6 +38,6 @@ public void run(HttpServer server) throws IOException { server.createContext(TOPIC_MANAGE_PATH, new TopicsHandler()); - logger.info("EventMesh-Admin Controller server context created successfully"); + log.info("EventMesh-Admin Controller server context created successfully"); } } diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/handler/TopicsHandler.java b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/handler/TopicsHandler.java index ed304fff23..c0aa2c7c19 100644 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/handler/TopicsHandler.java +++ b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/handler/TopicsHandler.java @@ -24,24 +24,23 @@ import org.apache.eventmesh.admin.rocketmq.request.TopicCreateRequest; import org.apache.eventmesh.admin.rocketmq.response.TopicResponse; -import org.apache.eventmesh.admin.rocketmq.util.JsonUtils; -import org.apache.eventmesh.admin.rocketmq.util.NetUtils; import org.apache.eventmesh.admin.rocketmq.util.RequestMapping; import org.apache.eventmesh.common.Constants; +import org.apache.eventmesh.common.utils.JsonUtils; +import org.apache.eventmesh.common.utils.NetUtils; import org.apache.commons.lang3.StringUtils; import java.io.IOException; import java.io.OutputStream; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class TopicsHandler implements HttpHandler { - private static final Logger logger = LoggerFactory.getLogger(TopicsHandler.class); @Override public void handle(HttpExchange httpExchange) throws IOException { @@ -55,22 +54,21 @@ public void handle(HttpExchange httpExchange) throws IOException { OutputStream out = httpExchange.getResponseBody(); httpExchange.sendResponseHeaders(500, 0); String result = String.format("Please check your request url: %s", httpExchange.getRequestURI()); - logger.error(result); + log.error(result); out.write(result.getBytes(Constants.DEFAULT_CHARSET)); } public void createTopicHandler(HttpExchange httpExchange) throws IOException { String result; - OutputStream out = httpExchange.getResponseBody(); - try { + try (OutputStream out = httpExchange.getResponseBody()) { String params = NetUtils.parsePostBody(httpExchange); TopicCreateRequest topicCreateRequest = - JsonUtils.toObject(params, TopicCreateRequest.class); + JsonUtils.parseObject(params, TopicCreateRequest.class); String topic = topicCreateRequest.getName(); if (StringUtils.isBlank(topic)) { result = "Create topic failed. Parameter topic not found."; - logger.error(result); + log.error(result); out.write(result.getBytes(Constants.DEFAULT_CHARSET)); return; } @@ -78,32 +76,23 @@ public void createTopicHandler(HttpExchange httpExchange) throws IOException { //TBD: A new rocketmq service will be implemented for creating topics TopicResponse topicResponse = null; if (topicResponse != null) { - logger.info("create a new topic: {}", topic); + log.info("create a new topic: {}", topic); httpExchange.getResponseHeaders().add(CONTENT_TYPE, APPLICATION_JSON); - httpExchange.sendResponseHeaders(200, 0); - result = JsonUtils.toJson(topicResponse); - logger.info(result); + NetUtils.sendSuccessResponseHeaders(httpExchange); + result = JsonUtils.toJSONString(topicResponse); + log.info(result); out.write(result.getBytes(Constants.DEFAULT_CHARSET)); } else { httpExchange.sendResponseHeaders(500, 0); result = TOPIC_ERROR; - logger.error(result); + log.error(result); out.write(result.getBytes(Constants.DEFAULT_CHARSET)); } } catch (Exception e) { httpExchange.getResponseHeaders().add(CONTENT_TYPE, APPLICATION_JSON); httpExchange.sendResponseHeaders(500, 0); result = TOPIC_ERROR; - logger.error(result); - out.write(result.getBytes(Constants.DEFAULT_CHARSET)); - } finally { - if (out != null) { - try { - out.close(); - } catch (IOException e) { - logger.warn("out close failed...", e); - } - } + log.error(result, e); } } diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/response/TopicResponse.java b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/response/TopicResponse.java index 41b6e6a9b2..9ccdc2bb85 100644 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/response/TopicResponse.java +++ b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/response/TopicResponse.java @@ -27,7 +27,7 @@ public class TopicResponse { @JsonCreator public TopicResponse(@JsonProperty("topic") String topic, - @JsonProperty("created_time") String createdTime) { + @JsonProperty("created_time") String createdTime) { super(); this.topic = topic; this.createdTime = createdTime; @@ -56,8 +56,7 @@ public void setCreatedTime(String createdTime) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("TopicResponse {topic=" + this.topic + ","); - sb.append("created_time=" + this.createdTime + "}"); + sb.append("TopicResponse {topic=").append(this.topic).append(",").append("created_time=").append(this.createdTime).append("}"); return sb.toString(); } diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/JsonUtils.java b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/JsonUtils.java deleted file mode 100644 index 6fbd31a2dd..0000000000 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/JsonUtils.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.eventmesh.admin.rocketmq.util; - -import java.io.IOException; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; - -public class JsonUtils { - - private static ObjectMapper objectMapper; - - static { - objectMapper = new ObjectMapper(); - objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); - objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); - } - - public static byte[] serialize(String topic, Class data) throws JsonProcessingException { - if (data == null) { - return null; - } - return objectMapper.writeValueAsBytes(data); - } - - public static String toJson(Object obj) throws JsonProcessingException { - if (obj == null) { - return null; - } - return objectMapper.writeValueAsString(obj); - } - - public static T toObject(String json, Class clazz) throws JsonProcessingException { - return objectMapper.readValue(json, clazz); - } - - public static T deserialize(Class clazz, byte[] bytes) throws IOException { - if (bytes == null || bytes.length == 0) { - return null; - } - - return objectMapper.readValue(bytes, clazz); - } - - public static T deserialize(Class clazz, String json) throws IOException { - if (json == null || json.length() == 0) { - return null; - } - - return objectMapper.readValue(json, clazz); - } - - public static JsonNode getJsonNode(String json) throws IOException { - if (json == null || json.length() == 0) { - return null; - } - - return objectMapper.readTree(json); - } -} diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/NetUtils.java b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/NetUtils.java deleted file mode 100644 index 7a16bf74f8..0000000000 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/NetUtils.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.eventmesh.admin.rocketmq.util; - -import org.apache.eventmesh.admin.rocketmq.HttpMethod; - -import org.apache.http.Consts; - -import java.io.IOException; -import java.io.InputStreamReader; - -import com.sun.net.httpserver.HttpExchange; - -public class NetUtils { - - public static String parsePostBody(HttpExchange exchange) - throws IOException { - StringBuilder body = new StringBuilder(); - if (HttpMethod.POST.name().equalsIgnoreCase(exchange.getRequestMethod()) - || HttpMethod.PUT.name().equalsIgnoreCase(exchange.getRequestMethod())) { - try (InputStreamReader reader = - new InputStreamReader(exchange.getRequestBody(), Consts.UTF_8)) { - char[] buffer = new char[256]; - int read; - while ((read = reader.read(buffer)) != -1) { - body.append(buffer, 0, read); - } - } - } - return body.toString(); - } -} - diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/RequestMapping.java b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/RequestMapping.java index 6a67e05813..e796e49edc 100644 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/RequestMapping.java +++ b/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/util/RequestMapping.java @@ -17,7 +17,7 @@ package org.apache.eventmesh.admin.rocketmq.util; -import org.apache.eventmesh.admin.rocketmq.HttpMethod; +import org.apache.eventmesh.common.enums.HttpMethod; import com.sun.net.httpserver.HttpExchange; diff --git a/eventmesh-catalog-go/Makefile b/eventmesh-catalog-go/Makefile index 635e85740f..a51b0b1832 100644 --- a/eventmesh-catalog-go/Makefile +++ b/eventmesh-catalog-go/Makefile @@ -17,7 +17,7 @@ lint: golangci-lint run --tests=false build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${SERVER} + CGO_ENABLED=0 go build -o bin/eventmesh-catalog # goimports # -e report all errors (not just the first 10 on different lines) # -d display diffs instead of rewriting files diff --git a/eventmesh-catalog-go/api/catalog.go b/eventmesh-catalog-go/api/catalog.go index aafd92da2d..8f4a8fb502 100644 --- a/eventmesh-catalog-go/api/catalog.go +++ b/eventmesh-catalog-go/api/catalog.go @@ -17,17 +17,10 @@ package api import ( "context" - "fmt" "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/api/proto" - "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/constants" "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal" "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal/model" - "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/util" - "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/pkg/asyncapi" - v2 "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/pkg/asyncapi/v2" "github.com/gogf/gf/util/gconv" - "gorm.io/gorm" - "time" ) type catalogImpl struct { @@ -46,67 +39,21 @@ func (c *catalogImpl) Registry(ctx context.Context, request *proto.RegistryReque if len(request.Definition) == 0 { return rsp, nil } - var doc = new(v2.Document) - if err := v2.Decode(gconv.Bytes(request.Definition), &doc); err != nil { - return rsp, err - } - if len(doc.Channels()) == 0 { - return rsp, nil - } - if err := dal.GetDalClient().Transaction(func(tx *gorm.DB) error { - var handlers []func() error - for _, channel := range doc.Channels() { - for _, operation := range channel.Operations() { - var record = c.buildEventCatalog(request.FileName, channel, operation) - handlers = append(handlers, func() error { - return c.catalogDAL.Insert(context.Background(), tx, record) - }) - } - } - handlers = append(handlers, func() error { - return c.catalogDAL.InsertEvent(context.Background(), tx, c.buildEvent(request.FileName, - request.Definition, doc)) - }) - return util.GoAndWait(handlers...) - }); err != nil { + if err := c.catalogDAL.Save(ctx, &model.Event{Definition: request.Definition}); err != nil { return rsp, err } return rsp, nil } -func (c *catalogImpl) Query(ctx context.Context, in *proto.QueryRequest) (*proto.QueryResponse, error) { - var rsp = &proto.QueryResponse{} - res, err := c.catalogDAL.Select(ctx, in.OperationId) +func (c *catalogImpl) QueryOperations(ctx context.Context, in *proto.QueryOperationsRequest) (*proto. + QueryOperationsResponse, error) { + var rsp = &proto.QueryOperationsResponse{} + res, err := c.catalogDAL.SelectOperations(ctx, in.ServiceName, in.OperationId) if err != nil { return rsp, err } - rsp.Type = res.Type - rsp.ChannelName = res.ChannelName - rsp.Schema = res.Schema + if err = gconv.Structs(res, &rsp.Operations); err != nil { + return nil, err + } return rsp, nil } - -func (c *catalogImpl) buildEventCatalog(fileName string, channel asyncapi.Channel, - operation asyncapi.Operation) *model.EventCatalog { - var record model.EventCatalog - record.OperationID = fmt.Sprintf("file://%s#%s", fileName, operation.ID()) - record.ChannelName = channel.ID() - record.Type = string(operation.Type()) - record.Status = constants.NormalStatus - record.CreateTime = time.Now() - record.UpdateTime = time.Now() - record.Schema = gconv.String(operation.Messages()[0].Payload()) - return &record -} - -func (c *catalogImpl) buildEvent(fileName string, definition string, doc asyncapi.Document) *model.Event { - var record model.Event - record.Title = doc.Info().Title() - record.FileName = fileName - record.Definition = definition - record.Status = constants.NormalStatus - record.Version = doc.Info().Version() - record.CreateTime = time.Now() - record.UpdateTime = time.Now() - return &record -} diff --git a/eventmesh-catalog-go/api/proto/catalog.pb.go b/eventmesh-catalog-go/api/proto/catalog.pb.go index ad92234515..774380c8b9 100644 --- a/eventmesh-catalog-go/api/proto/catalog.pb.go +++ b/eventmesh-catalog-go/api/proto/catalog.pb.go @@ -129,16 +129,17 @@ func (*RegistryResponse) Descriptor() ([]byte, []int) { return file_catalog_proto_rawDescGZIP(), []int{1} } -type QueryRequest struct { +type QueryOperationsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + OperationId string `protobuf:"bytes,2,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` } -func (x *QueryRequest) Reset() { - *x = QueryRequest{} +func (x *QueryOperationsRequest) Reset() { + *x = QueryOperationsRequest{} if protoimpl.UnsafeEnabled { mi := &file_catalog_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -146,13 +147,13 @@ func (x *QueryRequest) Reset() { } } -func (x *QueryRequest) String() string { +func (x *QueryOperationsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryRequest) ProtoMessage() {} +func (*QueryOperationsRequest) ProtoMessage() {} -func (x *QueryRequest) ProtoReflect() protoreflect.Message { +func (x *QueryOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_catalog_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -164,19 +165,26 @@ func (x *QueryRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. -func (*QueryRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryOperationsRequest.ProtoReflect.Descriptor instead. +func (*QueryOperationsRequest) Descriptor() ([]byte, []int) { return file_catalog_proto_rawDescGZIP(), []int{2} } -func (x *QueryRequest) GetOperationId() string { +func (x *QueryOperationsRequest) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *QueryOperationsRequest) GetOperationId() string { if x != nil { return x.OperationId } return "" } -type QueryResponse struct { +type Operation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -187,8 +195,8 @@ type QueryResponse struct { Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` } -func (x *QueryResponse) Reset() { - *x = QueryResponse{} +func (x *Operation) Reset() { + *x = Operation{} if protoimpl.UnsafeEnabled { mi := &file_catalog_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -196,13 +204,13 @@ func (x *QueryResponse) Reset() { } } -func (x *QueryResponse) String() string { +func (x *Operation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryResponse) ProtoMessage() {} +func (*Operation) ProtoMessage() {} -func (x *QueryResponse) ProtoReflect() protoreflect.Message { +func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_catalog_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -214,32 +222,79 @@ func (x *QueryResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. -func (*QueryResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { return file_catalog_proto_rawDescGZIP(), []int{3} } -func (x *QueryResponse) GetChannelName() string { +func (x *Operation) GetChannelName() string { if x != nil { return x.ChannelName } return "" } -func (x *QueryResponse) GetSchema() string { +func (x *Operation) GetSchema() string { if x != nil { return x.Schema } return "" } -func (x *QueryResponse) GetType() string { +func (x *Operation) GetType() string { if x != nil { return x.Type } return "" } +type QueryOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *QueryOperationsResponse) Reset() { + *x = QueryOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_catalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryOperationsResponse) ProtoMessage() {} + +func (x *QueryOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_catalog_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryOperationsResponse.ProtoReflect.Descriptor instead. +func (*QueryOperationsResponse) Descriptor() ([]byte, []int) { + return file_catalog_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryOperationsResponse) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + var File_catalog_proto protoreflect.FileDescriptor var file_catalog_proto_rawDesc = []byte{ @@ -252,35 +307,51 @@ var file_catalog_proto_rawDesc = []byte{ 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0xe2, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x12, 0x6f, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x2f, + 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x64, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x81, 0x02, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x12, 0x6f, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x2f, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x46, 0x5a, 0x44, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, - 0x2f, 0x69, 0x6e, 0x63, 0x75, 0x62, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x63, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x84, 0x01, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x93, 0x01, 0x0a, 0x33, 0x6f, 0x72, + 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x42, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x47, 0x72, 0x70, 0x63, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x69, 0x6e, 0x63, + 0x75, 0x62, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, + 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -295,23 +366,25 @@ func file_catalog_proto_rawDescGZIP() []byte { return file_catalog_proto_rawDescData } -var file_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_catalog_proto_goTypes = []interface{}{ - (*RegistryRequest)(nil), // 0: eventmesh.catalog.api.protocol.RegistryRequest - (*RegistryResponse)(nil), // 1: eventmesh.catalog.api.protocol.RegistryResponse - (*QueryRequest)(nil), // 2: eventmesh.catalog.api.protocol.QueryRequest - (*QueryResponse)(nil), // 3: eventmesh.catalog.api.protocol.QueryResponse + (*RegistryRequest)(nil), // 0: eventmesh.catalog.api.protocol.RegistryRequest + (*RegistryResponse)(nil), // 1: eventmesh.catalog.api.protocol.RegistryResponse + (*QueryOperationsRequest)(nil), // 2: eventmesh.catalog.api.protocol.QueryOperationsRequest + (*Operation)(nil), // 3: eventmesh.catalog.api.protocol.Operation + (*QueryOperationsResponse)(nil), // 4: eventmesh.catalog.api.protocol.QueryOperationsResponse } var file_catalog_proto_depIdxs = []int32{ - 0, // 0: eventmesh.catalog.api.protocol.Catalog.Registry:input_type -> eventmesh.catalog.api.protocol.RegistryRequest - 2, // 1: eventmesh.catalog.api.protocol.Catalog.Query:input_type -> eventmesh.catalog.api.protocol.QueryRequest - 1, // 2: eventmesh.catalog.api.protocol.Catalog.Registry:output_type -> eventmesh.catalog.api.protocol.RegistryResponse - 3, // 3: eventmesh.catalog.api.protocol.Catalog.Query:output_type -> eventmesh.catalog.api.protocol.QueryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 3, // 0: eventmesh.catalog.api.protocol.QueryOperationsResponse.operations:type_name -> eventmesh.catalog.api.protocol.Operation + 0, // 1: eventmesh.catalog.api.protocol.Catalog.Registry:input_type -> eventmesh.catalog.api.protocol.RegistryRequest + 2, // 2: eventmesh.catalog.api.protocol.Catalog.QueryOperations:input_type -> eventmesh.catalog.api.protocol.QueryOperationsRequest + 1, // 3: eventmesh.catalog.api.protocol.Catalog.Registry:output_type -> eventmesh.catalog.api.protocol.RegistryResponse + 4, // 4: eventmesh.catalog.api.protocol.Catalog.QueryOperations:output_type -> eventmesh.catalog.api.protocol.QueryOperationsResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_catalog_proto_init() } @@ -345,7 +418,7 @@ func file_catalog_proto_init() { } } file_catalog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRequest); i { + switch v := v.(*QueryOperationsRequest); i { case 0: return &v.state case 1: @@ -357,7 +430,19 @@ func file_catalog_proto_init() { } } file_catalog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResponse); i { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_catalog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryOperationsResponse); i { case 0: return &v.state case 1: @@ -375,7 +460,7 @@ func file_catalog_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_catalog_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/eventmesh-catalog-go/api/proto/catalog.proto b/eventmesh-catalog-go/api/proto/catalog.proto index 96696f279d..a5633d91e6 100644 --- a/eventmesh-catalog-go/api/proto/catalog.proto +++ b/eventmesh-catalog-go/api/proto/catalog.proto @@ -19,11 +19,15 @@ syntax = "proto3"; package eventmesh.catalog.api.protocol; +option java_multiple_files = true; +option java_package="org.apache.eventmesh.common.protocol.catalog.protos"; +option java_outer_classname = "EventmeshCatalogGrpc"; + option go_package = "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/api/proto"; service Catalog { rpc Registry (RegistryRequest) returns (RegistryResponse) {} - rpc Query (QueryRequest) returns (QueryResponse) {} + rpc QueryOperations (QueryOperationsRequest) returns (QueryOperationsResponse) {} } message RegistryRequest { @@ -34,13 +38,18 @@ message RegistryRequest { message RegistryResponse { } -message QueryRequest { - string operation_id = 1; +message QueryOperationsRequest { + string service_name = 1; + string operation_id = 2; } -message QueryResponse { +message Operation { string channel_name = 1; string schema = 2; // publish/subscribe string type = 3; +} + +message QueryOperationsResponse { + repeated Operation operations = 1; } \ No newline at end of file diff --git a/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go b/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go index dbd4ec150f..a740cd9402 100644 --- a/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go +++ b/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go @@ -39,7 +39,7 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type CatalogClient interface { Registry(ctx context.Context, in *RegistryRequest, opts ...grpc.CallOption) (*RegistryResponse, error) - Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) + QueryOperations(ctx context.Context, in *QueryOperationsRequest, opts ...grpc.CallOption) (*QueryOperationsResponse, error) } type catalogClient struct { @@ -59,9 +59,9 @@ func (c *catalogClient) Registry(ctx context.Context, in *RegistryRequest, opts return out, nil } -func (c *catalogClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { - out := new(QueryResponse) - err := c.cc.Invoke(ctx, "/eventmesh.catalog.api.protocol.Catalog/Query", in, out, opts...) +func (c *catalogClient) QueryOperations(ctx context.Context, in *QueryOperationsRequest, opts ...grpc.CallOption) (*QueryOperationsResponse, error) { + out := new(QueryOperationsResponse) + err := c.cc.Invoke(ctx, "/eventmesh.catalog.api.protocol.Catalog/QueryOperations", in, out, opts...) if err != nil { return nil, err } @@ -73,7 +73,7 @@ func (c *catalogClient) Query(ctx context.Context, in *QueryRequest, opts ...grp // for forward compatibility type CatalogServer interface { Registry(context.Context, *RegistryRequest) (*RegistryResponse, error) - Query(context.Context, *QueryRequest) (*QueryResponse, error) + QueryOperations(context.Context, *QueryOperationsRequest) (*QueryOperationsResponse, error) mustEmbedUnimplementedCatalogServer() } @@ -84,8 +84,8 @@ type UnimplementedCatalogServer struct { func (UnimplementedCatalogServer) Registry(context.Context, *RegistryRequest) (*RegistryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Registry not implemented") } -func (UnimplementedCatalogServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") +func (UnimplementedCatalogServer) QueryOperations(context.Context, *QueryOperationsRequest) (*QueryOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryOperations not implemented") } func (UnimplementedCatalogServer) mustEmbedUnimplementedCatalogServer() {} @@ -118,20 +118,20 @@ func _Catalog_Registry_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Catalog_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) +func _Catalog_QueryOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOperationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(CatalogServer).Query(ctx, in) + return srv.(CatalogServer).QueryOperations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/eventmesh.catalog.api.protocol.Catalog/Query", + FullMethod: "/eventmesh.catalog.api.protocol.Catalog/QueryOperations", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CatalogServer).Query(ctx, req.(*QueryRequest)) + return srv.(CatalogServer).QueryOperations(ctx, req.(*QueryOperationsRequest)) } return interceptor(ctx, in, info, handler) } @@ -148,8 +148,8 @@ var Catalog_ServiceDesc = grpc.ServiceDesc{ Handler: _Catalog_Registry_Handler, }, { - MethodName: "Query", - Handler: _Catalog_Query_Handler, + MethodName: "QueryOperations", + Handler: _Catalog_QueryOperations_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/eventmesh-catalog-go/bin/start-catalog.sh b/eventmesh-catalog-go/bin/start-catalog.sh new file mode 100644 index 0000000000..3a4821e9af --- /dev/null +++ b/eventmesh-catalog-go/bin/start-catalog.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +CATALOG_HOME=`cd $(dirname $0)/.. && pwd` +export CATALOG_HOME +export CATALOG_LOG_HOME=${CATALOG_HOME}/logs +echo "CATALOG_HOME : ${CATALOG_HOME}, CATALOG_LOG_HOME : ${CATALOG_LOG_HOME}" + +serverLogFile=${CATALOG_HOME}/logs/catalog.log +serverHistoryLogFile=${CATALOG_HOME}/catalogHistory.log +pidConf=${CATALOG_HOME}/bin/pid.conf +serverName="eventmesh-catalog" +startScriptName="start-catalog.sh" + +function make_logs_dir { + if [ ! -e "${CATALOG_LOG_HOME}" ]; then mkdir -p "${CATALOG_LOG_HOME}"; fi +} + +make_logs_dir + +#check process +num=`ps -ef |grep ${serverName} |grep -v grep|wc -l` +echo "`date` the num of process is $num" +if [ $num -gt 0 ];then + echo "the process is exist now " + exit 0 +fi + +#start process +nohup ./${serverName} 2>&1 | tee $serverLogFile>>$serverHistoryLogFile 2>&1 & +sleep 3 + +num=`ps -ef | grep ${serverName} | grep -v grep | wc -l` +echo "the num of process after start is $num" +if [ $num -lt 1 ];then + echo "the process is not exit after start " + exit 9 +fi + +pid=`ps -ef |grep ${serverName} |grep -v grep|head -n 1 |awk '{print $2}'` +echo $pid>$pidConf +exit 0 \ No newline at end of file diff --git a/eventmesh-catalog-go/bin/stop-catalog.sh b/eventmesh-catalog-go/bin/stop-catalog.sh new file mode 100644 index 0000000000..c634172a2d --- /dev/null +++ b/eventmesh-catalog-go/bin/stop-catalog.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +serverName="eventmesh-catalog" + +#stop process +pidInfo=$(ps -ef | grep ${serverName} | grep -v grep | awk '{print $2}') +echo "`date` the pid info is $pidInfo" + +for pid in $pidInfo;do + kill -9 $pid +done + +sleep 3 + +#check process num +num=$(ps -ef | grep ${serverName} | grep -v grep |wc -l) + +if [ $num -gt 0 ];then + echo "`date` after stop process in force way the processNum is $num still bigger than 0" + exit 9 +fi +exit 0 \ No newline at end of file diff --git a/eventmesh-catalog-go/cmd/controller/catalog.go b/eventmesh-catalog-go/cmd/controller/catalog.go new file mode 100644 index 0000000000..9339f10a35 --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/catalog.go @@ -0,0 +1,117 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal" + "github.com/gin-gonic/gin" + "github.com/gogf/gf/util/gconv" + "net/http" +) + +const ( + eventIDParam = "eventId" +) + +// CatalogController workflow controller operations +type CatalogController struct { + catalogDAL dal.CatalogDAL +} + +func NewCatalogController() *CatalogController { + c := CatalogController{} + c.catalogDAL = dal.NewCatalogDAL() + return &c +} + +// Save save event catalog data +// @Summary save event catalog +// @Description save event catalog +// @Tags Catalog +// @Accept json +// @Produce json +// @Param request body SaveEventRequest true "event catalog data" +// @Success 200 +// @Failure 400 +// @Failure 404 +// @Failure 500 +// @Router /catalog [post] +func (c *CatalogController) Save(ctx *gin.Context) { + request := SaveEventRequest{} + if err := ctx.ShouldBind(&request); err != nil { + ctx.JSON(http.StatusBadRequest, err.Error()) + return + } + if err := c.catalogDAL.Save(ctx, &request.Event); err != nil { + ctx.JSON(http.StatusInternalServerError, err.Error()) + return + } + ctx.JSON(http.StatusOK, nil) +} + +// QueryList query event catalog list +// @Summary query event catalog list +// @Description query event catalog list +// @Tags Catalog +// @Accept json +// @Produce json +// @Param page query string false "query page" +// @Param size query string false "query size" +// @Success 200 {object} QueryEventsResponse +// @Failure 400 +// @Failure 404 +// @Failure 500 +// @Router /catalog [get] +func (c *CatalogController) QueryList(ctx *gin.Context) { + request := QueryEventsRequest{} + if err := ctx.ShouldBind(&request); err != nil { + ctx.JSON(http.StatusBadRequest, err.Error()) + return + } + res, total, err := c.catalogDAL.SelectList(ctx, request.Page, request.Size) + if err != nil { + ctx.JSON(http.StatusInternalServerError, err.Error()) + return + } + ctx.JSON(http.StatusOK, &QueryEventsResponse{Total: total, Events: res}) +} + +// QueryDetail query event catalog detail info +// @Summary query event catalog detail info +// @Description query event catalog detail info +// @Tags Catalog +// @Accept json +// @Produce json +// @Param eventId path string true "event id" +// @Success 200 {object} QueryEventResponse +// @Failure 400 +// @Failure 404 +// @Failure 500 +// @Router /catalog/{eventId} [get] +func (c *CatalogController) QueryDetail(ctx *gin.Context) { + eventID := gconv.Int(ctx.Param(eventIDParam)) + res, err := c.catalogDAL.Select(ctx, eventID) + if err != nil { + ctx.JSON(http.StatusInternalServerError, err.Error()) + return + } + if res == nil { + ctx.JSON(http.StatusOK, nil) + return + } + ctx.JSON(http.StatusOK, &QueryEventResponse{Event: *res}) + return +} diff --git a/eventmesh-catalog-go/cmd/controller/docs/docs.go b/eventmesh-catalog-go/cmd/controller/docs/docs.go new file mode 100644 index 0000000000..05c922a13e --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/docs/docs.go @@ -0,0 +1,242 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package docs GENERATED BY SWAG; DO NOT EDIT +// This file was generated by swaggo/swag +package docs + +import "github.com/swaggo/swag" + +const docTemplate = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{escape .Description}}", + "title": "{{.Title}}", + "contact": {}, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/catalog": { + "get": { + "description": "query event catalog list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Catalog" + ], + "summary": "query event catalog list", + "parameters": [ + { + "type": "string", + "description": "query page", + "name": "page", + "in": "query" + }, + { + "type": "string", + "description": "query size", + "name": "size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/main.QueryEventsResponse" + } + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "post": { + "description": "save event catalog", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Catalog" + ], + "summary": "save event catalog", + "parameters": [ + { + "description": "event catalog data", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/main.SaveEventRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/catalog/{eventId}": { + "get": { + "description": "query event catalog detail info", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Catalog" + ], + "summary": "query event catalog detail info", + "parameters": [ + { + "type": "string", + "description": "event id", + "name": "eventId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/main.QueryEventResponse" + } + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + }, + "definitions": { + "main.QueryEventResponse": { + "type": "object", + "properties": { + "event": { + "$ref": "#/definitions/model.Event" + } + } + }, + "main.QueryEventsResponse": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Event" + } + }, + "total": { + "description": "total count", + "type": "integer" + } + } + }, + "main.SaveEventRequest": { + "type": "object", + "properties": { + "event": { + "$ref": "#/definitions/model.Event" + } + } + }, + "model.Event": { + "type": "object", + "properties": { + "create_time": { + "type": "string" + }, + "definition": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + } +}` + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = &swag.Spec{ + Version: "1.0", + Host: "", + BasePath: "", + Schemes: []string{}, + Title: "Event Catalog API", + Description: "This is a event catalog server.", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, +} + +func init() { + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) +} diff --git a/eventmesh-catalog-go/cmd/controller/docs/swagger.json b/eventmesh-catalog-go/cmd/controller/docs/swagger.json new file mode 100644 index 0000000000..f1aa471326 --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/docs/swagger.json @@ -0,0 +1,217 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +{ + "swagger": "2.0", + "info": { + "description": "This is a event catalog server.", + "title": "Event Catalog API", + "contact": {}, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0" + }, + "paths": { + "/catalog": { + "get": { + "description": "query event catalog list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Catalog" + ], + "summary": "query event catalog list", + "parameters": [ + { + "type": "string", + "description": "query page", + "name": "page", + "in": "query" + }, + { + "type": "string", + "description": "query size", + "name": "size", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/main.QueryEventsResponse" + } + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "post": { + "description": "save event catalog", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Catalog" + ], + "summary": "save event catalog", + "parameters": [ + { + "description": "event catalog data", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/main.SaveEventRequest" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/catalog/{eventId}": { + "get": { + "description": "query event catalog detail info", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Catalog" + ], + "summary": "query event catalog detail info", + "parameters": [ + { + "type": "string", + "description": "event id", + "name": "eventId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/main.QueryEventResponse" + } + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + }, + "definitions": { + "main.QueryEventResponse": { + "type": "object", + "properties": { + "event": { + "$ref": "#/definitions/model.Event" + } + } + }, + "main.QueryEventsResponse": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/model.Event" + } + }, + "total": { + "description": "total count", + "type": "integer" + } + } + }, + "main.SaveEventRequest": { + "type": "object", + "properties": { + "event": { + "$ref": "#/definitions/model.Event" + } + } + }, + "model.Event": { + "type": "object", + "properties": { + "create_time": { + "type": "string" + }, + "definition": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "status": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/eventmesh-catalog-go/cmd/controller/docs/swagger.yaml b/eventmesh-catalog-go/cmd/controller/docs/swagger.yaml new file mode 100644 index 0000000000..2984b7ec4d --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/docs/swagger.yaml @@ -0,0 +1,148 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +definitions: + main.QueryEventResponse: + properties: + event: + $ref: '#/definitions/model.Event' + type: object + main.QueryEventsResponse: + properties: + events: + items: + $ref: '#/definitions/model.Event' + type: array + total: + description: total count + type: integer + type: object + main.SaveEventRequest: + properties: + event: + $ref: '#/definitions/model.Event' + type: object + model.Event: + properties: + create_time: + type: string + definition: + type: string + file_name: + type: string + id: + type: integer + status: + type: integer + title: + type: string + update_time: + type: string + version: + type: string + type: object +info: + contact: {} + description: This is a event catalog server. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Event Catalog API + version: "1.0" +paths: + /catalog: + get: + consumes: + - application/json + description: query event catalog list + parameters: + - description: query page + in: query + name: page + type: string + - description: query size + in: query + name: size + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/main.QueryEventsResponse' + "400": + description: Bad Request + "404": + description: Not Found + "500": + description: Internal Server Error + summary: query event catalog list + tags: + - Catalog + post: + consumes: + - application/json + description: save event catalog + parameters: + - description: event catalog data + in: body + name: request + required: true + schema: + $ref: '#/definitions/main.SaveEventRequest' + produces: + - application/json + responses: + "200": + description: OK + "400": + description: Bad Request + "404": + description: Not Found + "500": + description: Internal Server Error + summary: save event catalog + tags: + - Catalog + /catalog/{eventId}: + get: + consumes: + - application/json + description: query event catalog detail info + parameters: + - description: event id + in: path + name: eventId + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/main.QueryEventResponse' + "400": + description: Bad Request + "404": + description: Not Found + "500": + description: Internal Server Error + summary: query event catalog detail info + tags: + - Catalog +swagger: "2.0" diff --git a/eventmesh-catalog-go/cmd/controller/main.go b/eventmesh-catalog-go/cmd/controller/main.go new file mode 100644 index 0000000000..fd38c038c9 --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/main.go @@ -0,0 +1,119 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "fmt" + _ "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/cmd/controller/docs" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/util" + "github.com/apache/incubator-eventmesh/eventmesh-server-go/config" + "github.com/gin-gonic/gin" + swaggerFiles "github.com/swaggo/files" + ginSwagger "github.com/swaggo/gin-swagger" + "log" + "net/http" +) + +type Server struct { + server *gin.Engine + catalog *CatalogController +} + +// @title Event Catalog API +// @version 1.0 +// @description This is a event catalog server. + +// @license.name Apache 2.0 +// @license.url http://www.apache.org/licenses/LICENSE-2.0.html +func main() { + s, err := initServer() + if err != nil { + log.Fatal("new server fail: " + err.Error()) + } + s.router() + if err := s.run(); err != nil { + log.Fatal("run server fail: " + err.Error()) + } +} + +func initServer() (*Server, error) { + var s Server + if err := s.setupConfig(); err != nil { + return nil, err + } + if err := dal.Open(); err != nil { + return nil, err + } + r := gin.New() + r.Use(cors()).Use(gin.Recovery()) + swagger(r) + s.server = r + s.catalog = NewCatalogController() + return &s, nil +} + +func cors() gin.HandlerFunc { + return func(c *gin.Context) { + method := c.Request.Method + origin := c.Request.Header.Get("Origin") + if origin != "" { + c.Header("Access-Control-Allow-Origin", "*") + c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE") + c.Header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, "+ + "Authorization") + c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, "+ + "Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type") + c.Header("Access-Control-Allow-Credentials", "true") + } + if method == "OPTIONS" { + c.AbortWithStatus(http.StatusNoContent) + } + c.Next() + } +} + +func swagger(r *gin.Engine) { + r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) +} + +func (s *Server) router() { + s.server.POST("/catalog", s.catalog.Save) + s.server.GET("/catalog", s.catalog.QueryList) + s.server.GET("/catalog/:eventId", s.catalog.QueryDetail) +} + +func (s *Server) setupConfig() error { + config.ServerConfigPath = "./configs/controller.yaml" + // compatible local environment + if !util.Exists(config.ServerConfigPath) { + config.ServerConfigPath = "../configs/controller.yaml" + } + // compatible deploy environment + if !util.Exists(config.ServerConfigPath) { + config.ServerConfigPath = "../conf/controller.yaml" + } + cfg, err := config.LoadConfig(config.ServerConfigPath) + if err != nil { + return err + } + config.SetGlobalConfig(cfg) + return config.Setup(cfg) +} + +func (s *Server) run() error { + return s.server.Run(fmt.Sprintf(":%d", config.GlobalConfig().Server.Port)) +} diff --git a/eventmesh-catalog-go/cmd/controller/request.go b/eventmesh-catalog-go/cmd/controller/request.go new file mode 100644 index 0000000000..165a0a9f03 --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/request.go @@ -0,0 +1,29 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal/model" + +// SaveEventRequest save event request body +type SaveEventRequest struct { + Event model.Event `json:"event"` +} + +// QueryEventsRequest query events request body +type QueryEventsRequest struct { + Page int `form:"page" json:"page"` // page num + Size int `form:"size" json:"size"` // page size +} diff --git a/eventmesh-catalog-go/cmd/controller/response.go b/eventmesh-catalog-go/cmd/controller/response.go new file mode 100644 index 0000000000..00740e3c46 --- /dev/null +++ b/eventmesh-catalog-go/cmd/controller/response.go @@ -0,0 +1,29 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal/model" + +// QueryEventsResponse query events response data +type QueryEventsResponse struct { + Events []model.Event `json:"events"` + Total int `json:"total"` // total count +} + +// QueryEventResponse query event detail response data +type QueryEventResponse struct { + Event model.Event `json:"event"` +} diff --git a/eventmesh-catalog-go/configs/catalog.yaml b/eventmesh-catalog-go/configs/catalog.yaml index d9a0a7647a..910fb63806 100644 --- a/eventmesh-catalog-go/configs/catalog.yaml +++ b/eventmesh-catalog-go/configs/catalog.yaml @@ -15,15 +15,15 @@ # limitations under the License. server: - port: 11012 - name: "eventmesh-catalog" + port: 12012 + name: "EVENTMESH-catalog" plugins: registry: nacos: - address_list: "9.135.90.236:8848" + address_list: "127.0.0.1:8848" selector: nacos: - address_list: "9.135.90.236:8848" + address_list: "127.0.0.1:8848" database: mysql: dsn: "root:123456@(127.0.0.1:3306)/db_catalog?charset=utf8&parseTime=True&loc=Local" @@ -31,14 +31,14 @@ plugins: max_open: 100 max_lifetime: 180000 log: - default: - - writer: console - level: debug - - writer: file - level: info + default: + - writer: console + level: debug + - writer: file + level: info writer_config: filename: ./catalog.log - max_size: 10 - max_backups: 10 - max_age: 7 + max_size: 10 + max_backups: 10 + max_age: 7 compress: false \ No newline at end of file diff --git a/eventmesh-catalog-go/configs/controller.yaml b/eventmesh-catalog-go/configs/controller.yaml new file mode 100644 index 0000000000..6c922f9d43 --- /dev/null +++ b/eventmesh-catalog-go/configs/controller.yaml @@ -0,0 +1,35 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +server: + port: 12013 +plugins: + database: + mysql: + dsn: "root:123456@(127.0.0.1:3306)/db_catalog?charset=utf8&parseTime=True&loc=Local" + max_idle: 50 + max_open: 100 + max_lifetime: 180000 + log: + default: + - writer: file + level: info + writer_config: + filename: ./workflow.log + max_size: 10 + max_backups: 10 + max_age: 7 + compress: false \ No newline at end of file diff --git a/eventmesh-catalog-go/configs/testexpress.yaml b/eventmesh-catalog-go/configs/testexpress.yaml new file mode 100644 index 0000000000..f7b1726461 --- /dev/null +++ b/eventmesh-catalog-go/configs/testexpress.yaml @@ -0,0 +1,40 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +asyncapi: 2.3.0 +info: + title: expressapp + version: '0.1.0' +channels: + express/create: + publish: + operationId: sendExpress + message: + $ref: '#/components/messages/Order' + subscribe: + operationId: receiveExpress + message: + $ref: '#/components/messages/Order' +components: + messages: + Order: + payload: + type: object + properties: + orderNo: + type: string + Amount: + type: string \ No newline at end of file diff --git a/eventmesh-catalog-go/configs/testorder.yaml b/eventmesh-catalog-go/configs/testorder.yaml new file mode 100644 index 0000000000..9a00efbc6a --- /dev/null +++ b/eventmesh-catalog-go/configs/testorder.yaml @@ -0,0 +1,40 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +asyncapi: 2.3.0 +info: + title: orderapp + version: '0.1.0' +channels: + order/create: + publish: + operationId: sendOrder + message: + $ref: '#/components/messages/Order' + subscribe: + operationId: receiveOrder + message: + $ref: '#/components/messages/Order' +components: + messages: + Order: + payload: + type: object + properties: + orderNo: + type: string + Amount: + type: string \ No newline at end of file diff --git a/eventmesh-catalog-go/configs/testpayment.yaml b/eventmesh-catalog-go/configs/testpayment.yaml new file mode 100644 index 0000000000..2525f27a4e --- /dev/null +++ b/eventmesh-catalog-go/configs/testpayment.yaml @@ -0,0 +1,40 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +asyncapi: 2.3.0 +info: + title: paymentapp + version: '0.1.0' +channels: + payment/create: + publish: + operationId: sendPayment + message: + $ref: '#/components/messages/Order' + subscribe: + operationId: receivePayment + message: + $ref: '#/components/messages/Order' +components: + messages: + Order: + payload: + type: object + properties: + orderNo: + type: string + Amount: + type: string \ No newline at end of file diff --git a/eventmesh-catalog-go/distribution/mysql-schema.sql b/eventmesh-catalog-go/distribution/mysql-schema.sql new file mode 100644 index 0000000000..f79e945584 --- /dev/null +++ b/eventmesh-catalog-go/distribution/mysql-schema.sql @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +create database if not exists db_catalog; + +use db_catalog; + +create table if not exists t_event +( + id int auto_increment comment '主键、自增' + primary key, + title varchar(1024) not null, + file_name varchar(1024) not null, + definition text not null, + status int not null, + version varchar(64) not null, + create_time datetime default CURRENT_TIMESTAMP not null, + update_time datetime default CURRENT_TIMESTAMP not null, + index `index_title` (title) +) + collate = utf8mb3_bin; + +create table if not exists t_event_catalog +( + id int auto_increment comment '主键、自增' + primary key, + service_name varchar(256) default '' not null comment '服务名称', + operation_id varchar(1024) not null, + channel_name varchar(1024) not null, + type varchar(1024) not null, + `schema` text not null, + status int not null, + create_time datetime default CURRENT_TIMESTAMP not null, + update_time datetime default CURRENT_TIMESTAMP not null, + index `index_service_name` (service_name), + index `index_channel_name` (channel_name), + index `index_operation_id` (operation_id) + ) + collate = utf8mb3_bin; + diff --git a/eventmesh-catalog-go/go.mod b/eventmesh-catalog-go/go.mod index bdf2cb10de..96a9d974a8 100644 --- a/eventmesh-catalog-go/go.mod +++ b/eventmesh-catalog-go/go.mod @@ -23,52 +23,78 @@ require ( github.com/gogf/gf v1.16.9 github.com/mitchellh/mapstructure v1.5.0 github.com/pkg/errors v0.9.1 - google.golang.org/grpc v1.36.1 - google.golang.org/protobuf v1.28.0 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 gorm.io/driver/mysql v1.3.5 gorm.io/gorm v1.23.8 ) require ( - github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect + github.com/KyleBanks/depth v1.2.1 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect github.com/asyncapi/converter-go v0.0.0-20190802111537-d8459b2bd403 // indirect github.com/asyncapi/spec-json-schemas/v2 v2.14.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect - github.com/go-errors/errors v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/swag v0.19.15 // indirect + github.com/go-playground/locales v0.14.0 // indirect + github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/validator/v10 v10.11.1 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect - github.com/golang/mock v1.3.1 // indirect + github.com/goccy/go-json v0.9.11 // indirect + github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect - github.com/json-iterator/go v1.1.11 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/leodido/go-urn v1.2.1 // indirect github.com/lestrrat-go/strftime v1.0.6 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect - github.com/nacos-group/nacos-sdk-go/v2 v2.0.3 // indirect - github.com/prometheus/client_golang v1.11.0 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/prometheus/client_golang v1.12.2 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.26.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/ugorji/go/codec v1.2.7 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190809123943-df4f5c81cb3b // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.22.0 // indirect - golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/ini.v1 v1.42.0 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect + golang.org/x/tools v0.1.12 // indirect + google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect + gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +require ( + github.com/gin-gonic/gin v1.8.2 + github.com/nacos-group/nacos-sdk-go/v2 v2.0.4 // indirect + github.com/swaggo/files v1.0.0 + github.com/swaggo/gin-swagger v1.5.3 + github.com/swaggo/swag v1.8.9 +) diff --git a/eventmesh-catalog-go/go.sum b/eventmesh-catalog-go/go.sum index 1a2bb2f835..6d08265973 100644 --- a/eventmesh-catalog-go/go.sum +++ b/eventmesh-catalog-go/go.sum @@ -1,14 +1,54 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFmb7mUnp8nH9fQBA= -github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 h1:PpfENOj/vPfhhy9N2OFRjpue0hjM5XqAp2thFmkXXIk= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/incubator-eventmesh/eventmesh-server-go v0.0.0-20220812021948-0945ab92daea h1:2HgaPliO/+mIcOEY3YXIv+uTyZK+TjXzm+P9rYxACh0= github.com/apache/incubator-eventmesh/eventmesh-server-go v0.0.0-20220812021948-0945ab92daea/go.mod h1:Z0G6PXEFojRm73fadnqMFuPcaTdIr5s8Bgq/PCKOu40= github.com/asyncapi/converter-go v0.0.0-20190802111537-d8459b2bd403 h1:HhobldPK/8Cnhliwl744pXSfyjtF956/vOJLyJ8mrXk= @@ -18,6 +58,7 @@ github.com/asyncapi/parser-go v0.4.2/go.mod h1:5iAT+irO9xKeBDnIhqT0ev8QJH1dHq4i2 github.com/asyncapi/spec-json-schemas/v2 v2.14.0 h1:t5Frb4WzaV2bTlcRqXhBdvqTjO6+n/oiPMjvCxYooag= github.com/asyncapi/spec-json-schemas/v2 v2.14.0/go.mod h1:5lFCFtRGfI3WVOla4slifjgPs9x79FY0fqZjgNL495c= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -25,15 +66,22 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clbanning/mxj v1.8.5-0.20200714211355-ff02cfb8ea28 h1:LdXxtjzvZYhhUaonAaAKArG3pyC67kGL3YY+6hGG8G4= github.com/clbanning/mxj v1.8.5-0.20200714211355-ff02cfb8ea28/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -41,36 +89,81 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= +github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/gin-gonic/gin v1.8.2 h1:UzKToD9/PoFj/V4rvlKqTRKnQYyz8Sc1MJlv4JHPtvY= +github.com/gin-gonic/gin v1.8.2/go.mod h1:qw5AYuDrzRTnhvusDsrov+fDIxp9Dleuu12h8nfB398= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogf/gf v1.16.9 h1:Q803UmmRo59+Ws08sMVFOcd8oNpkSWL9vS33hlo/Cyk= github.com/gogf/gf v1.16.9/go.mod h1:8Q/kw05nlVRp+4vv7XASBsMe9L1tsVKiGoeP2AHnlkk= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -84,31 +177,49 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc= github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grokify/html-strip-tags-go v0.0.1 h1:0fThFwLbW7P/kOiTBs03FsJSV9RM2M/Q/MOnCQxKMo0= github.com/grokify/html-strip-tags-go v0.0.1/go.mod h1:2Su6romC5/1VXOQMaWL2yb618ARB8iVo6/DR99A6d78= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= @@ -117,13 +228,17 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -132,20 +247,29 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -156,12 +280,14 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nacos-group/nacos-sdk-go/v2 v2.0.3 h1:wNaSObv2wNFyMQird3vPc4XaaeNYPT6s8Oqu7GxCbRw= -github.com/nacos-group/nacos-sdk-go/v2 v2.0.3/go.mod h1:SlhyCAv961LcZ198XpKfPEQqlJWt2HkL1fDLas0uy/w= +github.com/nacos-group/nacos-sdk-go/v2 v2.0.4 h1:KC2oik+gijh3+S5zTJEGdTOAkpcXW5XqTWiZiAHsxXI= +github.com/nacos-group/nacos-sdk-go/v2 v2.0.4/go.mod h1:ys/1adWeKXXzbNWfRNbaFlX/t6HVLWdpsNDvmoWTw0g= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -178,6 +304,15 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -187,8 +322,9 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -196,32 +332,53 @@ github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2 github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/swaggo/files v0.0.0-20220728132757-551d4a08d97a/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w= +github.com/swaggo/files v1.0.0 h1:1gGXVIeUFCS/dta17rnP0iOpr6CXFwKD7EO5ID233e4= +github.com/swaggo/files v1.0.0/go.mod h1:N59U6URJLyU1PQgFqPM7wXLMhJx7QAolnvfQkqO13kc= +github.com/swaggo/gin-swagger v1.5.3 h1:8mWmHLolIbrhJJTflsaFoZzRBYVmEE7JZGIq08EiC0Q= +github.com/swaggo/gin-swagger v1.5.3/go.mod h1:3XJKSfHjDMB5dBo/0rrTXidPmgLeqsX89Yp4uA50HpI= +github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ= +github.com/swaggo/swag v1.8.9 h1:kHtaBe/Ob9AZzAANfcn5c6RyCke9gG9QpH0jky0I/sA= +github.com/swaggo/swag v1.8.9/go.mod h1:ezQVUUhly8dludpVk+/PuwJWvLLanB13ygV5Pr9enSk= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190809123943-df4f5c81cb3b h1:6cLsL+2FW6dRAdl5iMtHgRogVCff0QpRi9653YmdcJA= github.com/xeipuuv/gojsonpointer v0.0.0-20190809123943-df4f5c81cb3b/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -229,37 +386,78 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.0.0 h1:qTTn6x71GVBvoafHK/yaRUmFzI4LcONZD0/kXxl5PHI= go.opentelemetry.io/otel v1.0.0/go.mod h1:AjRVh9A5/5DE7S+mZtTR6t8vpKKryam+0lREnfmS4cg= go.opentelemetry.io/otel/trace v1.0.0 h1:TSBr8GTEtKevYMG/2d21M989r5WJYVimhTHBKVEZuh4= go.opentelemetry.io/otel/trace v1.0.0/go.mod h1:PXTWqayeFUlJV1YDNhsJYB184+IvAH814St6o6ajzIs= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.22.0 h1:Zcye5DUgBloQ9BaT4qc9BnjOFog5TvBSAGkJ3Nf70c0= go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -268,97 +466,263 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 h1:PDIOdWxZ8eRizhKa1AAvY53xsvLB1cWorMjslvY3VA8= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.36.1 h1:cmUfbeGKnz9+2DD/UYsMQXeqbHZqZDs4eQwW0sFOpBY= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -367,33 +731,40 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk= -gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -402,5 +773,12 @@ gorm.io/driver/mysql v1.3.5/go.mod h1:sSIebwZAVPiT+27jK9HIwvsqOGKx3YMPmrA3mBJR10 gorm.io/gorm v1.23.8 h1:h8sGJ+biDgBA1AD1Ha9gFCx7h8npU7AsLdlkX0n2TpE= gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/eventmesh-catalog-go/internal/catalog.go b/eventmesh-catalog-go/internal/catalog.go new file mode 100644 index 0000000000..7ae7a2b77b --- /dev/null +++ b/eventmesh-catalog-go/internal/catalog.go @@ -0,0 +1,173 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dal + +import ( + "context" + "fmt" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/constants" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal/model" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/util" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/pkg/asyncapi" + v2 "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/pkg/asyncapi/v2" + "github.com/gogf/gf/util/gconv" + "gorm.io/gorm" + "time" +) + +const maxSize = 100 + +type CatalogDAL interface { + Select(ctx context.Context, eventID int) (*model.Event, error) + SelectList(ctx context.Context, page int, size int) ([]model.Event, int, error) + Save(ctx context.Context, record *model.Event) error + SelectOperations(ctx context.Context, serviceName string, operationID string) ([]*model.EventCatalog, error) +} + +func NewCatalogDAL() CatalogDAL { + var w catalogDALImpl + return &w +} + +type catalogDALImpl struct { +} + +func (c *catalogDALImpl) Select(ctx context.Context, eventID int) (*model.Event, error) { + var condition = model.Event{ID: eventID} + var r model.Event + if err := catalogDB.WithContext(ctx).Where(&condition).First(&r).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return nil, nil + } + return nil, err + } + return &r, nil +} + +func (c *catalogDALImpl) SelectList(ctx context.Context, page int, size int) ([]model.Event, int, error) { + var r []model.Event + db := catalogDB.WithContext(ctx).Where("1=1") + db = db.Where("status = ?", constants.NormalStatus) + if size > maxSize { + size = maxSize + } + if page == 0 { + page = 1 + } + var count int64 + db = db.Limit(size).Offset(size * (page - 1)).Order("update_time DESC") + if err := db.Find(&r).Count(&count).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return nil, 0, nil + } + return nil, 0, err + } + return r, int(count), nil + +} + +func (c *catalogDALImpl) SelectOperations(ctx context.Context, serviceName string, + operationID string) ([]*model.EventCatalog, error) { + var res []*model.EventCatalog + var condition = model.EventCatalog{ServiceName: serviceName, OperationID: operationID} + if err := catalogDB.WithContext(ctx).Where(&condition).Find(&res).Error; err != nil { + return nil, err + } + return res, nil +} + +func (c *catalogDALImpl) Save(ctx context.Context, record *model.Event) error { + return catalogDB.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + if record.ID > 0 { + if err := c.delete(tx, record); err != nil { + return err + } + } + return c.create(tx, record) + }) +} + +func (c *catalogDALImpl) insert(tx *gorm.DB, record *model.EventCatalog) error { + return tx.Create(record).Error +} + +func (c *catalogDALImpl) insertEvent(tx *gorm.DB, record *model.Event) error { + return tx.Create(record).Error +} + +func (c *catalogDALImpl) delete(tx *gorm.DB, record *model.Event) error { + var handlers []func() error + handlers = append(handlers, func() error { + cond := model.Event{Status: constants.InvalidStatus, UpdateTime: time.Now()} + return tx.Where("id = ?", record.ID).Updates(&cond).Error + }, func() error { + cond := model.EventCatalog{Status: constants.InvalidStatus, UpdateTime: time.Now()} + return tx.Where("service_name = ?", record.Title).Updates(&cond).Error + }) + return util.GoAndWait(handlers...) +} + +func (c *catalogDALImpl) create(tx *gorm.DB, record *model.Event) error { + if len(record.Definition) == 0 { + return nil + } + var doc = new(v2.Document) + if err := v2.Decode(gconv.Bytes(record.Definition), &doc); err != nil { + return err + } + if len(doc.Channels()) == 0 { + return nil + } + var handlers []func() error + handlers = append(handlers, func() error { + return c.insertEvent(tx, c.buildEvent(record.Definition, doc)) + }) + for _, channel := range doc.Channels() { + for _, operation := range channel.Operations() { + var eventCatalog = c.buildEventCatalog(doc.Info().Title(), channel, operation) + handlers = append(handlers, func() error { + return c.insert(tx, eventCatalog) + }) + } + } + return util.GoAndWait(handlers...) +} + +func (c *catalogDALImpl) buildEventCatalog(serviceName string, channel asyncapi.Channel, + operation asyncapi.Operation) *model.EventCatalog { + var record model.EventCatalog + record.ServiceName = serviceName + record.OperationID = fmt.Sprintf("file://%s.yaml#%s", serviceName, operation.ID()) + record.ChannelName = channel.ID() + record.Type = string(operation.Type()) + record.Status = constants.NormalStatus + record.CreateTime = time.Now() + record.UpdateTime = time.Now() + record.Schema = gconv.String(operation.Messages()[0].Payload()) + return &record +} + +func (c *catalogDALImpl) buildEvent(definition string, doc asyncapi.Document) *model.Event { + var record model.Event + record.Title = doc.Info().Title() + record.FileName = fmt.Sprintf("%s.yaml", record.Title) + record.Definition = definition + record.Status = constants.NormalStatus + record.Version = doc.Info().Version() + record.CreateTime = time.Now() + record.UpdateTime = time.Now() + return &record +} diff --git a/eventmesh-catalog-go/internal/config.go b/eventmesh-catalog-go/internal/config.go new file mode 100644 index 0000000000..f09971a000 --- /dev/null +++ b/eventmesh-catalog-go/internal/config.go @@ -0,0 +1,44 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dal + +import ( + "database/sql" + "gorm.io/gorm/logger" + "time" + + "gorm.io/driver/mysql" + "gorm.io/gorm" + + pmysql "github.com/apache/incubator-eventmesh/eventmesh-server-go/plugin/database/mysql" +) + +var catalogDB *gorm.DB + +func Open() error { + var err error + d, err := sql.Open("mysql", pmysql.PluginConfig.DSN) + d.SetMaxOpenConns(pmysql.PluginConfig.MaxOpen) + d.SetMaxIdleConns(pmysql.PluginConfig.MaxIdle) + d.SetConnMaxLifetime(time.Millisecond * time.Duration(pmysql.PluginConfig.MaxLifetime)) + + catalogDB, err = gorm.Open(mysql.New(mysql.Config{Conn: d}), + &gorm.Config{Logger: logger.Default.LogMode(logger.Silent)}) + if err != nil { + return err + } + return nil +} diff --git a/eventmesh-catalog-go/internal/constants/constants.go b/eventmesh-catalog-go/internal/constants/constants.go index 23421ad03b..189eee31d1 100644 --- a/eventmesh-catalog-go/internal/constants/constants.go +++ b/eventmesh-catalog-go/internal/constants/constants.go @@ -15,4 +15,7 @@ package constants -const NormalStatus = 1 +const ( + NormalStatus = 1 + InvalidStatus = -1 +) diff --git a/eventmesh-catalog-go/internal/dal/catalog.go b/eventmesh-catalog-go/internal/dal/catalog.go index 61483c2ce2..7609425fb9 100644 --- a/eventmesh-catalog-go/internal/dal/catalog.go +++ b/eventmesh-catalog-go/internal/dal/catalog.go @@ -17,14 +17,24 @@ package dal import ( "context" + "fmt" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/constants" "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal/model" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/util" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/pkg/asyncapi" + v2 "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/pkg/asyncapi/v2" + "github.com/gogf/gf/util/gconv" "gorm.io/gorm" + "time" ) +const maxSize = 100 + type CatalogDAL interface { - Select(ctx context.Context, operationID string) (*model.EventCatalog, error) - Insert(ctx context.Context, tx *gorm.DB, record *model.EventCatalog) error - InsertEvent(ctx context.Context, tx *gorm.DB, record *model.Event) error + Select(ctx context.Context, eventID int) (*model.Event, error) + SelectList(ctx context.Context, page int, size int) ([]model.Event, int, error) + Save(ctx context.Context, record *model.Event) error + SelectOperations(ctx context.Context, serviceName string, operationID string) ([]*model.EventCatalog, error) } func NewCatalogDAL() CatalogDAL { @@ -35,21 +45,129 @@ func NewCatalogDAL() CatalogDAL { type catalogDALImpl struct { } -func (c *catalogDALImpl) Select(ctx context.Context, operationID string) (*model.EventCatalog, error) { - var res model.EventCatalog - if err := GetDalClient().Where("operation_id = ? AND status = 1", operationID).First(&res).Error; err != nil { +func (c *catalogDALImpl) Select(ctx context.Context, eventID int) (*model.Event, error) { + var condition = model.Event{ID: eventID} + var r model.Event + if err := catalogDB.WithContext(ctx).Where(&condition).First(&r).Error; err != nil { if err == gorm.ErrRecordNotFound { return nil, nil } return nil, err } - return &res, nil + return &r, nil } -func (c *catalogDALImpl) Insert(ctx context.Context, tx *gorm.DB, record *model.EventCatalog) error { +func (c *catalogDALImpl) SelectList(ctx context.Context, page int, size int) ([]model.Event, int, error) { + var r []model.Event + db := catalogDB.WithContext(ctx).Where("1=1") + db = db.Where("status = ?", constants.NormalStatus) + if size > maxSize { + size = maxSize + } + if page == 0 { + page = 1 + } + var count int64 + db = db.Limit(size).Offset(size * (page - 1)).Order("update_time DESC") + if err := db.Find(&r).Limit(-1).Offset(-1).Count(&count).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return nil, 0, nil + } + return nil, 0, err + } + return r, int(count), nil + +} + +func (c *catalogDALImpl) SelectOperations(ctx context.Context, serviceName string, + operationID string) ([]*model.EventCatalog, error) { + var res []*model.EventCatalog + var condition = model.EventCatalog{ServiceName: serviceName, OperationID: operationID} + if err := catalogDB.WithContext(ctx).Where(&condition).Find(&res).Error; err != nil { + return nil, err + } + return res, nil +} + +func (c *catalogDALImpl) Save(ctx context.Context, record *model.Event) error { + return catalogDB.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + if record.ID > 0 { + if err := c.delete(tx, record); err != nil { + return err + } + } + return c.create(tx, record) + }) +} + +func (c *catalogDALImpl) insert(tx *gorm.DB, record *model.EventCatalog) error { return tx.Create(record).Error } -func (c *catalogDALImpl) InsertEvent(ctx context.Context, tx *gorm.DB, record *model.Event) error { +func (c *catalogDALImpl) insertEvent(tx *gorm.DB, record *model.Event) error { return tx.Create(record).Error } + +func (c *catalogDALImpl) delete(tx *gorm.DB, record *model.Event) error { + var handlers []func() error + handlers = append(handlers, func() error { + cond := model.Event{Status: constants.InvalidStatus, UpdateTime: time.Now()} + return tx.Where("id = ?", record.ID).Updates(&cond).Error + }, func() error { + cond := model.EventCatalog{Status: constants.InvalidStatus, UpdateTime: time.Now()} + return tx.Where("service_name = ?", record.Title).Updates(&cond).Error + }) + return util.GoAndWait(handlers...) +} + +func (c *catalogDALImpl) create(tx *gorm.DB, record *model.Event) error { + if len(record.Definition) == 0 { + return nil + } + var doc = new(v2.Document) + if err := v2.Decode(gconv.Bytes(record.Definition), &doc); err != nil { + return err + } + if len(doc.Channels()) == 0 { + return nil + } + var handlers []func() error + handlers = append(handlers, func() error { + return c.insertEvent(tx, c.buildEvent(record.Definition, doc)) + }) + for _, channel := range doc.Channels() { + for _, operation := range channel.Operations() { + var eventCatalog = c.buildEventCatalog(doc.Info().Title(), channel, operation) + handlers = append(handlers, func() error { + return c.insert(tx, eventCatalog) + }) + } + } + return util.GoAndWait(handlers...) +} + +func (c *catalogDALImpl) buildEventCatalog(serviceName string, channel asyncapi.Channel, + operation asyncapi.Operation) *model.EventCatalog { + var record model.EventCatalog + record.ServiceName = serviceName + record.OperationID = fmt.Sprintf("file://%s.yaml#%s", serviceName, operation.ID()) + record.ChannelName = channel.ID() + record.Type = string(operation.Type()) + record.Status = constants.NormalStatus + record.CreateTime = time.Now() + record.UpdateTime = time.Now() + record.Schema = gconv.String(operation.Messages()[0].Payload()) + return &record +} + +func (c *catalogDALImpl) buildEvent(definition string, doc asyncapi.Document) *model.Event { + var record model.Event + record.Title = doc.Info().Title() + record.FileName = fmt.Sprintf("%s.yaml", record.Title) + record.Definition = definition + record.Status = constants.NormalStatus + record.Version = doc.Info().Version() + record.CreateTime = time.Now() + record.UpdateTime = time.Now() + return &record +} diff --git a/eventmesh-catalog-go/internal/dal/config.go b/eventmesh-catalog-go/internal/dal/config.go index 13d58d4e83..f09971a000 100644 --- a/eventmesh-catalog-go/internal/dal/config.go +++ b/eventmesh-catalog-go/internal/dal/config.go @@ -36,13 +36,9 @@ func Open() error { d.SetConnMaxLifetime(time.Millisecond * time.Duration(pmysql.PluginConfig.MaxLifetime)) catalogDB, err = gorm.Open(mysql.New(mysql.Config{Conn: d}), - &gorm.Config{Logger: logger.Default.LogMode(logger.Info)}) + &gorm.Config{Logger: logger.Default.LogMode(logger.Silent)}) if err != nil { return err } return nil } - -func GetDalClient() *gorm.DB { - return catalogDB -} diff --git a/eventmesh-catalog-go/internal/dal/model/event_catalog.go b/eventmesh-catalog-go/internal/dal/model/event_catalog.go index 3d7e06a642..450b317208 100644 --- a/eventmesh-catalog-go/internal/dal/model/event_catalog.go +++ b/eventmesh-catalog-go/internal/dal/model/event_catalog.go @@ -21,6 +21,7 @@ import ( type EventCatalog struct { ID int `json:"id" gorm:"column:id;type:int;primaryKey;autoIncrement"` + ServiceName string `json:"service_name" gorm:"column:service_name;type:varchar;size:256"` OperationID string `json:"operation_id" gorm:"column:operation_id;type:varchar;size:1024"` ChannelName string `json:"channel_name" gorm:"column:channel_name;type:varchar;size:1024"` Type string `json:"type" gorm:"column:type;type:string"` diff --git a/eventmesh-catalog-go/internal/util/file_utils.go b/eventmesh-catalog-go/internal/util/file_utils.go new file mode 100644 index 0000000000..9dff3c8bab --- /dev/null +++ b/eventmesh-catalog-go/internal/util/file_utils.go @@ -0,0 +1,27 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package util + +import "os" + +// Exists check if the file exists +func Exists(path string) bool { + _, err := os.Stat(path) + if err == nil { + return true + } + return os.IsExist(err) +} diff --git a/eventmesh-catalog-go/server.go b/eventmesh-catalog-go/server.go index 9b2e4adf53..d1ca75ebfa 100644 --- a/eventmesh-catalog-go/server.go +++ b/eventmesh-catalog-go/server.go @@ -16,16 +16,12 @@ package main import ( - "context" "errors" "fmt" - "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/api" - "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/api/proto" "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/dal" + "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/internal/util" "github.com/apache/incubator-eventmesh/eventmesh-server-go/config" - "github.com/apache/incubator-eventmesh/eventmesh-server-go/log" "github.com/apache/incubator-eventmesh/eventmesh-server-go/pkg/naming/registry" - "github.com/gogf/gf/util/gconv" "google.golang.org/grpc" "net" ) @@ -64,6 +60,12 @@ func (s *Server) Run() error { func (s *Server) SetupConfig() error { config.ServerConfigPath = "./configs/catalog.yaml" + if !util.Exists(config.ServerConfigPath) { + config.ServerConfigPath = "../configs/catalog.yaml" + } + if !util.Exists(config.ServerConfigPath) { + config.ServerConfigPath = "../conf/catalog.yaml" + } cfg, err := config.LoadConfig(config.ServerConfigPath) if err != nil { return err @@ -80,62 +82,3 @@ func (s *Server) listen() (net.Listener, error) { } return listener, nil } - -func tmpInsert() { - var s = api.NewCatalogImpl() - var request = proto.RegistryRequest{} - raw := []byte(` -asyncapi: '2.0.0' -info: - title: Streetlights API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you - to remotely manage the city lights. - license: - name: Apache 2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0' -servers: - mosquitto: - url: mqtt://test.mosquitto.org - protocol: mqtt -channels: - light/measured: - publish: - summary: Inform about environmental lighting conditions for a particular streetlight. - operationId: onLightMeasured - message: - oneOf: - - $ref: '#/components/messages/lightMeasured' - - $ref: '#/components/messages/lightMeasured2' -components: - messages: - lightMeasured: - name: LightMeasured - payload: - $ref: "#/components/schemas/lightMeasuredPayload" - lightMeasured2: - name: LightMeasured - payload: - $ref: "#/components/schemas/lightMeasuredPayload" - schemas: - lightMeasuredPayload: - type: object - properties: - id: - type: integer - minimum: 0 - description: Id of the streetlight. - lumens: - type: integer - minimum: 0 - description: Light intensity measured in lumens. - sentAt: - type: string - format: date-time - description: Date and time when the message was sent.`) - request.FileName = "test.yaml" - request.Definition = gconv.String(raw) - _, err := s.Registry(context.Background(), &request) - log.Info(err) -} diff --git a/eventmesh-common/build.gradle b/eventmesh-common/build.gradle index 033bbd2bc4..c4f6e5e4d1 100644 --- a/eventmesh-common/build.gradle +++ b/eventmesh-common/build.gradle @@ -29,7 +29,7 @@ dependencies { implementation "org.apache.logging.log4j:log4j-core" implementation "org.apache.logging.log4j:log4j-slf4j-impl" - implementation 'com.github.seancfoley:ipaddress:5.3.3' + implementation 'com.github.seancfoley:ipaddress' implementation "com.lmax:disruptor" @@ -46,12 +46,13 @@ dependencies { implementation "javax.annotation:javax.annotation-api:1.3.2" implementation "com.github.stefanbirkner:system-rules" + implementation "org.yaml:snakeyaml" - compileOnly 'org.projectlombok:lombok:1.18.22' - annotationProcessor 'org.projectlombok:lombok:1.18.22' + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' - testCompileOnly 'org.projectlombok:lombok:1.18.22' - testAnnotationProcessor 'org.projectlombok:lombok:1.18.22' + testCompileOnly 'org.projectlombok:lombok' + testAnnotationProcessor 'org.projectlombok:lombok' testImplementation "org.apache.commons:commons-lang3" diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/Constants.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/Constants.java index 2be374a445..4a443c63ac 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/Constants.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/Constants.java @@ -24,7 +24,9 @@ public class Constants { public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; - public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS"; + public static final String DATE_FORMAT_INCLUDE_MILLISECONDS = "yyyy-MM-dd HH:mm:ss.SSS"; + + public static final String DATE_FORMAT_DEFAULT = "yyyy-MM-dd HH:mm:ss"; public static final String LANGUAGE_JAVA = "JAVA"; @@ -153,8 +155,12 @@ public class Constants { public static final String AND = "&"; + public static final String EQ = "="; + public static final String EMPTY = ""; + public static final int SUCCESS_CODE = 200; + /** * GRPC PROTOCOL */ diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/eventmesh/connector/rocketmq/config/ConfigurationWrapperTest.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshDateFormat.java similarity index 71% rename from eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/eventmesh/connector/rocketmq/config/ConfigurationWrapperTest.java rename to eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshDateFormat.java index 6d25baf7cf..c25862ec96 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/eventmesh/connector/rocketmq/config/ConfigurationWrapperTest.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshDateFormat.java @@ -15,16 +15,14 @@ * limitations under the License. */ -package org.apache.eventmesh.connector.rocketmq.config; +package org.apache.eventmesh.common; -import org.junit.Assert; -import org.junit.Test; +import java.text.SimpleDateFormat; -public class ConfigurationWrapperTest { +public class EventMeshDateFormat extends SimpleDateFormat { - @Test - public void getProp() { - String namesrcAddr = ConfigurationWrapper.getProp("eventMesh.server.rocketmq.namesrvAddr"); - Assert.assertNotNull(namesrcAddr); + public EventMeshDateFormat(final String pattern) { + super(pattern); } -} \ No newline at end of file + +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshThreadFactory.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshThreadFactory.java new file mode 100644 index 0000000000..f4c9b3ff46 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/EventMeshThreadFactory.java @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common; + +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicInteger; + +import lombok.Getter; + +public class EventMeshThreadFactory implements ThreadFactory { + + @Getter + private final String threadNamePrefix; + private final AtomicInteger threadIndex; + private final boolean daemon; + private Integer priority; + + public EventMeshThreadFactory(final String threadNamePrefix, final AtomicInteger threadIndex, final boolean daemon, + final Integer priority) { + this.threadNamePrefix = threadNamePrefix; + this.threadIndex = threadIndex; + this.daemon = daemon; + this.priority = priority; + } + + public EventMeshThreadFactory(final String threadNamePrefix, final AtomicInteger threadIndex, + final boolean daemon) { + this(threadNamePrefix, threadIndex, daemon, null); + } + + public EventMeshThreadFactory(final String threadNamePrefix, final boolean daemon, final Integer priority) { + this(threadNamePrefix, new AtomicInteger(0), daemon, priority); + } + + public EventMeshThreadFactory(final String threadNamePrefix, final boolean daemon) { + this(threadNamePrefix, new AtomicInteger(0), daemon); + } + + public EventMeshThreadFactory(final String threadNamePrefix) { + this(threadNamePrefix, new AtomicInteger(0), false); + } + + /** + * Constructs a new {@code Thread}. Implementations may also initialize + * priority, name, daemon status, {@code ThreadGroup}, etc. + * + * @param runnable a runnable to be executed by new thread instance + * @return constructed thread, or {@code null} if the request to + * create a thread is rejected + */ + @Override + public Thread newThread(final Runnable runnable) { + + StringBuilder threadName = new StringBuilder(threadNamePrefix); + if (null != threadIndex) { + threadName.append("-").append(threadIndex.incrementAndGet()); + } + Thread thread = new Thread(runnable, threadName.toString()); + thread.setDaemon(daemon); + if (null != priority) { + thread.setPriority(priority); + } + + return thread; + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/ThreadPoolFactory.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/ThreadPoolFactory.java index 8b6e4379d2..551d92c9ae 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/ThreadPoolFactory.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/ThreadPoolFactory.java @@ -24,67 +24,36 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import com.google.common.util.concurrent.ThreadFactoryBuilder; +public abstract class ThreadPoolFactory { -public class ThreadPoolFactory { + private ThreadPoolFactory() { + } public static ThreadPoolExecutor createThreadPoolExecutor(int core, int max, final String threadName) { return createThreadPoolExecutor(core, max, threadName, true); } public static ThreadPoolExecutor createThreadPoolExecutor(int core, int max, final String threadName, - final boolean isDaemon) { + final boolean isDaemon) { return createThreadPoolExecutor(core, max, new LinkedBlockingQueue<>(1000), threadName, isDaemon); } public static ThreadPoolExecutor createThreadPoolExecutor(int core, int max, BlockingQueue blockingQueue, - final String threadName, final boolean isDaemon) { + final String threadName, final boolean isDaemon) { return new ThreadPoolExecutor(core, max, 10 * 1000, TimeUnit.MILLISECONDS, blockingQueue, - new ThreadFactoryBuilder().setNameFormat(threadName).setDaemon(isDaemon).build() - ); - } - - public static ThreadPoolExecutor createThreadPoolExecutor(int core, int max, ThreadFactory threadFactory) { - return createThreadPoolExecutor(core, max, new LinkedBlockingQueue<>(1000), threadFactory); + new EventMeshThreadFactory(threadName, isDaemon)); } public static ThreadPoolExecutor createThreadPoolExecutor(int core, int max, BlockingQueue blockingQueue, - ThreadFactory threadFactory) { + ThreadFactory threadFactory) { return new ThreadPoolExecutor(core, max, 10 * 1000, TimeUnit.MILLISECONDS, blockingQueue, threadFactory); } public static ScheduledExecutorService createSingleScheduledExecutor(final String threadName) { - return Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { - private AtomicInteger ai = new AtomicInteger(0); - - @Override - public Thread newThread(Runnable r) { - Thread thread = new Thread(r, threadName + ai.incrementAndGet()); - thread.setDaemon(true); - return thread; - } - }); + return Executors.newSingleThreadScheduledExecutor(new EventMeshThreadFactory(threadName, true)); } - public static ScheduledExecutorService createScheduledExecutor(int core, final String threadName) { - return createScheduledExecutor(core, threadName, true); - } - - public static ScheduledExecutorService createScheduledExecutor(int core, final String threadName, - final boolean isDaemon) { - return Executors.newScheduledThreadPool(core, new ThreadFactory() { - private AtomicInteger ai = new AtomicInteger(0); - - @Override - public Thread newThread(Runnable r) { - Thread thread = new Thread(r, threadName + ai.incrementAndGet()); - thread.setDaemon(isDaemon); - return thread; - } - }); - } public static ScheduledExecutorService createScheduledExecutor(int core, ThreadFactory threadFactory) { return Executors.newScheduledThreadPool(core, threadFactory); diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java index fe88d58486..fcd06da90f 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/CommonConfiguration.java @@ -17,163 +17,105 @@ package org.apache.eventmesh.common.config; +import org.apache.eventmesh.common.utils.ConfigurationContextUtil; import org.apache.eventmesh.common.utils.IPUtils; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.collections4.CollectionUtils; -import java.util.Arrays; +import java.util.Collections; import java.util.List; -import java.util.Optional; -import java.util.function.Supplier; -import java.util.stream.Collectors; -import com.google.common.base.Preconditions; +import org.assertj.core.util.Strings; -import lombok.Getter; +import lombok.Data; +import lombok.NoArgsConstructor; +@Data +@NoArgsConstructor +@Config(prefix = "eventMesh") public class CommonConfiguration { - public String eventMeshEnv = "P"; - public String eventMeshIDC = "FT"; - public String eventMeshCluster = "LS"; - public String eventMeshName = ""; - public String sysID = "5477"; - public String eventMeshConnectorPluginType = "rocketmq"; - public String eventMeshSecurityPluginType = "security"; - public String eventMeshRegistryPluginType = "namesrv"; - public List eventMeshMetricsPluginType; - public String eventMeshTracePluginType; - public String namesrvAddr = ""; - public String eventMeshRegistryPluginUsername = ""; - public String eventMeshRegistryPluginPassword = ""; - public Integer eventMeshRegisterIntervalInMills = 10 * 1000; - public Integer eventMeshFetchRegistryAddrInterval = 10 * 1000; - public String eventMeshServerIp = null; - public boolean eventMeshServerSecurityEnable = false; - public boolean eventMeshServerRegistryEnable = false; - public boolean eventMeshServerTraceEnable = false; - - @Getter - protected ConfigurationWrapper configurationWrapper; - - public String eventMeshWebhookOrigin = "eventmesh." + eventMeshIDC; - - public CommonConfiguration(ConfigurationWrapper configurationWrapper) { - this.configurationWrapper = configurationWrapper; - } - - public void init() { - - if (configurationWrapper != null) { - eventMeshEnv = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_ENV); - - sysID = checkNumeric(ConfKeys.KEYS_EVENTMESH_SYSID); - - eventMeshCluster = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_SERVER_CLUSTER); - - eventMeshName = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_SERVER_NAME); - - eventMeshIDC = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_IDC); - - eventMeshServerIp = get(ConfKeys.KEYS_EVENTMESH_SERVER_HOST_IP, IPUtils::getLocalAddress); - - eventMeshConnectorPluginType = checkNotEmpty(ConfKeys.KEYS_ENENTMESH_CONNECTOR_PLUGIN_TYPE); - - eventMeshServerSecurityEnable = Boolean.parseBoolean(get(ConfKeys.KEYS_EVENTMESH_SECURITY_ENABLED, () -> "false")); + @ConfigFiled(field = "sysid", beNumber = true, notEmpty = true) + private String sysID = "5477"; - eventMeshSecurityPluginType = checkNotEmpty(ConfKeys.KEYS_ENENTMESH_SECURITY_PLUGIN_TYPE); + @ConfigFiled(field = "server.env", notEmpty = true) + private String eventMeshEnv = "P"; - eventMeshServerRegistryEnable = Boolean.parseBoolean(get(ConfKeys.KEYS_EVENTMESH_REGISTRY_ENABLED, () -> "false")); + @ConfigFiled(field = "server.idc", notEmpty = true) + private String eventMeshIDC = "FT"; - eventMeshRegistryPluginType = checkNotEmpty(ConfKeys.KEYS_ENENTMESH_REGISTRY_PLUGIN_TYPE); + @ConfigFiled(field = "server.name", notEmpty = true) + private String eventMeshName = ""; - namesrvAddr = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_REGISTRY_PULGIN_SERVER_ADDR); + @ConfigFiled(field = "server.cluster", notEmpty = true) + private String eventMeshCluster = "LS"; - eventMeshRegistryPluginUsername = - Optional.ofNullable(configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_REGISTRY_PULGIN_USERNAME)).orElse(""); + @ConfigFiled(field = "server.hostIp", reload = true) + private String eventMeshServerIp = null; - eventMeshRegistryPluginPassword = - Optional.ofNullable(configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_REGISTRY_PULGIN_PASSWORD)).orElse(""); + @ConfigFiled(field = "registry.plugin.server-addr", notEmpty = true) + private String namesrvAddr = ""; - String metricsPluginType = configurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_METRICS_PLUGIN_TYPE); - if (StringUtils.isNotEmpty(metricsPluginType)) { - eventMeshMetricsPluginType = Arrays.stream(metricsPluginType.split(",")) - .filter(StringUtils::isNotBlank) - .map(String::trim) - .collect(Collectors.toList()); - } - eventMeshServerTraceEnable = Boolean.parseBoolean(get(ConfKeys.KEYS_EVENTMESH_TRACE_ENABLED, () -> "false")); - if (eventMeshServerTraceEnable) { - eventMeshTracePluginType = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_TRACE_PLUGIN_TYPE); - } - } - } + @ConfigFiled(field = "trace.plugin", notEmpty = true) + private String eventMeshTracePluginType; - private String checkNotEmpty(String key) { - String value = configurationWrapper.getProp(key); - if (value != null) { - value = StringUtils.deleteWhitespace(value); - } - Preconditions.checkState(StringUtils.isNotEmpty(value), key + " is invalidated"); - return value; - } + @ConfigFiled(field = "metrics.plugin", notEmpty = true) + private List eventMeshMetricsPluginType; - private String checkNumeric(String key) { - String value = configurationWrapper.getProp(key); - if (value != null) { - value = StringUtils.deleteWhitespace(value); - } - Preconditions.checkState(StringUtils.isNotEmpty(value) && StringUtils.isNumeric(value), key + " is invalidated"); - return value; - } + @ConfigFiled(field = "registry.plugin.type", notEmpty = true) + private String eventMeshRegistryPluginType = "namesrv"; - private String get(String key, Supplier defaultValueSupplier) { - String value = configurationWrapper.getProp(key); - if (value != null) { - value = StringUtils.deleteWhitespace(value); - } - return StringUtils.isEmpty(value) ? defaultValueSupplier.get() : value; - } + @ConfigFiled(field = "security.plugin.type", notEmpty = true) + private String eventMeshSecurityPluginType = "security"; - static class ConfKeys { - public static final String KEYS_EVENTMESH_ENV = "eventMesh.server.env"; + @ConfigFiled(field = "connector.plugin.type", notEmpty = true) + private String eventMeshConnectorPluginType = "rocketmq"; - public static final String KEYS_EVENTMESH_IDC = "eventMesh.server.idc"; - public static final String KEYS_EVENTMESH_SYSID = "eventMesh.sysid"; + @ConfigFiled(field = "registry.plugin.username") + private String eventMeshRegistryPluginUsername = ""; - public static final String KEYS_EVENTMESH_SERVER_CLUSTER = "eventMesh.server.cluster"; + @ConfigFiled(field = "registry.plugin.password") + private String eventMeshRegistryPluginPassword = ""; - public static final String KEYS_EVENTMESH_SERVER_NAME = "eventMesh.server.name"; + @ConfigFiled(field = "server.registry.registerIntervalInMills") + private Integer eventMeshRegisterIntervalInMills = 10 * 1000; - public static final String KEYS_EVENTMESH_SERVER_HOST_IP = "eventMesh.server.hostIp"; + @ConfigFiled(field = "server.registry.fetchRegistryAddrIntervalInMills") + private Integer eventMeshFetchRegistryAddrInterval = 10 * 1000; - public static final String KEYS_EVENTMESH_SERVER_REGISTER_INTERVAL = - "eventMesh.server.registry.registerIntervalInMills"; - public static final String KEYS_EVENTMESH_SERVER_FETCH_REGISTRY_ADDR_INTERVAL = - "eventMesh.server.registry.fetchRegistryAddrIntervalInMills"; + @ConfigFiled(field = "server.trace.enabled") + private boolean eventMeshServerTraceEnable = false; - public static final String KEYS_ENENTMESH_CONNECTOR_PLUGIN_TYPE = "eventMesh.connector.plugin.type"; + @ConfigFiled(field = "server.security.enabled") + private boolean eventMeshServerSecurityEnable = false; - public static final String KEYS_EVENTMESH_SECURITY_ENABLED = "eventMesh.server.security.enabled"; + @ConfigFiled(field = "server.registry.enabled") + private boolean eventMeshServerRegistryEnable = false; - public static final String KEYS_ENENTMESH_SECURITY_PLUGIN_TYPE = "eventMesh.security.plugin.type"; - public static final String KEYS_EVENTMESH_REGISTRY_ENABLED = "eventMesh.registry.plugin.enabled"; + @ConfigFiled(field = "server.provide.protocols", reload = true) + private List eventMeshProvideServerProtocols; - public static final String KEYS_ENENTMESH_REGISTRY_PLUGIN_TYPE = "eventMesh.registry.plugin.type"; - public static final String KEYS_EVENTMESH_REGISTRY_PULGIN_SERVER_ADDR = "eventMesh.registry.plugin.server-addr"; + @ConfigFiled(reload = true) + private String eventMeshWebhookOrigin; - public static final String KEYS_EVENTMESH_REGISTRY_PULGIN_USERNAME = "eventMesh.registry.plugin.username"; + @ConfigFiled(reload = true) + private String meshGroup; - public static final String KEYS_EVENTMESH_REGISTRY_PULGIN_PASSWORD = "eventMesh.registry.plugin.password"; + public void reload() { + this.eventMeshWebhookOrigin = "eventmesh." + eventMeshIDC; - public static final String KEYS_EVENTMESH_METRICS_PLUGIN_TYPE = "eventMesh.metrics.plugin"; + if (Strings.isNullOrEmpty(this.eventMeshServerIp)) { + this.eventMeshServerIp = IPUtils.getLocalAddress(); + } - public static final String KEYS_EVENTMESH_TRACE_ENABLED = "eventMesh.server.trace.enabled"; + if (CollectionUtils.isEmpty(eventMeshProvideServerProtocols)) { + this.eventMeshProvideServerProtocols = Collections.singletonList(ConfigurationContextUtil.HTTP); + } - public static final String KEYS_EVENTMESH_TRACE_PLUGIN_TYPE = "eventMesh.trace.plugin"; + meshGroup = String.join("-", this.eventMeshEnv, this.eventMeshCluster, this.sysID); } } \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/Config.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/Config.java new file mode 100644 index 0000000000..f535a72cfd --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/Config.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Repeatable; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Record information about the configuration class to be converted + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.TYPE}) +@Repeatable(Config.Configs.class) +public @interface Config { + + String field() default ""; + + String path() default ""; + + String prefix() default ""; + + String hump() default "."; + + boolean removePrefix() default true; + + boolean monitor() default false; + + String reloadMethodName() default "reload"; + + @Retention(RetentionPolicy.RUNTIME) + @Target(ElementType.TYPE) + @interface Configs { + Config[] value(); + } +} + + + diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigFiled.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigFiled.java new file mode 100644 index 0000000000..d7c398e2db --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigFiled.java @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config; + +import org.apache.eventmesh.common.config.convert.ConvertValue.DefaultConverter; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Record information about the field in the configuration class to be converted + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD}) +public @interface ConfigFiled { + + /** + * @return The key name of the configuration file + */ + String field() default ""; + + /** + * Note : When reload is true, the class must have a reload method + * + * @return Whether to reload. This parameter is used when other fields are associated + */ + boolean reload() default false; + + /** + * In some special cases, used to specify the converter class of the field + * + * @return field converter + */ + Class converter() default DefaultConverter.class; + + /** + * if the configuration filed is empty, try to read from env, by field + * + * @return Whether to try to read from env if the configuration filed is empty + */ + boolean findEnv() default false; + + /** + * If it cannot be null but is null, an exception is thrown + * + * @return Whether the field can be null + */ + boolean notNull() default false; + + /** + * If it cannot be empty but is empty, an exception is thrown + * + * @return Whether the field can be empty + */ + boolean notEmpty() default false; + + /** + * If it's not a number, an exception is thrown + * + * @return Whether the field must be number + */ + boolean beNumber() default false; +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigInfo.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigInfo.java new file mode 100644 index 0000000000..e87b119788 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigInfo.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config; + +import java.lang.reflect.Field; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ConfigInfo { + + public static final String HUMP_SPOT = "spot"; + public static final String HUMP_ROD = "rod"; + + private String path; + private String field; + private String prefix; + private String hump; + private boolean monitor; + private boolean removePrefix; + + private Class clazz; + private Object object; + private String filePath; + + private String reloadMethodName; + + Field objectField; + Object instance; + + private String resourceUrl; +} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigMonitorService.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigMonitorService.java new file mode 100644 index 0000000000..5c4000b60c --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigMonitorService.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config; + +import org.apache.eventmesh.common.ThreadPoolFactory; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class ConfigMonitorService { + + private static final long TIME_INTERVAL = 30 * 1000L; + + private final List configInfoList = new ArrayList<>(); + + private final ScheduledExecutorService configLoader = ThreadPoolFactory.createSingleScheduledExecutor("eventMesh-configLoader"); + + { + configLoader.scheduleAtFixedRate(this::load, TIME_INTERVAL, TIME_INTERVAL, TimeUnit.MILLISECONDS); + } + + public void monitor(ConfigInfo configInfo) { + configInfoList.add(configInfo); + } + + public void load() { + for (ConfigInfo configInfo : configInfoList) { + try { + Object object = ConfigService.getInstance().getConfig(configInfo); + if (configInfo.getObject().equals(object)) { + continue; + } + + Field field = configInfo.getObjectField(); + boolean isAccessible = field.isAccessible(); + try { + field.setAccessible(true); + field.set(configInfo.getInstance(), object); + } finally { + field.setAccessible(isAccessible); + } + + configInfo.setObject(object); + log.info("config reload success: {}", object); + } catch (Exception e) { + log.error("config reload failed", e); + } + } + } + +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigService.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigService.java new file mode 100644 index 0000000000..0cc9ea94f2 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigService.java @@ -0,0 +1,181 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config; + +import org.apache.commons.lang3.StringUtils; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Field; +import java.net.URL; +import java.util.Properties; + +import org.assertj.core.util.Strings; + +import lombok.Getter; + +public class ConfigService { + + private static final ConfigService INSTANCE = new ConfigService(); + + public static final String CLASS_PATH_PREFIX = "classPath://"; + public static final String FILE_PATH_PREFIX = "file://"; + + /** + * Unified configuration Properties corresponding to eventmesh.properties + */ + private Properties properties = new Properties(); + + @Getter + private String rootPath; + + private static final ConfigMonitorService configMonitorService = new ConfigMonitorService(); + + private String configPath; + + public static ConfigService getInstance() { + return INSTANCE; + } + + private ConfigService() { + } + + public ConfigService setConfigPath(String configPath) { + this.configPath = configPath; + return this; + } + + public void setRootConfig(String path) throws Exception { + ConfigInfo configInfo = new ConfigInfo(); + rootPath = path; + configInfo.setPath(rootPath); + properties = this.getConfig(configInfo); + } + + public Properties getRootConfig() { + return this.properties; + } + + public T buildConfigInstance(Class clazz) { + + Config[] configArray = clazz.getAnnotationsByType(Config.class); + Config config = configArray.length == 0 ? null : configArray[0]; + ConfigInfo configInfo = new ConfigInfo(); + configInfo.setClazz(clazz); + configInfo.setPath(config == null ? null : config.path()); + configInfo.setHump(config == null ? ConfigInfo.HUMP_SPOT : config.hump()); + configInfo.setPrefix(config == null ? null : config.prefix()); + configInfo.setMonitor(config == null ? false : config.monitor()); + configInfo.setReloadMethodName(config == null ? null : config.reloadMethodName()); + + try { + return this.getConfig(configInfo); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public void populateConfigForObject(Object object) throws IllegalAccessException, NoSuchFieldException, IOException { + Class clazz = object.getClass(); + Config[] configArray = clazz.getAnnotationsByType(Config.class); + if (configArray.length == 0) { + return; + } + + for (Config config : configArray) { + populateConfig(object, clazz, config); + } + } + + @SuppressWarnings("unchecked") + public T getConfig(ConfigInfo configInfo) throws IOException { + Object object; + + String path = configInfo.getPath(); + if (StringUtils.isBlank(path)) { + object = FileLoad.getPropertiesFileLoad().getConfig(properties, configInfo); + return (T) object; + } + + String filePath; + String resourceUrl = null; + if (path.startsWith(CLASS_PATH_PREFIX)) { + resourceUrl = "/" + path.substring(CLASS_PATH_PREFIX.length()); + URL fileURL = getClass().getResource(resourceUrl); + if (fileURL == null) { + throw new RuntimeException("file is not exists"); + } + filePath = fileURL.getPath(); + } else { + filePath = path.startsWith(FILE_PATH_PREFIX) ? path.substring(FILE_PATH_PREFIX.length()) : this.configPath + path; + } + + if (filePath.contains(".jar")) { + try (final InputStream inputStream = getClass().getResourceAsStream(resourceUrl)) { + if (inputStream == null) { + throw new RuntimeException("file is not exists"); + } + } + } else { + File file = new File(filePath); + if (!file.exists()) { + throw new RuntimeException("file is not exists"); + } + } + + String suffix = path.substring(path.lastIndexOf('.') + 1); + configInfo.setFilePath(filePath); + configInfo.setResourceUrl(resourceUrl); + object = FileLoad.getFileLoad(suffix).getConfig(configInfo); + return (T) object; + } + + private void populateConfig(Object object, Class clazz, Config config) + throws NoSuchFieldException, IOException, IllegalAccessException { + ConfigInfo configInfo = new ConfigInfo(); + configInfo.setField(config.field()); + configInfo.setMonitor(config.monitor()); + configInfo.setReloadMethodName(config.reloadMethodName()); + + Field field = clazz.getDeclaredField(configInfo.getField()); + configInfo.setClazz(field.getType()); + + Config configType = field.getType().getAnnotation(Config.class); + if (configType != null && !Strings.isNullOrEmpty(configType.prefix())) { + configInfo.setPrefix(configType.prefix()); + configInfo.setPath(configType.path()); + configInfo.setHump(configType.hump()); + } + + Object configObject = this.getConfig(configInfo); + + try { + field.setAccessible(true); + field.set(object, configObject); + } finally { + field.setAccessible(false); + } + if (configInfo.isMonitor()) { + configInfo.setObjectField(field); + configInfo.setInstance(object); + configInfo.setObject(configObject); + configMonitorService.monitor(configInfo); + } + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java deleted file mode 100644 index c3e88e34e6..0000000000 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/ConfigurationWrapper.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.eventmesh.common.config; - -import org.apache.eventmesh.common.file.FileChangeContext; -import org.apache.eventmesh.common.file.FileChangeListener; -import org.apache.eventmesh.common.file.WatchFileManager; - -import org.apache.commons.lang3.StringUtils; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.Map.Entry; -import java.util.Properties; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Preconditions; - -public class ConfigurationWrapper { - - public Logger logger = LoggerFactory.getLogger(this.getClass()); - - private final String directoryPath; - - private final String fileName; - - private final Properties properties = new Properties(); - - private final String file; - - private final boolean reload; - - private final FileChangeListener fileChangeListener = new FileChangeListener() { - @Override - public void onChanged(FileChangeContext changeContext) { - load(); - } - - @Override - public boolean support(FileChangeContext changeContext) { - return changeContext.getWatchEvent().context().toString().contains(fileName); - } - }; - - public ConfigurationWrapper(String directoryPath, String fileName, boolean reload) { - this.directoryPath = directoryPath - .replace('/', File.separator.charAt(0)) - .replace('\\', File.separator.charAt(0)); - this.fileName = fileName; - this.file = (directoryPath + File.separator + fileName) - .replace('/', File.separator.charAt(0)) - .replace('\\', File.separator.charAt(0)); - this.reload = reload; - init(); - } - - private void init() { - load(); - if (this.reload) { - WatchFileManager.registerFileChangeListener(directoryPath, fileChangeListener); - Runtime.getRuntime().addShutdownHook(new Thread(() -> { - logger.info("Configuration reload task closed"); - WatchFileManager.deregisterFileChangeListener(directoryPath); - })); - } - } - - private void load() { - try (BufferedReader reader = new BufferedReader(new FileReader(file))) { - logger.info("loading config: {}", file); - properties.load(reader); - } catch (IOException e) { - logger.error("loading properties [{}] error", file, e); - } - } - - public String getProp(String key) { - return StringUtils.isEmpty(key) ? null : properties.getProperty(key, null); - } - - public int getIntProp(String configKey, int defaultValue) { - String configValue = StringUtils.deleteWhitespace(getProp(configKey)); - if (StringUtils.isEmpty(configValue)) { - return defaultValue; - } - Preconditions.checkState(StringUtils.isNumeric(configValue), - String.format("key:%s, value:%s error", configKey, configValue)); - return Integer.parseInt(configValue); - } - - public boolean getBoolProp(String configKey, boolean defaultValue) { - String configValue = StringUtils.deleteWhitespace(getProp(configKey)); - if (StringUtils.isEmpty(configValue)) { - return defaultValue; - } - return Boolean.parseBoolean(configValue); - } - - private String removePrefix(String key, String prefix, boolean removePrefix) { - return removePrefix ? key.replace(prefix, "") : key; - } - - public Properties getPropertiesByConfig(String prefix, boolean removePrefix) { - Properties properties = new Properties(); - prefix = prefix.endsWith(".") ? prefix : prefix + "."; - for (Entry entry : this.properties.entrySet()) { - String key = (String) entry.getKey(); - if (key.startsWith(prefix)) { - properties.put(removePrefix(key, prefix, removePrefix), entry.getValue()); - } - } - return properties; - } - - @SuppressWarnings("unchecked") - public T getPropertiesByConfig(String prefix, Class clazz, boolean removePrefix) { - ObjectMapper objectMapper = new ObjectMapper(); - return (T) objectMapper.convertValue(getPropertiesByConfig(prefix, removePrefix), clazz); - } - - public Properties getProperties() { - return this.properties; - } - -} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/FileLoad.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/FileLoad.java new file mode 100644 index 0000000000..8bd3e30595 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/FileLoad.java @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config; + +import org.apache.eventmesh.common.config.convert.Convert; + +import org.apache.commons.lang3.StringUtils; + +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Objects; +import java.util.Properties; + +import org.yaml.snakeyaml.Yaml; + +/** + * load config from file + */ +public interface FileLoad { + + PropertiesFileLoad PROPERTIES_FILE_LOAD = new PropertiesFileLoad(); + + YamlFileLoad YAML_FILE_LOAD = new YamlFileLoad(); + + public static FileLoad getFileLoad(String fileType) { + if (Objects.equals("properties", fileType)) { + return PROPERTIES_FILE_LOAD; + } else if (Objects.equals("yaml", fileType)) { + return YAML_FILE_LOAD; + } + return PROPERTIES_FILE_LOAD; + } + + static PropertiesFileLoad getPropertiesFileLoad() { + return PROPERTIES_FILE_LOAD; + } + + static YamlFileLoad getYamlFileLoad() { + return YAML_FILE_LOAD; + } + + T getConfig(ConfigInfo configInfo) throws IOException; + + class PropertiesFileLoad implements FileLoad { + + private final Convert convert = new Convert(); + + @SuppressWarnings("unchecked") + public T getConfig(ConfigInfo configInfo) throws IOException { + final Properties properties = new Properties(); + if (StringUtils.isNotBlank(configInfo.getResourceUrl())) { + properties.load(new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(configInfo.getResourceUrl())))); + } else { + properties.load(new BufferedReader(new FileReader(configInfo.getFilePath()))); + } + + if (Objects.isNull(configInfo.getClazz())) { + return (T) properties; + } + + return (T) convert.doConvert(configInfo, properties); + } + + @SuppressWarnings("unchecked") + public T getConfig(Properties properties, ConfigInfo configInfo) { + return (T) convert.doConvert(configInfo, properties); + } + } + + class YamlFileLoad implements FileLoad { + + @SuppressWarnings("unchecked") + @Override + public T getConfig(ConfigInfo configInfo) throws IOException { + Yaml yaml = new Yaml(); + return (T) yaml.loadAs(new BufferedInputStream(new FileInputStream(configInfo.getFilePath())), configInfo.getClazz()); + } + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/Convert.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/Convert.java new file mode 100644 index 0000000000..84fbdc380e --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/Convert.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert; + +import org.apache.eventmesh.common.config.ConfigInfo; + +import java.util.Properties; + +/** + * Used to convert Config properties + */ +public class Convert { + + public Object doConvert(ConfigInfo configInfo, Properties properties) { + Class clazz = configInfo.getClazz(); + ConvertInfo convertInfo = new ConvertInfo(); + convertInfo.setConfigInfo(configInfo); + convertInfo.setProperties(properties); + convertInfo.setClazz(clazz); + + ConvertValue clazzConverter = ConverterMap.getClazzConverter(clazz); + return clazzConverter.convert(convertInfo); + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertInfo.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertInfo.java new file mode 100644 index 0000000000..c3a867da9e --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertInfo.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert; + +import org.apache.eventmesh.common.config.ConfigInfo; + +import java.lang.reflect.Field; +import java.util.Properties; + +import lombok.Data; + +/** + * Records the information about the field to be converted + */ +@Data +public class ConvertInfo { + char hump; + String key; + Field field; + Object value; + Class clazz; + Properties properties; + ConfigInfo configInfo; +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java new file mode 100644 index 0000000000..a0ece2e6aa --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert; + +import org.apache.eventmesh.common.config.ConfigFiled; + +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; +import java.util.Optional; +import java.util.Properties; + +/** + * convert convertInfo to obj + * + * @param obj type + */ +public interface ConvertValue { + + T convert(ConvertInfo convertInfo); + + /** + * @return Whether can to process null values + */ + default boolean canHandleNullValue() { + return false; + } + + /** + * @return The value converter needs + */ + default Object processFieldValue(ConvertInfo convertInfo, String key, ConfigFiled configFiled) { + Properties properties = convertInfo.getProperties(); + String value = properties.getProperty(key); + + if (Objects.isNull(value)) { + return null; + } + + value = value.trim(); + + boolean findEnv = configFiled.findEnv(); + String fieldName = configFiled.field(); + + if (StringUtils.isBlank(value) && !StringUtils.isBlank(fieldName) && findEnv) { + value = Optional.ofNullable(System.getProperty(fieldName)).orElseGet(() -> System.getenv(fieldName)); + } + + if (StringUtils.isBlank(value) && configFiled.notEmpty()) { + throw new RuntimeException(key + " can't be empty!"); + } + + return value; + } + + class DefaultConverter implements ConvertValue { + + @Override + public Object convert(ConvertInfo convertInfo) { + return null; + } + } +} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConverterMap.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConverterMap.java new file mode 100644 index 0000000000..3f59730c95 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConverterMap.java @@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert; + +import org.apache.eventmesh.common.config.ConfigFiled; +import org.apache.eventmesh.common.config.convert.converter.BaseDataTypeConverter; +import org.apache.eventmesh.common.config.convert.converter.DateConverter; +import org.apache.eventmesh.common.config.convert.converter.EnumConverter; +import org.apache.eventmesh.common.config.convert.converter.IPAddressConverter; +import org.apache.eventmesh.common.config.convert.converter.ListConverter; +import org.apache.eventmesh.common.config.convert.converter.LocalDateConverter; +import org.apache.eventmesh.common.config.convert.converter.LocalDateTimeConverter; +import org.apache.eventmesh.common.config.convert.converter.MapConverter; +import org.apache.eventmesh.common.config.convert.converter.ObjectConverter; +import org.apache.eventmesh.common.config.convert.converter.PropertiesConverter; +import org.apache.eventmesh.common.config.convert.converter.StringConverter; +import org.apache.eventmesh.common.config.convert.converter.URIConverter; + +import java.lang.reflect.Field; +import java.net.URI; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Properties; +import java.util.TreeMap; +import java.util.Vector; + + +import lombok.extern.slf4j.Slf4j; + +import inet.ipaddr.IPAddress; + +/** + * Use to map the field clazz and the converter for the field clazz + */ +@Slf4j +public class ConverterMap { + + private static final ObjectConverter objectConverter = new ObjectConverter(); + + private static final Map, ConvertValue> classToConverter = new HashMap<>(); + + static { + register(new URIConverter(), URI.class); + register(new EnumConverter(), Enum.class); + register(new DateConverter(), Date.class); + register(new StringConverter(), String.class); + register(new LocalDateConverter(), LocalDate.class); + register(new IPAddressConverter(), IPAddress.class); + register(new PropertiesConverter(), Properties.class); + register(new LocalDateTimeConverter(), LocalDateTime.class); + register(new ListConverter(), List.class, ArrayList.class, LinkedList.class, Vector.class); + register(new MapConverter(), Map.class, HashMap.class, TreeMap.class, LinkedHashMap.class); + register(new BaseDataTypeConverter.CharacterConverter(), Character.class, char.class); + register(new BaseDataTypeConverter.ByteConverter(), Byte.class, byte.class); + register(new BaseDataTypeConverter.ShortConverter(), Short.class, short.class); + register(new BaseDataTypeConverter.IntegerConverter(), Integer.class, int.class); + register(new BaseDataTypeConverter.LongConverter(), Long.class, long.class); + register(new BaseDataTypeConverter.FloatConverter(), Float.class, float.class); + register(new BaseDataTypeConverter.DoubleConverter(), Double.class, double.class); + register(new BaseDataTypeConverter.BooleanConverter(), Boolean.class, boolean.class); + } + + public static void register(ConvertValue convertValue, Class... clazzs) { + for (Class clazz : clazzs) { + classToConverter.put(clazz, convertValue); + } + } + + /** + * Get the converter for the field + * + * @param field The field to be parsed + * @return the converter for the field + */ + public static ConvertValue getFieldConverter(Field field) { + Class clazz = field.getType(); + ConfigFiled configFiled = field.getAnnotation(ConfigFiled.class); + + Class converter1 = configFiled.converter(); + if (!converter1.equals(ConvertValue.DefaultConverter.class)) { + if (!classToConverter.containsKey(converter1)) { + try { + ConvertValue convertValue = (ConvertValue) converter1.newInstance(); + register(convertValue, converter1); + } catch (Exception e) { + log.error("The converter failed to register.", e); + } + } + + return classToConverter.get(converter1); + } + + return getClazzConverter(clazz); + } + + /** + * Get the converter for the clazz + * + * @param clazz The clazz to be parsed + * @return the converter for the clazz + */ + public static ConvertValue getClazzConverter(Class clazz) { + ConvertValue converter = classToConverter.get(clazz); + if (Objects.isNull(converter)) { + if (clazz.isEnum()) { + converter = classToConverter.get(Enum.class); + } else { + converter = objectConverter; + } + } + + return converter; + } + + public static Map, ConvertValue> getClassToConverter() { + return classToConverter; + } + + public static ObjectConverter getObjectConverter() { + return objectConverter; + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/BaseDataTypeConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/BaseDataTypeConverter.java new file mode 100644 index 0000000000..053580c46f --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/BaseDataTypeConverter.java @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import java.util.Objects; + +/** + * Config field conversion class for base data types + */ +public class BaseDataTypeConverter { + + public static class CharacterConverter implements ConvertValue { + + @Override + public Character convert(ConvertInfo convertInfo) { + String value = (String) convertInfo.getValue(); + + return value.charAt(0); + } + } + + public static class BooleanConverter implements ConvertValue { + + @Override + public Boolean convert(ConvertInfo convertInfo) { + String value = (String) convertInfo.getValue(); + if (Objects.equals(value.length(), 1)) { + return Objects.equals(convertInfo.getValue(), "1") ? Boolean.TRUE : Boolean.FALSE; + } + + return Boolean.valueOf((String) convertInfo.getValue()); + } + } + + public static class ByteConverter implements ConvertValue { + + @Override + public Byte convert(ConvertInfo convertInfo) { + return Byte.valueOf((String) convertInfo.getValue()); + } + } + + public static class ShortConverter implements ConvertValue { + + @Override + public Short convert(ConvertInfo convertInfo) { + return Short.valueOf((String) convertInfo.getValue()); + } + } + + public static class IntegerConverter implements ConvertValue { + + @Override + public Integer convert(ConvertInfo convertInfo) { + return Integer.valueOf((String) convertInfo.getValue()); + } + } + + public static class LongConverter implements ConvertValue { + + @Override + public Long convert(ConvertInfo convertInfo) { + return Long.valueOf((String) convertInfo.getValue()); + } + } + + public static class FloatConverter implements ConvertValue { + + @Override + public Float convert(ConvertInfo convertInfo) { + return Float.valueOf((String) convertInfo.getValue()); + } + } + + public static class DoubleConverter implements ConvertValue { + + @Override + public Double convert(ConvertInfo convertInfo) { + return Double.valueOf((String) convertInfo.getValue()); + } + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/DateConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/DateConverter.java new file mode 100644 index 0000000000..4a864eb6b2 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/DateConverter.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * Config field conversion class for Date + */ +public class DateConverter implements ConvertValue { + + @Override + public Date convert(ConvertInfo convertInfo) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + try { + return sdf.parse((String) convertInfo.getValue()); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/EnumConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/EnumConverter.java new file mode 100644 index 0000000000..513adf101e --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/EnumConverter.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +/** + * Config field conversion class for Enum + */ +public class EnumConverter implements ConvertValue> { + + @SuppressWarnings({"unchecked", "rawtypes"}) + @Override + public Enum convert(ConvertInfo convertInfo) { + Class enumType = (Class) convertInfo.getField().getType(); + String name = (String) convertInfo.getValue(); + + return Enum.valueOf(enumType, name); + } +} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/IPAddressConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/IPAddressConverter.java new file mode 100644 index 0000000000..ee3ebae8c5 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/IPAddressConverter.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import inet.ipaddr.AddressStringException; +import inet.ipaddr.IPAddress; +import inet.ipaddr.IPAddressString; + +/** + * Config field conversion class for IPAddress + */ +public class IPAddressConverter implements ConvertValue { + + @Override + public IPAddress convert(ConvertInfo convertInfo) { + try { + return new IPAddressString((String) convertInfo.getValue()).toAddress(); + } catch (AddressStringException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/ListConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/ListConverter.java new file mode 100644 index 0000000000..fb7a2b0664 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/ListConverter.java @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; +import org.apache.eventmesh.common.config.convert.ConverterMap; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import com.google.common.base.Splitter; + +/** + * Config field conversion class for List + */ +public class ListConverter implements ConvertValue> { + + public String separator = ","; + + @Override + public boolean canHandleNullValue() { + return true; + } + + public String getSeparator() { + return separator; + } + + @Override + public List convert(ConvertInfo convertInfo) { + return convert(convertInfo, this.getSeparator()); + } + + @SuppressWarnings("unchecked") + public List convert(ConvertInfo convertInfo, String separator) { + try { + if (convertInfo.getValue() == null) { + return new ArrayList<>(); + } + List list; + if (Objects.equals(convertInfo.getField().getType(), List.class)) { + list = new ArrayList<>(); + } else { + list = (List) convertInfo.getField().getType().newInstance(); + } + + Type parameterizedType = ((ParameterizedType) convertInfo.getField() + .getGenericType()).getActualTypeArguments()[0]; + + ConvertValue clazzConverter = ConverterMap.getClazzConverter((Class) parameterizedType); + + List values = Splitter.on(separator).omitEmptyStrings().trimResults() + .splitToList((String) convertInfo.getValue()); + for (String value : values) { + convertInfo.setValue(value); + list.add(clazzConverter.convert(convertInfo)); + } + + return list; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + + public static class ListConverterSemi extends ListConverter { + public String separator = ";"; + + public String getSeparator() { + return separator; + } + + @Override + public List convert(ConvertInfo convertInfo) { + return super.convert(convertInfo, this.getSeparator()); + } + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/LocalDateConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/LocalDateConverter.java new file mode 100644 index 0000000000..b8c19ee0ea --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/LocalDateConverter.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +/** + * Config field conversion class for LocalDate + */ +public class LocalDateConverter implements ConvertValue { + + @Override + public LocalDate convert(ConvertInfo convertInfo) { + String value = (String) convertInfo.getValue(); + DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + return LocalDate.parse(value, timeFormatter); + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/LocalDateTimeConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/LocalDateTimeConverter.java new file mode 100644 index 0000000000..e2423397e6 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/LocalDateTimeConverter.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Config field conversion class for LocalDateTime + */ +public class LocalDateTimeConverter implements ConvertValue { + + @Override + public LocalDateTime convert(ConvertInfo convertInfo) { + String value = (String) convertInfo.getValue(); + DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + + return LocalDateTime.parse(value, timeFormatter); + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/MapConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/MapConverter.java new file mode 100644 index 0000000000..0902a758f7 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/MapConverter.java @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; +import org.apache.eventmesh.common.config.convert.ConverterMap; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Config field conversion class for Map + */ +public class MapConverter implements ConvertValue> { + + @Override + public boolean canHandleNullValue() { + return true; + } + + @SuppressWarnings("unchecked") + @Override + public Map convert(ConvertInfo convertInfo) { + try { + String key = convertInfo.getKey() + convertInfo.getHump(); + Map map; + if (Objects.equals(Map.class, convertInfo.getField().getType())) { + map = new HashMap<>(); + } else { + map = (Map) convertInfo.getField().getType().newInstance(); + } + Type parameterizedType = ((ParameterizedType) convertInfo.getField().getGenericType()).getActualTypeArguments()[1]; + ConvertValue clazzConverter = ConverterMap.getClazzConverter((Class) parameterizedType); + + for (Map.Entry entry : convertInfo.getProperties().entrySet()) { + String propertiesKey = entry.getKey().toString(); + if (propertiesKey.startsWith(key)) { + String value = entry.getValue().toString(); + convertInfo.setValue(value); + map.put(propertiesKey.replace(key, ""), clazzConverter.convert(convertInfo)); + } + } + return map; + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/ObjectConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/ObjectConverter.java new file mode 100644 index 0000000000..e1f860c5e5 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/ObjectConverter.java @@ -0,0 +1,216 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.Config; +import org.apache.eventmesh.common.config.ConfigFiled; +import org.apache.eventmesh.common.config.ConfigInfo; +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; +import org.apache.eventmesh.common.config.convert.ConverterMap; + +import org.apache.commons.lang3.StringUtils; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Objects; + +import org.assertj.core.util.Strings; + +/** + * Config field conversion class for Configuration class + */ +public class ObjectConverter implements ConvertValue { + + private String prefix; + + private ConvertInfo convertInfo; + + private Object object; + + private char hump; + + private Class clazz; + + private String reloadMethodName; + + private void init(ConfigInfo configInfo) { + String prefix = configInfo.getPrefix(); + if (Objects.nonNull(prefix)) { + this.prefix = prefix.endsWith(".") ? prefix : prefix + "."; + } + this.hump = Objects.equals(configInfo.getHump(), ConfigInfo.HUMP_ROD) ? '_' : '.'; + this.clazz = convertInfo.getClazz(); + this.convertInfo.setHump(this.hump); + this.reloadMethodName = configInfo.getReloadMethodName(); + } + + @Override + public Object convert(ConvertInfo convertInfo) { + try { + this.convertInfo = convertInfo; + this.object = convertInfo.getClazz().newInstance(); + this.init(convertInfo.getConfigInfo()); + this.setValue(); + + Class superclass = convertInfo.getClazz(); + for (; ; ) { + superclass = superclass.getSuperclass(); + if (Objects.equals(superclass, Object.class) || Objects.isNull(superclass)) { + break; + } + + this.clazz = superclass; + this.prefix = null; + Config[] configArray = clazz.getAnnotationsByType(Config.class); + if (configArray.length != 0 && !Strings.isNullOrEmpty(configArray[0].prefix())) { + String prefix = configArray[0].prefix(); + this.prefix = prefix.endsWith(".") ? prefix : prefix + "."; + this.hump = Objects.equals(configArray[0].hump(), ConfigInfo.HUMP_ROD) ? '_' : '.'; + this.convertInfo.setHump(this.hump); + this.reloadMethodName = configArray[0].reloadMethodName(); + } + + this.setValue(); + } + + return object; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private void setValue() throws Exception { + boolean needReload = Boolean.FALSE; + + for (Field field : this.clazz.getDeclaredFields()) { + if (Modifier.isStatic(field.getModifiers())) { + continue; + } + + boolean isAccessible = field.isAccessible(); + try { + field.setAccessible(true); + + ConvertInfo convertInfo = this.convertInfo; + ConfigFiled configFiled = field.getAnnotation(ConfigFiled.class); + if (Objects.isNull(configFiled)) { + continue; + } + + String key = this.buildKey(configFiled); + needReload = this.checkNeedReload(needReload, configFiled); + + ConvertValue convertValue = ConverterMap.getFieldConverter(field); + Object fieldValue = convertValue.processFieldValue(convertInfo, key, configFiled); + + if (!checkFieldValueBefore(configFiled, key, convertValue, fieldValue)) { + continue; + } + convertInfo.setValue(fieldValue); + convertInfo.setField(field); + convertInfo.setKey(key); + Object convertedValue = convertValue.convert(convertInfo); + + if (!checkFieldValueAfter(configFiled, key, convertedValue)) { + continue; + } + field.set(object, convertedValue); + } finally { + field.setAccessible(isAccessible); + } + } + + reloadConfigIfNeed(needReload); + } + + private void reloadConfigIfNeed(boolean needReload) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { + if (needReload) { + Method method = this.clazz.getDeclaredMethod(this.reloadMethodName == null ? "reload" : this.reloadMethodName); + + boolean isAccessible = method.isAccessible(); + try { + method.setAccessible(true); + method.invoke(this.object); + } finally { + method.setAccessible(isAccessible); + } + } + } + + private boolean checkFieldValueAfter(ConfigFiled configFiled, String key, Object convertedValue) { + if (Objects.isNull(convertedValue)) { + if (configFiled.notNull()) { + throw new RuntimeException(key + " can not be null!"); + } + + return false; + } + + if (configFiled.beNumber()) { + if (!StringUtils.isNumeric(String.valueOf(convertedValue))) { + throw new RuntimeException(key + " must be number!"); + } + } + + return true; + } + + private boolean checkFieldValueBefore(ConfigFiled configFiled, String key, ConvertValue convertValue, Object fieldValue) { + if (Objects.isNull(fieldValue) && !convertValue.canHandleNullValue()) { + if (configFiled.notNull()) { + throw new RuntimeException(key + " can not be null!"); + } + + return false; + } + + return true; + } + + private boolean checkNeedReload(boolean needReload, ConfigFiled configFiled) { + if (!needReload && configFiled != null && configFiled.reload()) { + needReload = Boolean.TRUE; + } + + if (needReload) { + try { + this.clazz.getDeclaredMethod(this.reloadMethodName == null ? "reload" : this.reloadMethodName); + } catch (NoSuchMethodException e) { + throw new RuntimeException("The field needs to be reloaded, but the reload method cannot be found.", e); + } + } + + return needReload; + } + + private String buildKey(ConfigFiled configFiled) { + String key; + StringBuilder keyPrefix = new StringBuilder(Objects.isNull(prefix) ? "" : prefix); + + if (configFiled == null || configFiled.field().isEmpty() && keyPrefix.length() > 0) { + key = keyPrefix.deleteCharAt(keyPrefix.length() - 1).toString(); + } else { + key = keyPrefix.append(configFiled.field()).toString(); + } + + return key; + } +} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/PropertiesConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/PropertiesConverter.java new file mode 100644 index 0000000000..e4dbf470df --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/PropertiesConverter.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.ConfigFiled; +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; +import org.apache.eventmesh.common.utils.PropertiesUtils; + +import org.apache.commons.lang3.StringUtils; + +import java.util.Properties; + +/** + * Config field conversion class for Properties, by prefix + */ +public class PropertiesConverter implements ConvertValue { + + @Override + public Properties convert(ConvertInfo convertInfo) { + try { + return (Properties) convertInfo.getValue(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + public Object processFieldValue(ConvertInfo convertInfo, String prefix, ConfigFiled configFiled) { + Properties properties = convertInfo.getProperties(); + + if (StringUtils.isBlank(prefix)) { + return null; + } + + return PropertiesUtils.getPropertiesByPrefix(properties, prefix); + } +} \ No newline at end of file diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/StringConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/StringConverter.java new file mode 100644 index 0000000000..330775d805 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/StringConverter.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import org.apache.commons.lang3.StringUtils; + +/** + * Config field conversion class for String + */ +public class StringConverter implements ConvertValue { + + @Override + public String convert(ConvertInfo convertInfo) { + String value = (String) convertInfo.getValue(); + + return StringUtils.trim(value); + } +} diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/URIConverter.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/URIConverter.java new file mode 100644 index 0000000000..bbf951c681 --- /dev/null +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/converter/URIConverter.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.common.config.convert.converter; + +import org.apache.eventmesh.common.config.convert.ConvertInfo; +import org.apache.eventmesh.common.config.convert.ConvertValue; + +import java.net.URI; + +/** + * Config field conversion class for URI + */ +public class URIConverter implements ConvertValue { + + @Override + public URI convert(ConvertInfo convertInfo) { + return URI.create((String) convertInfo.getValue()); + } +} diff --git a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/HttpMethod.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/enums/HttpMethod.java similarity index 95% rename from eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/HttpMethod.java rename to eventmesh-common/src/main/java/org/apache/eventmesh/common/enums/HttpMethod.java index 2fb4ddef3e..75a81b4976 100644 --- a/eventmesh-admin/eventmesh-admin-rocketmq/src/main/java/org/apache/eventmesh/admin/rocketmq/HttpMethod.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/enums/HttpMethod.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.eventmesh.admin.rocketmq; +package org.apache.eventmesh.common.enums; public enum HttpMethod { diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/EventMeshException.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/EventMeshException.java index 9dc45c29f9..5e106d05e8 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/EventMeshException.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/EventMeshException.java @@ -17,7 +17,8 @@ package org.apache.eventmesh.common.exception; -public class EventMeshException extends Exception { +public class EventMeshException extends RuntimeException { + public static final long serialVersionUID = 5648256502005456586L; public EventMeshException(String message) { super(message); diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/JsonException.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/JsonException.java index 50f4bfa48c..2c2c055aba 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/JsonException.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/exception/JsonException.java @@ -22,6 +22,8 @@ */ public class JsonException extends RuntimeException { + private static final long serialVersionUID = -7236194555178359309L; + public JsonException(String message) { super(message); } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileManager.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileManager.java index 157109f0d1..1944da432b 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileManager.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileManager.java @@ -21,12 +21,11 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -public class WatchFileManager { +import lombok.extern.slf4j.Slf4j; - private static final Logger LOGGER = LoggerFactory.getLogger(WatchFileManager.class); +@Slf4j +public class WatchFileManager { private static final AtomicBoolean CLOSED = new AtomicBoolean(false); @@ -34,7 +33,7 @@ public class WatchFileManager { static { Runtime.getRuntime().addShutdownHook(new Thread(() -> { - LOGGER.warn("[WatchFileManager] WatchFileManager closed"); + log.warn("[WatchFileManager] WatchFileManager closed"); shutdown(); })); } @@ -62,16 +61,23 @@ private static void shutdown() { if (!CLOSED.compareAndSet(false, true)) { return; } - LOGGER.warn("[WatchFileManager] start close"); + + if (log.isInfoEnabled()) { + log.info("[WatchFileManager] start close"); + } + for (Map.Entry entry : WATCH_FILE_TASK_MAP.entrySet()) { - LOGGER.warn("[WatchFileManager] start to shutdown : " + entry.getKey()); + if (log.isInfoEnabled()) { + log.info("[WatchFileManager] start to shutdown : {}", entry.getKey()); + } + try { entry.getValue().shutdown(); - } catch (Throwable ex) { - LOGGER.error("[WatchFileManager] shutdown has error : ", ex); + } catch (Exception ex) { + log.error("[WatchFileManager] shutdown has error : ", ex); } } WATCH_FILE_TASK_MAP.clear(); - LOGGER.warn("[WatchFileManager] already closed"); + log.warn("[WatchFileManager] already closed"); } } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileTask.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileTask.java index 577d75cc68..ecbf7951e4 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileTask.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/file/WatchFileTask.java @@ -28,22 +28,21 @@ import java.util.ArrayList; import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -public class WatchFileTask extends Thread { +import lombok.extern.slf4j.Slf4j; - private static final Logger LOGGER = LoggerFactory.getLogger(WatchFileTask.class); +@Slf4j +public class WatchFileTask extends Thread { private static final FileSystem FILE_SYSTEM = FileSystems.getDefault(); - private final WatchService watchService; + private final transient WatchService watchService; - private final List fileChangeListeners = new ArrayList<>(); + private final transient List fileChangeListeners = new ArrayList<>(); - private volatile boolean watch = true; + private transient volatile boolean watch = true; - private final String directoryPath; + private final transient String directoryPath; public WatchFileTask(String directoryPath) { this.directoryPath = directoryPath; @@ -55,12 +54,11 @@ public WatchFileTask(String directoryPath) { throw new IllegalArgumentException("must be a file directory : " + directoryPath); } - try { - WatchService service = FILE_SYSTEM.newWatchService(); - path.register(service, StandardWatchEventKinds.OVERFLOW, StandardWatchEventKinds.ENTRY_MODIFY, + try (WatchService watchService = FILE_SYSTEM.newWatchService()) { + this.watchService = watchService; + path.register(this.watchService, StandardWatchEventKinds.OVERFLOW, StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_CREATE, StandardWatchEventKinds.ENTRY_DELETE); - this.watchService = service; - } catch (Throwable ex) { + } catch (Exception ex) { throw new UnsupportedOperationException("WatchService registry fail", ex); } } @@ -90,7 +88,9 @@ public void run() { for (WatchEvent event : events) { WatchEvent.Kind kind = event.kind(); if (kind.equals(StandardWatchEventKinds.OVERFLOW)) { - LOGGER.warn("[WatchFileTask] file overflow: " + event.context()); + if (log.isWarnEnabled()) { + log.warn("[WatchFileTask] file overflow: {}", event.context()); + } continue; } precessWatchEvent(event); @@ -98,12 +98,12 @@ public void run() { } catch (InterruptedException ex) { boolean interrupted = Thread.interrupted(); if (interrupted) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("[WatchFileTask] file watch is interrupted"); + if (log.isDebugEnabled()) { + log.debug("[WatchFileTask] file watch is interrupted"); } } - } catch (Throwable ex) { - LOGGER.error("[WatchFileTask] an exception occurred during file listening : ", ex); + } catch (Exception ex) { + log.error("[WatchFileTask] an exception occurred during file listening : ", ex); } } } @@ -119,8 +119,8 @@ private void precessWatchEvent(WatchEvent event) { fileChangeListener.onChanged(context); } } - } catch (Throwable ex) { - LOGGER.error("[WatchFileTask] file change event callback error : ", ex); + } catch (Exception ex) { + log.error("[WatchFileTask] file change event callback error : ", ex); } } } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/LoadBalanceType.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/LoadBalanceType.java index 6096abdf6b..b85918b251 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/LoadBalanceType.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/LoadBalanceType.java @@ -24,8 +24,8 @@ public enum LoadBalanceType { WEIGHT_ROUND_ROBIN(1, "weight round robin load balance strategy"), WEIGHT_RANDOM(2, "weight random load balance strategy"); - private int code; - private String desc; + private final int code; + private final String desc; LoadBalanceType(int code, String desc) { this.code = code; @@ -36,16 +36,8 @@ public int getCode() { return code; } - public void setCode(int code) { - this.code = code; - } - public String getDesc() { return desc; } - public void setDesc(String desc) { - this.desc = desc; - } - } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelector.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelector.java index f04a7683c2..22889499f8 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelector.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelector.java @@ -18,12 +18,12 @@ package org.apache.eventmesh.common.loadbalance; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.RandomUtils; import java.util.List; +import java.util.concurrent.ThreadLocalRandom; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import lombok.extern.slf4j.Slf4j; /** * This selector use random strategy. @@ -31,11 +31,10 @@ * * @param Target type */ +@Slf4j public class RandomLoadBalanceSelector implements LoadBalanceSelector { - private final Logger logger = LoggerFactory.getLogger(RandomLoadBalanceSelector.class); - - private final List clusterGroup; + private final transient List clusterGroup; public RandomLoadBalanceSelector(List clusterGroup) { this.clusterGroup = clusterGroup; @@ -44,10 +43,10 @@ public RandomLoadBalanceSelector(List clusterGroup) { @Override public T select() { if (CollectionUtils.isEmpty(clusterGroup)) { - logger.warn("No servers available"); + log.warn("No servers available"); return null; } - return clusterGroup.get(RandomUtils.nextInt(0, clusterGroup.size())); + return clusterGroup.get(ThreadLocalRandom.current().nextInt(clusterGroup.size())); } @Override diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/Weight.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/Weight.java index cba255b43d..880d47ab1f 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/Weight.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/Weight.java @@ -23,13 +23,13 @@ public class Weight { private T target; - private final int weight; + private final int value; private final AtomicInteger currentWeight; - public Weight(T target, int weight) { + public Weight(T target, int value) { this.target = target; - this.weight = weight; + this.value = value; this.currentWeight = new AtomicInteger(0); } @@ -38,7 +38,7 @@ public void decreaseTotal(int total) { } public void increaseCurrentWeight() { - currentWeight.addAndGet(weight); + currentWeight.addAndGet(value); } @@ -50,8 +50,8 @@ public void setTarget(T target) { this.target = target; } - public int getWeight() { - return weight; + public int getValue() { + return value; } @@ -63,7 +63,7 @@ public AtomicInteger getCurrentWeight() { public String toString() { return "Wight{" + "target=" + target - + ", weight=" + weight + + ", value=" + value + ", currentWeight=" + currentWeight + '}'; } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelector.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelector.java index 5b7904e69f..1c5b7ba999 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelector.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelector.java @@ -20,9 +20,9 @@ import org.apache.eventmesh.common.exception.EventMeshException; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.RandomUtils; import java.util.List; +import java.util.concurrent.ThreadLocalRandom; /** * This selector use the weighted random strategy to select from list. @@ -33,21 +33,21 @@ */ public class WeightRandomLoadBalanceSelector implements LoadBalanceSelector { - private final List> clusterGroup; + private final transient List> clusterGroup; - private final int totalWeight; + private final transient int totalWeight; - private boolean sameWeightGroup = true; + private transient boolean sameWeightGroup = true; public WeightRandomLoadBalanceSelector(List> clusterGroup) throws EventMeshException { if (CollectionUtils.isEmpty(clusterGroup)) { throw new EventMeshException("clusterGroup can not be empty"); } int totalWeight = 0; - int firstWeight = clusterGroup.get(0).getWeight(); + int firstWeight = clusterGroup.get(0).getValue(); for (Weight weight : clusterGroup) { - totalWeight += weight.getWeight(); - if (sameWeightGroup && firstWeight != weight.getWeight()) { + totalWeight += weight.getValue(); + if (sameWeightGroup && firstWeight != weight.getValue()) { sameWeightGroup = false; } } @@ -58,16 +58,17 @@ public WeightRandomLoadBalanceSelector(List> clusterGroup) throws Even @Override public T select() { if (!sameWeightGroup) { - int targetWeight = RandomUtils.nextInt(0, totalWeight); + int targetWeight = ThreadLocalRandom.current().nextInt(totalWeight); for (Weight weight : clusterGroup) { - targetWeight -= weight.getWeight(); + targetWeight -= weight.getValue(); if (targetWeight < 0) { return weight.getTarget(); } } } + int length = clusterGroup.size(); - return clusterGroup.get(RandomUtils.nextInt(0, length)).getTarget(); + return clusterGroup.get(ThreadLocalRandom.current().nextInt(length)).getTarget(); } @Override diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelector.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelector.java index 29dcc729e9..3bb4b6d592 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelector.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelector.java @@ -21,8 +21,8 @@ import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import lombok.extern.slf4j.Slf4j; /** * This selector use the weighted round robin strategy to select from list. @@ -30,18 +30,17 @@ * * @param Target type */ +@Slf4j public class WeightRoundRobinLoadBalanceSelector implements LoadBalanceSelector { - private final Logger logger = LoggerFactory.getLogger(WeightRoundRobinLoadBalanceSelector.class); - - private final List> clusterGroup; + private final transient List> clusterGroup; - private final int totalWeight; + private final transient int totalWeight; public WeightRoundRobinLoadBalanceSelector(List> clusterGroup) { int totalWeight = 0; for (Weight weight : clusterGroup) { - totalWeight += weight.getWeight(); + totalWeight += weight.getValue(); } this.clusterGroup = clusterGroup; this.totalWeight = totalWeight; @@ -52,7 +51,7 @@ public WeightRoundRobinLoadBalanceSelector(List> clusterGroup) { @SuppressWarnings("ConstantConditions") public T select() { if (CollectionUtils.isEmpty(clusterGroup)) { - logger.warn("No servers available"); + log.warn("No servers available"); return null; } Weight targetWeight = null; diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionItem.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionItem.java index 5fb0e5f132..469d6d490f 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionItem.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionItem.java @@ -24,6 +24,8 @@ public class SubscriptionItem implements Serializable { + public static final long serialVersionUID = 2375640521211793028L; + private String topic; @JsonDeserialize(converter = SubscriptionModeConverter.class) diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionMode.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionMode.java index ad4b751a46..7683beee78 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionMode.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionMode.java @@ -28,7 +28,7 @@ public enum SubscriptionMode { */ CLUSTERING("CLUSTERING"); - private String mode; + private final String mode; SubscriptionMode(String mode) { this.mode = mode; @@ -38,8 +38,4 @@ public String getMode() { return mode; } - public void setMode(String mode) { - this.mode = mode; - } - } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionType.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionType.java index 7efe3089b8..996cbfe14d 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionType.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/SubscriptionType.java @@ -27,7 +27,7 @@ public enum SubscriptionType { */ ASYNC("ASYNC"); - private String type; + private final String type; SubscriptionType(String type) { this.type = type; @@ -37,7 +37,4 @@ public String getType() { return type; } - public void setType(String type) { - this.type = type; - } } diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/Operation.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/Operation.java index 57dc576ed5..ea297667bb 100644 --- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/Operation.java +++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/Operation.java @@ -20,50 +20,77 @@ package org.apache.eventmesh.common.protocol.catalog.protos; +import java.util.Objects; + +import com.google.protobuf.ByteString; + /** * Protobuf type {@code eventmesh.catalog.api.protocol.Operation} */ @SuppressWarnings({"all"}) public final class Operation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:eventmesh.catalog.api.protocol.Operation) - OperationOrBuilder { - private static final long serialVersionUID = 0L; + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:eventmesh.catalog.api.protocol.Operation) + OperationOrBuilder { + private static final long serialVersionUID = 7231240618302324570L; + + public static final int CHANNEL_NAME_FIELD_NUMBER = 1; + public static final int SCHEMA_FIELD_NUMBER = 2; + public static final int TYPE_FIELD_NUMBER = 3; + + private static final Operation DEFAULT_INSTANCE; + + private volatile String channelName; + private volatile String schema; + private volatile String type; + private byte memoizedIsInitialized = -1; // Use Operation.newBuilder() to construct. + + + static { + DEFAULT_INSTANCE = new Operation(); + } + + public static Operation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + private Operation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Operation() { - channelName_ = ""; - schema_ = ""; - type_ = ""; + channelName = ""; + schema = ""; + type = ""; } @Override @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { + protected Object newInstance(UnusedPrivateParameter unused) { return new Operation(); } @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Operation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + Objects.requireNonNull(input, "CodedInputStream can not be null"); + Objects.requireNonNull(extensionRegistry, "ExtensionRegistryLite can not be null"); + if (extensionRegistry == null) { throw new NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -73,26 +100,20 @@ private Operation( done = true; break; case 10: { - String s = input.readStringRequireUtf8(); - - channelName_ = s; + channelName = input.readStringRequireUtf8(); break; } case 18: { - String s = input.readStringRequireUtf8(); - - schema_ = s; + schema = input.readStringRequireUtf8(); break; } case 26: { - String s = input.readStringRequireUtf8(); - - type_ = s; + type = input.readStringRequireUtf8(); break; } default: { if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -103,15 +124,14 @@ private Operation( throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_Operation_descriptor; } @@ -119,12 +139,10 @@ private Operation( protected FieldAccessorTable internalGetFieldAccessorTable() { return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_Operation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Operation.class, Builder.class); + .ensureFieldAccessorsInitialized( + Operation.class, Builder.class); } - public static final int CHANNEL_NAME_FIELD_NUMBER = 1; - private volatile Object channelName_; /** * string channel_name = 1; @@ -133,16 +151,7 @@ private Operation( */ @Override public String getChannelName() { - Object ref = channelName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - channelName_ = s; - return s; - } + return channelName; } /** @@ -151,22 +160,10 @@ public String getChannelName() { * @return The bytes for channelName. */ @Override - public com.google.protobuf.ByteString - getChannelNameBytes() { - Object ref = channelName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - channelName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getChannelNameBytes() { + return ByteString.copyFromUtf8(channelName); } - public static final int SCHEMA_FIELD_NUMBER = 2; - private volatile Object schema_; /** * string schema = 2; @@ -175,16 +172,7 @@ public String getChannelName() { */ @Override public String getSchema() { - Object ref = schema_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - schema_ = s; - return s; - } + return schema; } /** @@ -193,22 +181,10 @@ public String getSchema() { * @return The bytes for schema. */ @Override - public com.google.protobuf.ByteString - getSchemaBytes() { - Object ref = schema_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - schema_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public com.google.protobuf.ByteString getSchemaBytes() { - public static final int TYPE_FIELD_NUMBER = 3; - private volatile Object type_; + return ByteString.copyFromUtf8(schema); + } /** *
@@ -221,16 +197,8 @@ public String getSchema() {
      */
     @Override
     public String getType() {
-        Object ref = type_;
-        if (ref instanceof String) {
-            return (String) ref;
-        } else {
-            com.google.protobuf.ByteString bs =
-                (com.google.protobuf.ByteString) ref;
-            String s = bs.toStringUtf8();
-            type_ = s;
-            return s;
-        }
+
+        return type;
     }
 
     /**
@@ -243,21 +211,11 @@ public String getType() {
      * @return The bytes for type.
      */
     @Override
-    public com.google.protobuf.ByteString
-    getTypeBytes() {
-        Object ref = type_;
-        if (ref instanceof String) {
-            com.google.protobuf.ByteString b =
-                com.google.protobuf.ByteString.copyFromUtf8(
-                    (String) ref);
-            type_ = b;
-            return b;
-        } else {
-            return (com.google.protobuf.ByteString) ref;
-        }
+    public com.google.protobuf.ByteString getTypeBytes() {
+
+        return ByteString.copyFromUtf8(type);
     }
 
-    private byte memoizedIsInitialized = -1;
 
     @Override
     public final boolean isInitialized() {
@@ -275,15 +233,15 @@ public final boolean isInitialized() {
 
     @Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
+            throws java.io.IOException {
         if (!getChannelNameBytes().isEmpty()) {
-            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelName_);
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channelName);
         }
         if (!getSchemaBytes().isEmpty()) {
-            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schema_);
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schema);
         }
         if (!getTypeBytes().isEmpty()) {
-            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_);
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type);
         }
         unknownFields.writeTo(output);
     }
@@ -297,13 +255,13 @@ public int getSerializedSize() {
 
         size = 0;
         if (!getChannelNameBytes().isEmpty()) {
-            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelName_);
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channelName);
         }
         if (!getSchemaBytes().isEmpty()) {
-            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schema_);
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schema);
         }
         if (!getTypeBytes().isEmpty()) {
-            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_);
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type);
         }
         size += unknownFields.getSerializedSize();
         memoizedSize = size;
@@ -321,15 +279,15 @@ public boolean equals(final Object obj) {
         Operation other = (Operation) obj;
 
         if (!getChannelName()
-            .equals(other.getChannelName())) {
+                .equals(other.getChannelName())) {
             return false;
         }
         if (!getSchema()
-            .equals(other.getSchema())) {
+                .equals(other.getSchema())) {
             return false;
         }
         if (!getType()
-            .equals(other.getType())) {
+                .equals(other.getType())) {
             return false;
         }
         if (!unknownFields.equals(other.unknownFields)) {
@@ -357,84 +315,84 @@ public int hashCode() {
     }
 
     public static Operation parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static Operation parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static Operation parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static Operation parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static Operation parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static Operation parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static Operation parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input);
+                .parseWithIOException(PARSER, input);
     }
 
     public static Operation parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input, extensionRegistry);
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static Operation parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseDelimitedWithIOException(PARSER, input);
+                .parseDelimitedWithIOException(PARSER, input);
     }
 
     public static Operation parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static Operation parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input);
+                .parseWithIOException(PARSER, input);
     }
 
     public static Operation parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input, extensionRegistry);
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     @Override
@@ -453,23 +411,25 @@ public static Builder newBuilder(Operation prototype) {
     @Override
     public Builder toBuilder() {
         return this == DEFAULT_INSTANCE
-            ? new Builder() : new Builder().mergeFrom(this);
+                ? new Builder() : new Builder().mergeFrom(this);
     }
 
     @Override
-    protected Builder newBuilderForType(
-        BuilderParent parent) {
-        Builder builder = new Builder(parent);
-        return builder;
+    protected Builder newBuilderForType(BuilderParent parent) {
+        return new Builder(parent);
     }
 
+
     /**
      * Protobuf type {@code eventmesh.catalog.api.protocol.Operation}
      */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:eventmesh.catalog.api.protocol.Operation)
-        OperationOrBuilder {
+    public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+            implements OperationOrBuilder {
+
+        private String type = "";
+        private String channelName = "";
+        private String schema = "";
+
         public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
             return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_Operation_descriptor;
@@ -479,8 +439,8 @@ public static final class Builder extends
         protected FieldAccessorTable
         internalGetFieldAccessorTable() {
             return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_Operation_fieldAccessorTable
-                .ensureFieldAccessorsInitialized(
-                    Operation.class, Builder.class);
+                    .ensureFieldAccessorsInitialized(
+                            Operation.class, Builder.class);
         }
 
         // Construct using org.apache.eventmesh.common.protocol.catalog.protos.Operation.newBuilder()
@@ -489,26 +449,23 @@ private Builder() {
         }
 
         private Builder(
-            BuilderParent parent) {
+                BuilderParent parent) {
             super(parent);
             maybeForceBuilderInitialization();
         }
 
         private void maybeForceBuilderInitialization() {
             if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
+                    .alwaysUseFieldBuilders) {
             }
         }
 
         @Override
         public Builder clear() {
             super.clear();
-            channelName_ = "";
-
-            schema_ = "";
-
-            type_ = "";
-
+            channelName = "";
+            schema = "";
+            type = "";
             return this;
         }
 
@@ -535,9 +492,9 @@ public Operation build() {
         @Override
         public Operation buildPartial() {
             Operation result = new Operation(this);
-            result.channelName_ = channelName_;
-            result.schema_ = schema_;
-            result.type_ = type_;
+            result.channelName = channelName;
+            result.schema = schema;
+            result.type = type;
             onBuilt();
             return result;
         }
@@ -549,34 +506,34 @@ public Builder clone() {
 
         @Override
         public Builder setField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
             return super.setField(field, value);
         }
 
         @Override
         public Builder clearField(
-            com.google.protobuf.Descriptors.FieldDescriptor field) {
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
             return super.clearField(field);
         }
 
         @Override
         public Builder clearOneof(
-            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
             return super.clearOneof(oneof);
         }
 
         @Override
         public Builder setRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            int index, Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
             return super.setRepeatedField(field, index, value);
         }
 
         @Override
         public Builder addRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
             return super.addRepeatedField(field, value);
         }
 
@@ -595,15 +552,15 @@ public Builder mergeFrom(Operation other) {
                 return this;
             }
             if (!other.getChannelName().isEmpty()) {
-                channelName_ = other.channelName_;
+                channelName = other.channelName;
                 onChanged();
             }
             if (!other.getSchema().isEmpty()) {
-                schema_ = other.schema_;
+                schema = other.schema;
                 onChanged();
             }
             if (!other.getType().isEmpty()) {
-                type_ = other.type_;
+                type = other.type;
                 onChanged();
             }
             this.mergeUnknownFields(other.unknownFields);
@@ -618,9 +575,9 @@ public final boolean isInitialized() {
 
         @Override
         public Builder mergeFrom(
-            com.google.protobuf.CodedInputStream input,
-            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-            throws java.io.IOException {
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
             Operation parsedMessage = null;
             try {
                 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
@@ -635,7 +592,6 @@ public Builder mergeFrom(
             return this;
         }
 
-        private Object channelName_ = "";
 
         /**
          * string channel_name = 1;
@@ -643,16 +599,7 @@ public Builder mergeFrom(
          * @return The channelName.
          */
         public String getChannelName() {
-            Object ref = channelName_;
-            if (!(ref instanceof String)) {
-                com.google.protobuf.ByteString bs =
-                    (com.google.protobuf.ByteString) ref;
-                String s = bs.toStringUtf8();
-                channelName_ = s;
-                return s;
-            } else {
-                return (String) ref;
-            }
+            return channelName;
         }
 
         /**
@@ -660,18 +607,9 @@ public String getChannelName() {
          *
          * @return The bytes for channelName.
          */
-        public com.google.protobuf.ByteString
-        getChannelNameBytes() {
-            Object ref = channelName_;
-            if (ref instanceof String) {
-                com.google.protobuf.ByteString b =
-                    com.google.protobuf.ByteString.copyFromUtf8(
-                        (String) ref);
-                channelName_ = b;
-                return b;
-            } else {
-                return (com.google.protobuf.ByteString) ref;
-            }
+        public com.google.protobuf.ByteString getChannelNameBytes() {
+
+            return ByteString.copyFromUtf8(channelName);
         }
 
         /**
@@ -680,13 +618,10 @@ public String getChannelName() {
          * @param value The channelName to set.
          * @return This builder for chaining.
          */
-        public Builder setChannelName(
-            String value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+        public Builder setChannelName(String value) {
+            Objects.requireNonNull(value, "channelname can not be null");
 
-            channelName_ = value;
+            channelName = value;
             onChanged();
             return this;
         }
@@ -697,8 +632,7 @@ public Builder setChannelName(
          * @return This builder for chaining.
          */
         public Builder clearChannelName() {
-
-            channelName_ = getDefaultInstance().getChannelName();
+            channelName = getDefaultInstance().getChannelName();
             onChanged();
             return this;
         }
@@ -709,36 +643,22 @@ public Builder clearChannelName() {
          * @param value The bytes for channelName to set.
          * @return This builder for chaining.
          */
-        public Builder setChannelNameBytes(
-            com.google.protobuf.ByteString value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+        public Builder setChannelNameBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "channelname can not be null");
             checkByteStringIsUtf8(value);
 
-            channelName_ = value;
+            channelName = value.toStringUtf8();
             onChanged();
             return this;
         }
 
-        private Object schema_ = "";
-
         /**
          * string schema = 2;
          *
          * @return The schema.
          */
         public String getSchema() {
-            Object ref = schema_;
-            if (!(ref instanceof String)) {
-                com.google.protobuf.ByteString bs =
-                    (com.google.protobuf.ByteString) ref;
-                String s = bs.toStringUtf8();
-                schema_ = s;
-                return s;
-            } else {
-                return (String) ref;
-            }
+            return schema;
         }
 
         /**
@@ -748,16 +668,7 @@ public String getSchema() {
          */
         public com.google.protobuf.ByteString
         getSchemaBytes() {
-            Object ref = schema_;
-            if (ref instanceof String) {
-                com.google.protobuf.ByteString b =
-                    com.google.protobuf.ByteString.copyFromUtf8(
-                        (String) ref);
-                schema_ = b;
-                return b;
-            } else {
-                return (com.google.protobuf.ByteString) ref;
-            }
+            return ByteString.copyFromUtf8(schema);
         }
 
         /**
@@ -766,13 +677,10 @@ public String getSchema() {
          * @param value The schema to set.
          * @return This builder for chaining.
          */
-        public Builder setSchema(
-            String value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+        public Builder setSchema(String value) {
+            Objects.requireNonNull(value, "schema can not be null");
 
-            schema_ = value;
+            schema = value;
             onChanged();
             return this;
         }
@@ -783,8 +691,7 @@ public Builder setSchema(
          * @return This builder for chaining.
          */
         public Builder clearSchema() {
-
-            schema_ = getDefaultInstance().getSchema();
+            schema = getDefaultInstance().getSchema();
             onChanged();
             return this;
         }
@@ -795,19 +702,15 @@ public Builder clearSchema() {
          * @param value The bytes for schema to set.
          * @return This builder for chaining.
          */
-        public Builder setSchemaBytes(
-            com.google.protobuf.ByteString value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+        public Builder setSchemaBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "schema can not be null");
             checkByteStringIsUtf8(value);
 
-            schema_ = value;
+            schema = value.toStringUtf8();
             onChanged();
             return this;
         }
 
-        private Object type_ = "";
 
         /**
          * 
@@ -819,16 +722,8 @@ public Builder setSchemaBytes(
          * @return The type.
          */
         public String getType() {
-            Object ref = type_;
-            if (!(ref instanceof String)) {
-                com.google.protobuf.ByteString bs =
-                    (com.google.protobuf.ByteString) ref;
-                String s = bs.toStringUtf8();
-                type_ = s;
-                return s;
-            } else {
-                return (String) ref;
-            }
+
+            return type;
         }
 
         /**
@@ -840,18 +735,8 @@ public String getType() {
          *
          * @return The bytes for type.
          */
-        public com.google.protobuf.ByteString
-        getTypeBytes() {
-            Object ref = type_;
-            if (ref instanceof String) {
-                com.google.protobuf.ByteString b =
-                    com.google.protobuf.ByteString.copyFromUtf8(
-                        (String) ref);
-                type_ = b;
-                return b;
-            } else {
-                return (com.google.protobuf.ByteString) ref;
-            }
+        public com.google.protobuf.ByteString getTypeBytes() {
+            return ByteString.copyFromUtf8(type);
         }
 
         /**
@@ -864,13 +749,10 @@ public String getType() {
          * @param value The type to set.
          * @return This builder for chaining.
          */
-        public Builder setType(
-            String value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+        public Builder setType(String value) {
+            Objects.requireNonNull(value, "type can not be null");
 
-            type_ = value;
+            type = value;
             onChanged();
             return this;
         }
@@ -885,8 +767,7 @@ public Builder setType(
          * @return This builder for chaining.
          */
         public Builder clearType() {
-
-            type_ = getDefaultInstance().getType();
+            type = getDefaultInstance().getType();
             onChanged();
             return this;
         }
@@ -901,27 +782,24 @@ public Builder clearType() {
          * @param value The bytes for type to set.
          * @return This builder for chaining.
          */
-        public Builder setTypeBytes(
-            com.google.protobuf.ByteString value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+        public Builder setTypeBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "type can not be null");
             checkByteStringIsUtf8(value);
 
-            type_ = value;
+            type = value.toStringUtf8();
             onChanged();
             return this;
         }
 
         @Override
         public final Builder setUnknownFields(
-            final com.google.protobuf.UnknownFieldSet unknownFields) {
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
             return super.setUnknownFields(unknownFields);
         }
 
         @Override
         public final Builder mergeUnknownFields(
-            final com.google.protobuf.UnknownFieldSet unknownFields) {
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
             return super.mergeUnknownFields(unknownFields);
         }
 
@@ -930,23 +808,15 @@ public final Builder mergeUnknownFields(
     }
 
     // @@protoc_insertion_point(class_scope:eventmesh.catalog.api.protocol.Operation)
-    private static final Operation DEFAULT_INSTANCE;
-
-    static {
-        DEFAULT_INSTANCE = new Operation();
-    }
 
-    public static Operation getDefaultInstance() {
-        return DEFAULT_INSTANCE;
-    }
 
     private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
+            PARSER = new com.google.protobuf.AbstractParser() {
         @Override
         public Operation parsePartialFrom(
-            com.google.protobuf.CodedInputStream input,
-            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-            throws com.google.protobuf.InvalidProtocolBufferException {
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
             return new Operation(input, extensionRegistry);
         }
     };
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsRequest.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsRequest.java
index 01c50d5a88..843b6f3ae0 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsRequest.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsRequest.java
@@ -390,8 +390,7 @@ public Builder toBuilder() {
     @Override
     protected Builder newBuilderForType(
         BuilderParent parent) {
-        Builder builder = new Builder(parent);
-        return builder;
+        return new Builder(parent);
     }
 
     /**
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsResponse.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsResponse.java
index a064246500..03a7c8c03c 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsResponse.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsResponse.java
@@ -180,8 +180,8 @@ public final boolean isInitialized() {
     @Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
         throws java.io.IOException {
-        for (int i = 0; i < operations_.size(); i++) {
-            output.writeMessage(1, operations_.get(i));
+        for (Operation operation : operations_) {
+            output.writeMessage(1, operation);
         }
         unknownFields.writeTo(output);
     }
@@ -194,9 +194,9 @@ public int getSerializedSize() {
         }
 
         size = 0;
-        for (int i = 0; i < operations_.size(); i++) {
+        for (Operation operation : operations_) {
             size += com.google.protobuf.CodedOutputStream
-                .computeMessageSize(1, operations_.get(i));
+                .computeMessageSize(1, operation);
         }
         size += unknownFields.getSerializedSize();
         memoizedSize = size;
@@ -342,8 +342,7 @@ public Builder toBuilder() {
     @Override
     protected Builder newBuilderForType(
         BuilderParent parent) {
-        Builder builder = new Builder(parent);
-        return builder;
+        return new Builder(parent);
     }
 
     /**
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryRequest.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryRequest.java
index 5d0dd0eda4..b80ad2f5ea 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryRequest.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryRequest.java
@@ -20,15 +20,19 @@
 
 package org.apache.eventmesh.common.protocol.catalog.protos;
 
+import java.util.Objects;
+
+import com.google.protobuf.ByteString;
+
 /**
  * Protobuf type {@code eventmesh.catalog.api.protocol.RegistryRequest}
  */
 @SuppressWarnings({"all"})
 public final class RegistryRequest extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.catalog.api.protocol.RegistryRequest)
-    RegistryRequestOrBuilder {
-    private static final long serialVersionUID = 0L;
+        com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.catalog.api.protocol.RegistryRequest)
+        RegistryRequestOrBuilder {
+    private static final long serialVersionUID = 3745623108415722309L;
 
     // Use RegistryRequest.newBuilder() to construct.
     private RegistryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
@@ -43,7 +47,7 @@ private RegistryRequest() {
     @Override
     @SuppressWarnings({"unused"})
     protected Object newInstance(
-        UnusedPrivateParameter unused) {
+            UnusedPrivateParameter unused) {
         return new RegistryRequest();
     }
 
@@ -54,15 +58,15 @@ protected Object newInstance(
     }
 
     private RegistryRequest(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         this();
-        if (extensionRegistry == null) {
-            throw new NullPointerException();
-        }
+        Objects.requireNonNull(input, "CodedInputStream can not be null");
+        Objects.requireNonNull(extensionRegistry, "ExtensionRegistryLite can not be null");
+
         com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-            com.google.protobuf.UnknownFieldSet.newBuilder();
+                com.google.protobuf.UnknownFieldSet.newBuilder();
         try {
             boolean done = false;
             while (!done) {
@@ -72,20 +76,16 @@ private RegistryRequest(
                         done = true;
                         break;
                     case 10: {
-                        String s = input.readStringRequireUtf8();
-
-                        fileName_ = s;
+                        fileName_ = input.readStringRequireUtf8();
                         break;
                     }
                     case 18: {
-                        String s = input.readStringRequireUtf8();
-
-                        definition_ = s;
+                        definition_ = input.readStringRequireUtf8();
                         break;
                     }
                     default: {
                         if (!parseUnknownField(
-                            input, unknownFields, extensionRegistry, tag)) {
+                                input, unknownFields, extensionRegistry, tag)) {
                             done = true;
                         }
                         break;
@@ -96,7 +96,7 @@ private RegistryRequest(
             throw e.setUnfinishedMessage(this);
         } catch (java.io.IOException e) {
             throw new com.google.protobuf.InvalidProtocolBufferException(
-                e).setUnfinishedMessage(this);
+                    e).setUnfinishedMessage(this);
         } finally {
             this.unknownFields = unknownFields.build();
             makeExtensionsImmutable();
@@ -112,12 +112,12 @@ private RegistryRequest(
     protected FieldAccessorTable
     internalGetFieldAccessorTable() {
         return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_RegistryRequest_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                RegistryRequest.class, Builder.class);
+                .ensureFieldAccessorsInitialized(
+                        RegistryRequest.class, Builder.class);
     }
 
     public static final int FILE_NAME_FIELD_NUMBER = 1;
-    private volatile Object fileName_;
+    private volatile String fileName_;
 
     /**
      * string file_name = 1;
@@ -126,16 +126,7 @@ private RegistryRequest(
      */
     @Override
     public String getFileName() {
-        Object ref = fileName_;
-        if (ref instanceof String) {
-            return (String) ref;
-        } else {
-            com.google.protobuf.ByteString bs =
-                (com.google.protobuf.ByteString) ref;
-            String s = bs.toStringUtf8();
-            fileName_ = s;
-            return s;
-        }
+        return fileName_;
     }
 
     /**
@@ -144,22 +135,12 @@ public String getFileName() {
      * @return The bytes for fileName.
      */
     @Override
-    public com.google.protobuf.ByteString
-    getFileNameBytes() {
-        Object ref = fileName_;
-        if (ref instanceof String) {
-            com.google.protobuf.ByteString b =
-                com.google.protobuf.ByteString.copyFromUtf8(
-                    (String) ref);
-            fileName_ = b;
-            return b;
-        } else {
-            return (com.google.protobuf.ByteString) ref;
-        }
+    public com.google.protobuf.ByteString getFileNameBytes() {
+        return ByteString.copyFromUtf8(fileName_);
     }
 
     public static final int DEFINITION_FIELD_NUMBER = 2;
-    private volatile Object definition_;
+    private volatile String definition_;
 
     /**
      * string definition = 2;
@@ -168,16 +149,7 @@ public String getFileName() {
      */
     @Override
     public String getDefinition() {
-        Object ref = definition_;
-        if (ref instanceof String) {
-            return (String) ref;
-        } else {
-            com.google.protobuf.ByteString bs =
-                (com.google.protobuf.ByteString) ref;
-            String s = bs.toStringUtf8();
-            definition_ = s;
-            return s;
-        }
+        return definition_;
     }
 
     /**
@@ -188,27 +160,17 @@ public String getDefinition() {
     @Override
     public com.google.protobuf.ByteString
     getDefinitionBytes() {
-        Object ref = definition_;
-        if (ref instanceof String) {
-            com.google.protobuf.ByteString b =
-                com.google.protobuf.ByteString.copyFromUtf8(
-                    (String) ref);
-            definition_ = b;
-            return b;
-        } else {
-            return (com.google.protobuf.ByteString) ref;
-        }
+        return ByteString.copyFromUtf8(definition_);
     }
 
     private byte memoizedIsInitialized = -1;
 
     @Override
     public final boolean isInitialized() {
-        byte isInitialized = memoizedIsInitialized;
-        if (isInitialized == 1) {
+        if (memoizedIsInitialized == 1) {
             return true;
         }
-        if (isInitialized == 0) {
+        if (memoizedIsInitialized == 0) {
             return false;
         }
 
@@ -218,7 +180,7 @@ public final boolean isInitialized() {
 
     @Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
+            throws java.io.IOException {
         if (!getFileNameBytes().isEmpty()) {
             com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fileName_);
         }
@@ -258,16 +220,13 @@ public boolean equals(final Object obj) {
         RegistryRequest other = (RegistryRequest) obj;
 
         if (!getFileName()
-            .equals(other.getFileName())) {
-            return false;
-        }
-        if (!getDefinition()
-            .equals(other.getDefinition())) {
-            return false;
-        }
-        if (!unknownFields.equals(other.unknownFields)) {
+                .equals(other.getFileName())
+                || !getDefinition()
+                .equals(other.getDefinition())
+                || !unknownFields.equals(other.unknownFields)) {
             return false;
         }
+
         return true;
     }
 
@@ -288,84 +247,84 @@ public int hashCode() {
     }
 
     public static RegistryRequest parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static RegistryRequest parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static RegistryRequest parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static RegistryRequest parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static RegistryRequest parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static RegistryRequest parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static RegistryRequest parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input);
+                .parseWithIOException(PARSER, input);
     }
 
     public static RegistryRequest parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input, extensionRegistry);
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static RegistryRequest parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseDelimitedWithIOException(PARSER, input);
+                .parseDelimitedWithIOException(PARSER, input);
     }
 
     public static RegistryRequest parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static RegistryRequest parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input);
+                .parseWithIOException(PARSER, input);
     }
 
     public static RegistryRequest parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input, extensionRegistry);
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     @Override
@@ -384,12 +343,12 @@ public static Builder newBuilder(RegistryRequest prototype) {
     @Override
     public Builder toBuilder() {
         return this == DEFAULT_INSTANCE
-            ? new Builder() : new Builder().mergeFrom(this);
+                ? new Builder() : new Builder().mergeFrom(this);
     }
 
     @Override
     protected Builder newBuilderForType(
-        BuilderParent parent) {
+            BuilderParent parent) {
         Builder builder = new Builder(parent);
         return builder;
     }
@@ -398,9 +357,9 @@ protected Builder newBuilderForType(
      * Protobuf type {@code eventmesh.catalog.api.protocol.RegistryRequest}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:eventmesh.catalog.api.protocol.RegistryRequest)
-        RegistryRequestOrBuilder {
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.catalog.api.protocol.RegistryRequest)
+            RegistryRequestOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
             return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_RegistryRequest_descriptor;
@@ -410,8 +369,8 @@ public static final class Builder extends
         protected FieldAccessorTable
         internalGetFieldAccessorTable() {
             return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_RegistryRequest_fieldAccessorTable
-                .ensureFieldAccessorsInitialized(
-                    RegistryRequest.class, Builder.class);
+                    .ensureFieldAccessorsInitialized(
+                            RegistryRequest.class, Builder.class);
         }
 
         // Construct using org.apache.eventmesh.common.protocol.catalog.protos.RegistryRequest.newBuilder()
@@ -419,15 +378,14 @@ private Builder() {
             maybeForceBuilderInitialization();
         }
 
-        private Builder(
-            BuilderParent parent) {
+        private Builder(BuilderParent parent) {
             super(parent);
             maybeForceBuilderInitialization();
         }
 
         private void maybeForceBuilderInitialization() {
             if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
+                    .alwaysUseFieldBuilders) {
             }
         }
 
@@ -477,34 +435,34 @@ public Builder clone() {
 
         @Override
         public Builder setField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
             return super.setField(field, value);
         }
 
         @Override
         public Builder clearField(
-            com.google.protobuf.Descriptors.FieldDescriptor field) {
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
             return super.clearField(field);
         }
 
         @Override
         public Builder clearOneof(
-            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
             return super.clearOneof(oneof);
         }
 
         @Override
         public Builder setRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            int index, Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
             return super.setRepeatedField(field, index, value);
         }
 
         @Override
         public Builder addRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
             return super.addRepeatedField(field, value);
         }
 
@@ -542,9 +500,9 @@ public final boolean isInitialized() {
 
         @Override
         public Builder mergeFrom(
-            com.google.protobuf.CodedInputStream input,
-            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-            throws java.io.IOException {
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
             RegistryRequest parsedMessage = null;
             try {
                 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
@@ -559,7 +517,7 @@ public Builder mergeFrom(
             return this;
         }
 
-        private Object fileName_ = "";
+        private String fileName_ = "";
 
         /**
          * string file_name = 1;
@@ -567,16 +525,7 @@ public Builder mergeFrom(
          * @return The fileName.
          */
         public String getFileName() {
-            Object ref = fileName_;
-            if (!(ref instanceof String)) {
-                com.google.protobuf.ByteString bs =
-                    (com.google.protobuf.ByteString) ref;
-                String s = bs.toStringUtf8();
-                fileName_ = s;
-                return s;
-            } else {
-                return (String) ref;
-            }
+            return fileName_;
         }
 
         /**
@@ -586,16 +535,7 @@ public String getFileName() {
          */
         public com.google.protobuf.ByteString
         getFileNameBytes() {
-            Object ref = fileName_;
-            if (ref instanceof String) {
-                com.google.protobuf.ByteString b =
-                    com.google.protobuf.ByteString.copyFromUtf8(
-                        (String) ref);
-                fileName_ = b;
-                return b;
-            } else {
-                return (com.google.protobuf.ByteString) ref;
-            }
+            return ByteString.copyFromUtf8(fileName_);
         }
 
         /**
@@ -605,10 +545,8 @@ public String getFileName() {
          * @return This builder for chaining.
          */
         public Builder setFileName(
-            String value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+                String value) {
+            Objects.requireNonNull(value, "FileName can not be null");
 
             fileName_ = value;
             onChanged();
@@ -634,18 +572,16 @@ public Builder clearFileName() {
          * @return This builder for chaining.
          */
         public Builder setFileNameBytes(
-            com.google.protobuf.ByteString value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "FileNameBytes can not be null");
             checkByteStringIsUtf8(value);
 
-            fileName_ = value;
+            fileName_ = value.toStringUtf8();
             onChanged();
             return this;
         }
 
-        private Object definition_ = "";
+        private String definition_ = "";
 
         /**
          * string definition = 2;
@@ -653,16 +589,7 @@ public Builder setFileNameBytes(
          * @return The definition.
          */
         public String getDefinition() {
-            Object ref = definition_;
-            if (!(ref instanceof String)) {
-                com.google.protobuf.ByteString bs =
-                    (com.google.protobuf.ByteString) ref;
-                String s = bs.toStringUtf8();
-                definition_ = s;
-                return s;
-            } else {
-                return (String) ref;
-            }
+            return definition_;
         }
 
         /**
@@ -672,16 +599,7 @@ public String getDefinition() {
          */
         public com.google.protobuf.ByteString
         getDefinitionBytes() {
-            Object ref = definition_;
-            if (ref instanceof String) {
-                com.google.protobuf.ByteString b =
-                    com.google.protobuf.ByteString.copyFromUtf8(
-                        (String) ref);
-                definition_ = b;
-                return b;
-            } else {
-                return (com.google.protobuf.ByteString) ref;
-            }
+            return ByteString.copyFromUtf8(definition_);
         }
 
         /**
@@ -691,10 +609,8 @@ public String getDefinition() {
          * @return This builder for chaining.
          */
         public Builder setDefinition(
-            String value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+                String value) {
+            Objects.requireNonNull(value, "Definition can not be null");
 
             definition_ = value;
             onChanged();
@@ -720,26 +636,24 @@ public Builder clearDefinition() {
          * @return This builder for chaining.
          */
         public Builder setDefinitionBytes(
-            com.google.protobuf.ByteString value) {
-            if (value == null) {
-                throw new NullPointerException();
-            }
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "DefinitionBytes can not be null");
             checkByteStringIsUtf8(value);
 
-            definition_ = value;
+            definition_ = value.toStringUtf8();
             onChanged();
             return this;
         }
 
         @Override
         public final Builder setUnknownFields(
-            final com.google.protobuf.UnknownFieldSet unknownFields) {
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
             return super.setUnknownFields(unknownFields);
         }
 
         @Override
         public final Builder mergeUnknownFields(
-            final com.google.protobuf.UnknownFieldSet unknownFields) {
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
             return super.mergeUnknownFields(unknownFields);
         }
 
@@ -759,12 +673,12 @@ public static RegistryRequest getDefaultInstance() {
     }
 
     private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
+            PARSER = new com.google.protobuf.AbstractParser() {
         @Override
         public RegistryRequest parsePartialFrom(
-            com.google.protobuf.CodedInputStream input,
-            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-            throws com.google.protobuf.InvalidProtocolBufferException {
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
             return new RegistryRequest(input, extensionRegistry);
         }
     };
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryResponse.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryResponse.java
index 016292fcf5..3aa0e1c43b 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryResponse.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/RegistryResponse.java
@@ -20,15 +20,17 @@
 
 package org.apache.eventmesh.common.protocol.catalog.protos;
 
+import java.util.Objects;
+
 /**
  * Protobuf type {@code eventmesh.catalog.api.protocol.RegistryResponse}
  */
 @SuppressWarnings({"all"})
 public final class RegistryResponse extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.catalog.api.protocol.RegistryResponse)
-    RegistryResponseOrBuilder {
-    private static final long serialVersionUID = 0L;
+        com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.catalog.api.protocol.RegistryResponse)
+        RegistryResponseOrBuilder {
+    private static final long serialVersionUID = 5690543722366991453L;
 
     // Use RegistryResponse.newBuilder() to construct.
     private RegistryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
@@ -41,7 +43,7 @@ private RegistryResponse() {
     @Override
     @SuppressWarnings({"unused"})
     protected Object newInstance(
-        UnusedPrivateParameter unused) {
+            UnusedPrivateParameter unused) {
         return new RegistryResponse();
     }
 
@@ -52,15 +54,15 @@ protected Object newInstance(
     }
 
     private RegistryResponse(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         this();
-        if (extensionRegistry == null) {
-            throw new NullPointerException();
-        }
+        Objects.requireNonNull(input, "CodedInputStream can not be null");
+        Objects.requireNonNull(extensionRegistry, "ExtensionRegistryLite can not be null");
+
         com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-            com.google.protobuf.UnknownFieldSet.newBuilder();
+                com.google.protobuf.UnknownFieldSet.newBuilder();
         try {
             boolean done = false;
             while (!done) {
@@ -71,7 +73,7 @@ private RegistryResponse(
                         break;
                     default: {
                         if (!parseUnknownField(
-                            input, unknownFields, extensionRegistry, tag)) {
+                                input, unknownFields, extensionRegistry, tag)) {
                             done = true;
                         }
                         break;
@@ -82,7 +84,7 @@ private RegistryResponse(
             throw e.setUnfinishedMessage(this);
         } catch (java.io.IOException e) {
             throw new com.google.protobuf.InvalidProtocolBufferException(
-                e).setUnfinishedMessage(this);
+                    e).setUnfinishedMessage(this);
         } finally {
             this.unknownFields = unknownFields.build();
             makeExtensionsImmutable();
@@ -98,19 +100,18 @@ private RegistryResponse(
     protected FieldAccessorTable
     internalGetFieldAccessorTable() {
         return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_RegistryResponse_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                RegistryResponse.class, Builder.class);
+                .ensureFieldAccessorsInitialized(
+                        RegistryResponse.class, Builder.class);
     }
 
     private byte memoizedIsInitialized = -1;
 
     @Override
     public final boolean isInitialized() {
-        byte isInitialized = memoizedIsInitialized;
-        if (isInitialized == 1) {
+        if (memoizedIsInitialized == 1) {
             return true;
         }
-        if (isInitialized == 0) {
+        if (memoizedIsInitialized == 0) {
             return false;
         }
 
@@ -120,7 +121,7 @@ public final boolean isInitialized() {
 
     @Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
+            throws java.io.IOException {
         unknownFields.writeTo(output);
     }
 
@@ -134,7 +135,7 @@ public int getSerializedSize() {
         size = 0;
         size += unknownFields.getSerializedSize();
         memoizedSize = size;
-        return size;
+        return memoizedSize;
     }
 
     @Override
@@ -166,84 +167,84 @@ public int hashCode() {
     }
 
     public static RegistryResponse parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static RegistryResponse parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static RegistryResponse parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static RegistryResponse parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static RegistryResponse parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data);
     }
 
     public static RegistryResponse parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
         return PARSER.parseFrom(data, extensionRegistry);
     }
 
     public static RegistryResponse parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input);
+                .parseWithIOException(PARSER, input);
     }
 
     public static RegistryResponse parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input, extensionRegistry);
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static RegistryResponse parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseDelimitedWithIOException(PARSER, input);
+                .parseDelimitedWithIOException(PARSER, input);
     }
 
     public static RegistryResponse parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
 
     public static RegistryResponse parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input);
+                .parseWithIOException(PARSER, input);
     }
 
     public static RegistryResponse parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
         return com.google.protobuf.GeneratedMessageV3
-            .parseWithIOException(PARSER, input, extensionRegistry);
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
     @Override
@@ -262,23 +263,21 @@ public static Builder newBuilder(RegistryResponse prototype) {
     @Override
     public Builder toBuilder() {
         return this == DEFAULT_INSTANCE
-            ? new Builder() : new Builder().mergeFrom(this);
+                ? new Builder() : new Builder().mergeFrom(this);
     }
 
     @Override
-    protected Builder newBuilderForType(
-        BuilderParent parent) {
-        Builder builder = new Builder(parent);
-        return builder;
+    protected Builder newBuilderForType(BuilderParent parent) {
+        return new Builder(parent);
     }
 
     /**
      * Protobuf type {@code eventmesh.catalog.api.protocol.RegistryResponse}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:eventmesh.catalog.api.protocol.RegistryResponse)
-        RegistryResponseOrBuilder {
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.catalog.api.protocol.RegistryResponse)
+            RegistryResponseOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
             return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_RegistryResponse_descriptor;
@@ -288,8 +287,8 @@ public static final class Builder extends
         protected FieldAccessorTable
         internalGetFieldAccessorTable() {
             return EventmeshCatalogGrpc.internal_static_eventmesh_catalog_api_protocol_RegistryResponse_fieldAccessorTable
-                .ensureFieldAccessorsInitialized(
-                    RegistryResponse.class, Builder.class);
+                    .ensureFieldAccessorsInitialized(
+                            RegistryResponse.class, Builder.class);
         }
 
         // Construct using org.apache.eventmesh.common.protocol.catalog.protos.RegistryResponse.newBuilder()
@@ -298,14 +297,14 @@ private Builder() {
         }
 
         private Builder(
-            BuilderParent parent) {
+                BuilderParent parent) {
             super(parent);
             maybeForceBuilderInitialization();
         }
 
         private void maybeForceBuilderInitialization() {
             if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
+                    .alwaysUseFieldBuilders) {
             }
         }
 
@@ -349,34 +348,34 @@ public Builder clone() {
 
         @Override
         public Builder setField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
             return super.setField(field, value);
         }
 
         @Override
         public Builder clearField(
-            com.google.protobuf.Descriptors.FieldDescriptor field) {
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
             return super.clearField(field);
         }
 
         @Override
         public Builder clearOneof(
-            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
             return super.clearOneof(oneof);
         }
 
         @Override
         public Builder setRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            int index, Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
             return super.setRepeatedField(field, index, value);
         }
 
         @Override
         public Builder addRepeatedField(
-            com.google.protobuf.Descriptors.FieldDescriptor field,
-            Object value) {
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
             return super.addRepeatedField(field, value);
         }
 
@@ -406,9 +405,9 @@ public final boolean isInitialized() {
 
         @Override
         public Builder mergeFrom(
-            com.google.protobuf.CodedInputStream input,
-            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-            throws java.io.IOException {
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
             RegistryResponse parsedMessage = null;
             try {
                 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
@@ -425,13 +424,13 @@ public Builder mergeFrom(
 
         @Override
         public final Builder setUnknownFields(
-            final com.google.protobuf.UnknownFieldSet unknownFields) {
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
             return super.setUnknownFields(unknownFields);
         }
 
         @Override
         public final Builder mergeUnknownFields(
-            final com.google.protobuf.UnknownFieldSet unknownFields) {
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
             return super.mergeUnknownFields(unknownFields);
         }
 
@@ -451,12 +450,12 @@ public static RegistryResponse getDefaultInstance() {
     }
 
     private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
+            PARSER = new com.google.protobuf.AbstractParser() {
         @Override
         public RegistryResponse parsePartialFrom(
-            com.google.protobuf.CodedInputStream input,
-            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-            throws com.google.protobuf.InvalidProtocolBufferException {
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
             return new RegistryResponse(input, extensionRegistry);
         }
     };
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java
index 4be71812b0..c73b10dc61 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/BatchMessageWrapper.java
@@ -21,7 +21,7 @@
 import org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage;
 
 public class BatchMessageWrapper implements ProtocolTransportObject {
-
+    private static final long serialVersionUID = -3296467364340663768L;
     private final BatchMessage batchMessage;
 
     public BatchMessageWrapper(BatchMessage batchMessage) {
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/SimpleMessageWrapper.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/SimpleMessageWrapper.java
index 245f55bb38..8a70b8f997 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/SimpleMessageWrapper.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/SimpleMessageWrapper.java
@@ -22,6 +22,8 @@
 
 public class SimpleMessageWrapper implements ProtocolTransportObject {
 
+    private static final long serialVersionUID = 4562321593749195797L;
+
     private final SimpleMessage simpleMessage;
 
     public SimpleMessageWrapper(SimpleMessage simpleMessage) {
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java
index 15831d8c41..afcb794605 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java
@@ -41,11 +41,12 @@ public enum StatusCode {
     EVENTMESH_HEARTBEAT_ERR("19", "eventMesh heartbeat err"),
     EVENTMESH_ACL_ERR("20", "eventMesh acl err"),
     EVENTMESH_SEND_MESSAGE_SPEED_OVER_LIMIT_ERR("21", "eventMesh send message speed over the limit err."),
-    EVENTMESH_REQUEST_REPLY_MSG_ERR("22", "eventMesh request reply msg err, ");
+    EVENTMESH_REQUEST_REPLY_MSG_ERR("22", "eventMesh request reply msg err, "),
+    CLIENT_RESUBSCRIBE("30", "client needs to resubscribe.");
 
-    private String retCode;
+    private final String retCode;
 
-    private String errMsg;
+    private final String errMsg;
 
     StatusCode(String retCode, String errMsg) {
         this.retCode = retCode;
@@ -56,15 +57,8 @@ public String getRetCode() {
         return retCode;
     }
 
-    public void setRetCode(String retCode) {
-        this.retCode = retCode;
-    }
-
     public String getErrMsg() {
         return errMsg;
     }
 
-    public void setErrMsg(String errMsg) {
-        this.errMsg = errMsg;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java
index 9b638fc51e..8e7d0d7055 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/BatchMessage.java
@@ -20,2555 +20,2434 @@
 
 package org.apache.eventmesh.common.protocol.grpc.protos;
 
+import java.util.Objects;
+
+import com.google.protobuf.ByteString;
+
 /**
  * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage}
  */
 @SuppressWarnings({"all"})
-public  final class BatchMessage extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.BatchMessage)
-    BatchMessageOrBuilder {
-private static final long serialVersionUID = 0L;
-  // Use BatchMessage.newBuilder() to construct.
-  private BatchMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-    super(builder);
-  }
-  private BatchMessage() {
-    producerGroup_ = "";
-    topic_ = "";
-    messageItem_ = java.util.Collections.emptyList();
-  }
-
-  @Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
-    return this.unknownFields;
-  }
-  private BatchMessage(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new NullPointerException();
-    }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          default: {
-            if (!parseUnknownFieldProto3(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
-            }
-            break;
-          }
-          case 10: {
-            RequestHeader.Builder subBuilder = null;
-            if (header_ != null) {
-              subBuilder = header_.toBuilder();
-            }
-            header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
-            if (subBuilder != null) {
-              subBuilder.mergeFrom(header_);
-              header_ = subBuilder.buildPartial();
-            }
-
-            break;
-          }
-          case 18: {
-            String s = input.readStringRequireUtf8();
-
-            producerGroup_ = s;
-            break;
-          }
-          case 26: {
-            String s = input.readStringRequireUtf8();
-
-            topic_ = s;
-            break;
-          }
-          case 34: {
-            if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-              messageItem_ = new java.util.ArrayList();
-              mutable_bitField0_ |= 0x00000008;
-            }
-            messageItem_.add(
-                input.readMessage(MessageItem.parser(), extensionRegistry));
-            break;
-          }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
-    } finally {
-      if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-        messageItem_ = java.util.Collections.unmodifiableList(messageItem_);
-      }
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
-  }
-
-  protected FieldAccessorTable
-      internalGetFieldAccessorTable() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable
-        .ensureFieldAccessorsInitialized(
-            BatchMessage.class, Builder.class);
-  }
-
-  public interface MessageItemOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * string content = 1;
-     */
-    String getContent();
-    /**
-     * string content = 1;
-     */
-    com.google.protobuf.ByteString
-        getContentBytes();
-
-    /**
-     * string ttl = 2;
-     */
-    String getTtl();
-    /**
-     * string ttl = 2;
-     */
-    com.google.protobuf.ByteString
-        getTtlBytes();
-
-    /**
-     * string uniqueId = 3;
-     */
-    String getUniqueId();
-    /**
-     * string uniqueId = 3;
-     */
-    com.google.protobuf.ByteString
-        getUniqueIdBytes();
-
-    /**
-     * string seqNum = 4;
-     */
-    String getSeqNum();
-    /**
-     * string seqNum = 4;
-     */
-    com.google.protobuf.ByteString
-        getSeqNumBytes();
-
-    /**
-     * string tag = 5;
-     */
-    String getTag();
-    /**
-     * string tag = 5;
-     */
-    com.google.protobuf.ByteString
-        getTagBytes();
-
-    /**
-     * map<string, string> properties = 6;
-     */
-    int getPropertiesCount();
-    /**
-     * map<string, string> properties = 6;
-     */
-    boolean containsProperties(
-        String key);
-    /**
-     * Use {@link #getPropertiesMap()} instead.
-     */
-    @Deprecated
-    java.util.Map
-    getProperties();
-    /**
-     * map<string, string> properties = 6;
-     */
-    java.util.Map
-    getPropertiesMap();
-    /**
-     * map<string, string> properties = 6;
-     */
-
-    String getPropertiesOrDefault(
-        String key,
-        String defaultValue);
-    /**
-     * map<string, string> properties = 6;
-     */
+public final class BatchMessage extends
+        com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.BatchMessage)
+        BatchMessageOrBuilder {
+    private static final long serialVersionUID = -3876605571602481461L;
 
-    String getPropertiesOrThrow(
-        String key);
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage.MessageItem}
-   */
-  public  static final class MessageItem extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
-      MessageItemOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use MessageItem.newBuilder() to construct.
-    private MessageItem(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
+    // Use BatchMessage.newBuilder() to construct.
+    private BatchMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        super(builder);
     }
-    private MessageItem() {
-      content_ = "";
-      ttl_ = "";
-      uniqueId_ = "";
-      seqNum_ = "";
-      tag_ = "";
+
+    private BatchMessage() {
+        producerGroup_ = "";
+        topic_ = "";
+        messageItem_ = java.util.Collections.emptyList();
     }
 
     @Override
     public final com.google.protobuf.UnknownFieldSet
     getUnknownFields() {
-      return this.unknownFields;
+        return this.unknownFields;
     }
-    private MessageItem(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownFieldProto3(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              String s = input.readStringRequireUtf8();
-
-              content_ = s;
-              break;
-            }
-            case 18: {
-              String s = input.readStringRequireUtf8();
-
-              ttl_ = s;
-              break;
-            }
-            case 26: {
-              String s = input.readStringRequireUtf8();
-
-              uniqueId_ = s;
-              break;
-            }
-            case 34: {
-              String s = input.readStringRequireUtf8();
-
-              seqNum_ = s;
-              break;
-            }
-            case 42: {
-              String s = input.readStringRequireUtf8();
-
-              tag_ = s;
-              break;
-            }
-            case 50: {
-              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
-                properties_ = com.google.protobuf.MapField.newMapField(
-                    PropertiesDefaultEntryHolder.defaultEntry);
-                mutable_bitField0_ |= 0x00000020;
-              }
-              com.google.protobuf.MapEntry
-              properties__ = input.readMessage(
-                  PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
-              properties_.getMutableMap().put(
-                  properties__.getKey(), properties__.getValue());
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
+
+    private BatchMessage(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        this();
+        if (extensionRegistry == null) {
+            throw new NullPointerException();
+        }
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+            boolean done = false;
+            while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                    case 0:
+                        done = true;
+                        break;
+                    default: {
+                        if (!parseUnknownFieldProto3(
+                                input, unknownFields, extensionRegistry, tag)) {
+                            done = true;
+                        }
+                        break;
+                    }
+                    case 10: {
+                        RequestHeader.Builder subBuilder = null;
+                        if (header_ != null) {
+                            subBuilder = header_.toBuilder();
+                        }
+                        header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+                        if (subBuilder != null) {
+                            subBuilder.mergeFrom(header_);
+                            header_ = subBuilder.buildPartial();
+                        }
+
+                        break;
+                    }
+                    case 18: {
+                        producerGroup_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 26: {
+                        topic_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 34: {
+                        if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+                            messageItem_ = new java.util.ArrayList();
+                            mutable_bitField0_ |= 0x00000008;
+                        }
+                        messageItem_.add(
+                                input.readMessage(MessageItem.parser(), extensionRegistry));
+                        break;
+                    }
+                }
+            }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(
+                    e).setUnfinishedMessage(this);
+        } finally {
+            if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+                messageItem_ = java.util.Collections.unmodifiableList(messageItem_);
+            }
+            this.unknownFields = unknownFields.build();
+            makeExtensionsImmutable();
+        }
     }
+
     public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+    getDescriptor() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
     }
 
-    @SuppressWarnings({"rawtypes"})
-    protected com.google.protobuf.MapField internalGetMapField(
-        int number) {
-      switch (number) {
-        case 6:
-          return internalGetProperties();
-        default:
-          throw new RuntimeException(
-              "Invalid map field number: " + number);
-      }
-    }
     protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              MessageItem.class, Builder.class);
+    internalGetFieldAccessorTable() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable
+                .ensureFieldAccessorsInitialized(
+                        BatchMessage.class, Builder.class);
     }
 
-    private int bitField0_;
-    public static final int CONTENT_FIELD_NUMBER = 1;
-    private volatile Object content_;
-    /**
-     * string content = 1;
-     */
-    public String getContent() {
-      Object ref = content_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        content_ = s;
-        return s;
-      }
-    }
-    /**
-     * string content = 1;
-     */
-    public com.google.protobuf.ByteString
-        getContentBytes() {
-      Object ref = content_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        content_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+    public interface MessageItemOrBuilder extends
+            // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+            com.google.protobuf.MessageOrBuilder {
 
-    public static final int TTL_FIELD_NUMBER = 2;
-    private volatile Object ttl_;
-    /**
-     * string ttl = 2;
-     */
-    public String getTtl() {
-      Object ref = ttl_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        ttl_ = s;
-        return s;
-      }
-    }
-    /**
-     * string ttl = 2;
-     */
-    public com.google.protobuf.ByteString
-        getTtlBytes() {
-      Object ref = ttl_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        ttl_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+        /**
+         * string content = 1;
+         */
+        String getContent();
 
-    public static final int UNIQUEID_FIELD_NUMBER = 3;
-    private volatile Object uniqueId_;
-    /**
-     * string uniqueId = 3;
-     */
-    public String getUniqueId() {
-      Object ref = uniqueId_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        uniqueId_ = s;
-        return s;
-      }
-    }
-    /**
-     * string uniqueId = 3;
-     */
-    public com.google.protobuf.ByteString
-        getUniqueIdBytes() {
-      Object ref = uniqueId_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        uniqueId_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+        /**
+         * string content = 1;
+         */
+        com.google.protobuf.ByteString
+        getContentBytes();
 
-    public static final int SEQNUM_FIELD_NUMBER = 4;
-    private volatile Object seqNum_;
-    /**
-     * string seqNum = 4;
-     */
-    public String getSeqNum() {
-      Object ref = seqNum_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        seqNum_ = s;
-        return s;
-      }
-    }
-    /**
-     * string seqNum = 4;
-     */
-    public com.google.protobuf.ByteString
-        getSeqNumBytes() {
-      Object ref = seqNum_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        seqNum_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+        /**
+         * string ttl = 2;
+         */
+        String getTtl();
 
-    public static final int TAG_FIELD_NUMBER = 5;
-    private volatile Object tag_;
-    /**
-     * string tag = 5;
-     */
-    public String getTag() {
-      Object ref = tag_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        tag_ = s;
-        return s;
-      }
-    }
-    /**
-     * string tag = 5;
-     */
-    public com.google.protobuf.ByteString
-        getTagBytes() {
-      Object ref = tag_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        tag_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+        /**
+         * string ttl = 2;
+         */
+        com.google.protobuf.ByteString
+        getTtlBytes();
 
-    public static final int PROPERTIES_FIELD_NUMBER = 6;
-    private static final class PropertiesDefaultEntryHolder {
-      static final com.google.protobuf.MapEntry<
-          String, String> defaultEntry =
-              com.google.protobuf.MapEntry
-              .newDefaultInstance(
-                  EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_descriptor,
-                  com.google.protobuf.WireFormat.FieldType.STRING,
-                  "",
-                  com.google.protobuf.WireFormat.FieldType.STRING,
-                  "");
-    }
-    private com.google.protobuf.MapField<
-        String, String> properties_;
-    private com.google.protobuf.MapField
-    internalGetProperties() {
-      if (properties_ == null) {
-        return com.google.protobuf.MapField.emptyMapField(
-            PropertiesDefaultEntryHolder.defaultEntry);
-      }
-      return properties_;
-    }
+        /**
+         * string uniqueId = 3;
+         */
+        String getUniqueId();
 
-    public int getPropertiesCount() {
-      return internalGetProperties().getMap().size();
-    }
-    /**
-     * map<string, string> properties = 6;
-     */
+        /**
+         * string uniqueId = 3;
+         */
+        com.google.protobuf.ByteString
+        getUniqueIdBytes();
 
-    public boolean containsProperties(
-        String key) {
-      if (key == null) { throw new NullPointerException(); }
-      return internalGetProperties().getMap().containsKey(key);
-    }
-    /**
-     * Use {@link #getPropertiesMap()} instead.
-     */
-    @Deprecated
-    public java.util.Map getProperties() {
-      return getPropertiesMap();
-    }
-    /**
-     * map<string, string> properties = 6;
-     */
+        /**
+         * string seqNum = 4;
+         */
+        String getSeqNum();
 
-    public java.util.Map getPropertiesMap() {
-      return internalGetProperties().getMap();
-    }
-    /**
-     * map<string, string> properties = 6;
-     */
+        /**
+         * string seqNum = 4;
+         */
+        com.google.protobuf.ByteString
+        getSeqNumBytes();
 
-    public String getPropertiesOrDefault(
-        String key,
-        String defaultValue) {
-      if (key == null) { throw new NullPointerException(); }
-      java.util.Map map =
-          internalGetProperties().getMap();
-      return map.containsKey(key) ? map.get(key) : defaultValue;
-    }
-    /**
-     * map<string, string> properties = 6;
-     */
+        /**
+         * string tag = 5;
+         */
+        String getTag();
 
-    public String getPropertiesOrThrow(
-        String key) {
-      if (key == null) { throw new NullPointerException(); }
-      java.util.Map map =
-          internalGetProperties().getMap();
-      if (!map.containsKey(key)) {
-        throw new IllegalArgumentException();
-      }
-      return map.get(key);
-    }
+        /**
+         * string tag = 5;
+         */
+        com.google.protobuf.ByteString
+        getTagBytes();
 
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
+        /**
+         * map<string, string> properties = 6;
+         */
+        int getPropertiesCount();
 
-      memoizedIsInitialized = 1;
-      return true;
-    }
+        /**
+         * map<string, string> properties = 6;
+         */
+        boolean containsProperties(
+                String key);
 
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (!getContentBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
-      }
-      if (!getTtlBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ttl_);
-      }
-      if (!getUniqueIdBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uniqueId_);
-      }
-      if (!getSeqNumBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, seqNum_);
-      }
-      if (!getTagBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tag_);
-      }
-      com.google.protobuf.GeneratedMessageV3
-        .serializeStringMapTo(
-          output,
-          internalGetProperties(),
-          PropertiesDefaultEntryHolder.defaultEntry,
-          6);
-      unknownFields.writeTo(output);
-    }
+        /**
+         * Use {@link #getPropertiesMap()} instead.
+         */
+        @Deprecated
+        java.util.Map
+        getProperties();
 
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (!getContentBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
-      }
-      if (!getTtlBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ttl_);
-      }
-      if (!getUniqueIdBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uniqueId_);
-      }
-      if (!getSeqNumBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, seqNum_);
-      }
-      if (!getTagBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tag_);
-      }
-      for (java.util.Map.Entry entry
-           : internalGetProperties().getMap().entrySet()) {
-        com.google.protobuf.MapEntry
-        properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
-            .setKey(entry.getKey())
-            .setValue(entry.getValue())
-            .build();
-        size += com.google.protobuf.CodedOutputStream
-            .computeMessageSize(6, properties__);
-      }
-      size += unknownFields.getSerializedSize();
-      memoizedSize = size;
-      return size;
-    }
+        /**
+         * map<string, string> properties = 6;
+         */
+        java.util.Map
+        getPropertiesMap();
 
-    @Override
-    public boolean equals(final Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof MessageItem)) {
-        return super.equals(obj);
-      }
-      MessageItem other = (MessageItem) obj;
-
-      boolean result = true;
-      result = result && getContent()
-          .equals(other.getContent());
-      result = result && getTtl()
-          .equals(other.getTtl());
-      result = result && getUniqueId()
-          .equals(other.getUniqueId());
-      result = result && getSeqNum()
-          .equals(other.getSeqNum());
-      result = result && getTag()
-          .equals(other.getTag());
-      result = result && internalGetProperties().equals(
-          other.internalGetProperties());
-      result = result && unknownFields.equals(other.unknownFields);
-      return result;
-    }
+        /**
+         * map<string, string> properties = 6;
+         */
 
-    @Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + CONTENT_FIELD_NUMBER;
-      hash = (53 * hash) + getContent().hashCode();
-      hash = (37 * hash) + TTL_FIELD_NUMBER;
-      hash = (53 * hash) + getTtl().hashCode();
-      hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
-      hash = (53 * hash) + getUniqueId().hashCode();
-      hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
-      hash = (53 * hash) + getSeqNum().hashCode();
-      hash = (37 * hash) + TAG_FIELD_NUMBER;
-      hash = (53 * hash) + getTag().hashCode();
-      if (!internalGetProperties().getMap().isEmpty()) {
-        hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
-        hash = (53 * hash) + internalGetProperties().hashCode();
-      }
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
+        String getPropertiesOrDefault(
+                String key,
+                String defaultValue);
 
-    public static MessageItem parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static MessageItem parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static MessageItem parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static MessageItem parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static MessageItem parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static MessageItem parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static MessageItem parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static MessageItem parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static MessageItem parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static MessageItem parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static MessageItem parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static MessageItem parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
+        /**
+         * map<string, string> properties = 6;
+         */
 
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(MessageItem prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
+        String getPropertiesOrThrow(
+                String key);
     }
 
-    @Override
-    protected Builder newBuilderForType(
-        BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
     /**
      * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage.MessageItem}
      */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
-        MessageItemOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
-      }
-
-      @SuppressWarnings({"rawtypes"})
-      protected com.google.protobuf.MapField internalGetMapField(
-          int number) {
-        switch (number) {
-          case 6:
-            return internalGetProperties();
-          default:
-            throw new RuntimeException(
-                "Invalid map field number: " + number);
-        }
-      }
-      @SuppressWarnings({"rawtypes"})
-      protected com.google.protobuf.MapField internalGetMutableMapField(
-          int number) {
-        switch (number) {
-          case 6:
-            return internalGetMutableProperties();
-          default:
-            throw new RuntimeException(
-                "Invalid map field number: " + number);
-        }
-      }
-      protected FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                MessageItem.class, Builder.class);
-      }
-
-      // Construct using org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.MessageItem.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        content_ = "";
-
-        ttl_ = "";
-
-        uniqueId_ = "";
-
-        seqNum_ = "";
-
-        tag_ = "";
-
-        internalGetMutableProperties().clear();
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
-      }
-
-      public MessageItem getDefaultInstanceForType() {
-        return MessageItem.getDefaultInstance();
-      }
-
-      public MessageItem build() {
-        MessageItem result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public MessageItem buildPartial() {
-        MessageItem result = new MessageItem(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        result.content_ = content_;
-        result.ttl_ = ttl_;
-        result.uniqueId_ = uniqueId_;
-        result.seqNum_ = seqNum_;
-        result.tag_ = tag_;
-        result.properties_ = internalGetProperties();
-        result.properties_.makeImmutable();
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return (Builder) super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return (Builder) super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return (Builder) super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return (Builder) super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return (Builder) super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return (Builder) super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof MessageItem) {
-          return mergeFrom((MessageItem)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(MessageItem other) {
-        if (other == MessageItem.getDefaultInstance()) return this;
-        if (!other.getContent().isEmpty()) {
-          content_ = other.content_;
-          onChanged();
-        }
-        if (!other.getTtl().isEmpty()) {
-          ttl_ = other.ttl_;
-          onChanged();
-        }
-        if (!other.getUniqueId().isEmpty()) {
-          uniqueId_ = other.uniqueId_;
-          onChanged();
-        }
-        if (!other.getSeqNum().isEmpty()) {
-          seqNum_ = other.seqNum_;
-          onChanged();
-        }
-        if (!other.getTag().isEmpty()) {
-          tag_ = other.tag_;
-          onChanged();
-        }
-        internalGetMutableProperties().mergeFrom(
-            other.internalGetProperties());
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
+    public static final class MessageItem extends
+            com.google.protobuf.GeneratedMessageV3 implements
+            // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+            MessageItemOrBuilder {
+        private static final long serialVersionUID = -6677110210488831851L;
 
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        MessageItem parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (MessageItem) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private Object content_ = "";
-      /**
-       * string content = 1;
-       */
-      public String getContent() {
-        Object ref = content_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          content_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string content = 1;
-       */
-      public com.google.protobuf.ByteString
-          getContentBytes() {
-        Object ref = content_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          content_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string content = 1;
-       */
-      public Builder setContent(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        content_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string content = 1;
-       */
-      public Builder clearContent() {
-        
-        content_ = getDefaultInstance().getContent();
-        onChanged();
-        return this;
-      }
-      /**
-       * string content = 1;
-       */
-      public Builder setContentBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        content_ = value;
-        onChanged();
-        return this;
-      }
-
-      private Object ttl_ = "";
-      /**
-       * string ttl = 2;
-       */
-      public String getTtl() {
-        Object ref = ttl_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          ttl_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string ttl = 2;
-       */
-      public com.google.protobuf.ByteString
-          getTtlBytes() {
-        Object ref = ttl_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          ttl_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string ttl = 2;
-       */
-      public Builder setTtl(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        ttl_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string ttl = 2;
-       */
-      public Builder clearTtl() {
-        
-        ttl_ = getDefaultInstance().getTtl();
-        onChanged();
-        return this;
-      }
-      /**
-       * string ttl = 2;
-       */
-      public Builder setTtlBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        ttl_ = value;
-        onChanged();
-        return this;
-      }
-
-      private Object uniqueId_ = "";
-      /**
-       * string uniqueId = 3;
-       */
-      public String getUniqueId() {
-        Object ref = uniqueId_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          uniqueId_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string uniqueId = 3;
-       */
-      public com.google.protobuf.ByteString
-          getUniqueIdBytes() {
-        Object ref = uniqueId_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          uniqueId_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string uniqueId = 3;
-       */
-      public Builder setUniqueId(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        uniqueId_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string uniqueId = 3;
-       */
-      public Builder clearUniqueId() {
-        
-        uniqueId_ = getDefaultInstance().getUniqueId();
-        onChanged();
-        return this;
-      }
-      /**
-       * string uniqueId = 3;
-       */
-      public Builder setUniqueIdBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        uniqueId_ = value;
-        onChanged();
-        return this;
-      }
-
-      private Object seqNum_ = "";
-      /**
-       * string seqNum = 4;
-       */
-      public String getSeqNum() {
-        Object ref = seqNum_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          seqNum_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string seqNum = 4;
-       */
-      public com.google.protobuf.ByteString
-          getSeqNumBytes() {
-        Object ref = seqNum_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          seqNum_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string seqNum = 4;
-       */
-      public Builder setSeqNum(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        seqNum_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string seqNum = 4;
-       */
-      public Builder clearSeqNum() {
-        
-        seqNum_ = getDefaultInstance().getSeqNum();
-        onChanged();
-        return this;
-      }
-      /**
-       * string seqNum = 4;
-       */
-      public Builder setSeqNumBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        seqNum_ = value;
-        onChanged();
-        return this;
-      }
-
-      private Object tag_ = "";
-      /**
-       * string tag = 5;
-       */
-      public String getTag() {
-        Object ref = tag_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          tag_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string tag = 5;
-       */
-      public com.google.protobuf.ByteString
-          getTagBytes() {
-        Object ref = tag_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          tag_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string tag = 5;
-       */
-      public Builder setTag(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        tag_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string tag = 5;
-       */
-      public Builder clearTag() {
-        
-        tag_ = getDefaultInstance().getTag();
-        onChanged();
-        return this;
-      }
-      /**
-       * string tag = 5;
-       */
-      public Builder setTagBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        tag_ = value;
-        onChanged();
-        return this;
-      }
-
-      private com.google.protobuf.MapField<
-          String, String> properties_;
-      private com.google.protobuf.MapField
-      internalGetProperties() {
-        if (properties_ == null) {
-          return com.google.protobuf.MapField.emptyMapField(
-              PropertiesDefaultEntryHolder.defaultEntry);
-        }
-        return properties_;
-      }
-      private com.google.protobuf.MapField
-      internalGetMutableProperties() {
-        onChanged();;
-        if (properties_ == null) {
-          properties_ = com.google.protobuf.MapField.newMapField(
-              PropertiesDefaultEntryHolder.defaultEntry);
-        }
-        if (!properties_.isMutable()) {
-          properties_ = properties_.copy();
-        }
-        return properties_;
-      }
-
-      public int getPropertiesCount() {
-        return internalGetProperties().getMap().size();
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-
-      public boolean containsProperties(
-          String key) {
-        if (key == null) { throw new NullPointerException(); }
-        return internalGetProperties().getMap().containsKey(key);
-      }
-      /**
-       * Use {@link #getPropertiesMap()} instead.
-       */
-      @Deprecated
-      public java.util.Map getProperties() {
-        return getPropertiesMap();
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-
-      public java.util.Map getPropertiesMap() {
-        return internalGetProperties().getMap();
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-
-      public String getPropertiesOrDefault(
-          String key,
-          String defaultValue) {
-        if (key == null) { throw new NullPointerException(); }
-        java.util.Map map =
-            internalGetProperties().getMap();
-        return map.containsKey(key) ? map.get(key) : defaultValue;
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-
-      public String getPropertiesOrThrow(
-          String key) {
-        if (key == null) { throw new NullPointerException(); }
-        java.util.Map map =
-            internalGetProperties().getMap();
-        if (!map.containsKey(key)) {
-          throw new IllegalArgumentException();
-        }
-        return map.get(key);
-      }
-
-      public Builder clearProperties() {
-        internalGetMutableProperties().getMutableMap()
-            .clear();
-        return this;
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-
-      public Builder removeProperties(
-          String key) {
-        if (key == null) { throw new NullPointerException(); }
-        internalGetMutableProperties().getMutableMap()
-            .remove(key);
-        return this;
-      }
-      /**
-       * Use alternate mutation accessors instead.
-       */
-      @Deprecated
-      public java.util.Map
-      getMutableProperties() {
-        return internalGetMutableProperties().getMutableMap();
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-      public Builder putProperties(
-          String key,
-          String value) {
-        if (key == null) { throw new NullPointerException(); }
-        if (value == null) { throw new NullPointerException(); }
-        internalGetMutableProperties().getMutableMap()
-            .put(key, value);
-        return this;
-      }
-      /**
-       * map<string, string> properties = 6;
-       */
-
-      public Builder putAllProperties(
-          java.util.Map values) {
-        internalGetMutableProperties().getMutableMap()
-            .putAll(values);
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFieldsProto3(unknownFields);
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
-    }
+        // Use MessageItem.newBuilder() to construct.
+        private MessageItem(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+            super(builder);
+        }
 
-    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
-    private static final MessageItem DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new MessageItem();
-    }
+        private MessageItem() {
+            content_ = "";
+            ttl_ = "";
+            uniqueId_ = "";
+            seqNum_ = "";
+            tag_ = "";
+        }
 
-    public static MessageItem getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
+        @Override
+        public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+            return this.unknownFields;
+        }
 
-    private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      public MessageItem parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new MessageItem(input, extensionRegistry);
-      }
-    };
+        private MessageItem(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            this();
+            if (extensionRegistry == null) {
+                throw new NullPointerException();
+            }
+            int mutable_bitField0_ = 0;
+            com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                    com.google.protobuf.UnknownFieldSet.newBuilder();
+            try {
+                boolean done = false;
+                while (!done) {
+                    int tag = input.readTag();
+                    switch (tag) {
+                        case 0:
+                            done = true;
+                            break;
+                        default: {
+                            if (!parseUnknownFieldProto3(
+                                    input, unknownFields, extensionRegistry, tag)) {
+                                done = true;
+                            }
+                            break;
+                        }
+                        case 10: {
+                            content_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                        case 18: {
+                            ttl_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                        case 26: {
+                            uniqueId_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                        case 34: {
+                            seqNum_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                        case 42: {
+                            tag_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                        case 50: {
+                            if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+                                properties_ = com.google.protobuf.MapField.newMapField(
+                                        PropertiesDefaultEntryHolder.defaultEntry);
+                                mutable_bitField0_ |= 0x00000020;
+                            }
+                            com.google.protobuf.MapEntry
+                                    properties__ = input.readMessage(
+                                    PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+                            properties_.getMutableMap().put(
+                                    properties__.getKey(), properties__.getValue());
+                            break;
+                        }
+                    }
+                }
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                throw e.setUnfinishedMessage(this);
+            } catch (java.io.IOException e) {
+                throw new com.google.protobuf.InvalidProtocolBufferException(
+                        e).setUnfinishedMessage(this);
+            } finally {
+                this.unknownFields = unknownFields.build();
+                makeExtensionsImmutable();
+            }
+        }
 
-    public static com.google.protobuf.Parser parser() {
-      return PARSER;
-    }
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+        }
 
-    @Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
+        @SuppressWarnings({"rawtypes"})
+        protected com.google.protobuf.MapField internalGetMapField(
+                int number) {
+            switch (number) {
+                case 6:
+                    return internalGetProperties();
+                default:
+                    throw new RuntimeException(
+                            "Invalid map field number: " + number);
+            }
+        }
 
-    public MessageItem getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            MessageItem.class, Builder.class);
+        }
 
-  }
-
-  private int bitField0_;
-  public static final int HEADER_FIELD_NUMBER = 1;
-  private RequestHeader header_;
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public boolean hasHeader() {
-    return header_ != null;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public RequestHeader getHeader() {
-    return header_ == null ? RequestHeader.getDefaultInstance() : header_;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public RequestHeaderOrBuilder getHeaderOrBuilder() {
-    return getHeader();
-  }
-
-  public static final int PRODUCERGROUP_FIELD_NUMBER = 2;
-  private volatile Object producerGroup_;
-  /**
-   * string producerGroup = 2;
-   */
-  public String getProducerGroup() {
-    Object ref = producerGroup_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      producerGroup_ = s;
-      return s;
-    }
-  }
-  /**
-   * string producerGroup = 2;
-   */
-  public com.google.protobuf.ByteString
-      getProducerGroupBytes() {
-    Object ref = producerGroup_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      producerGroup_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int TOPIC_FIELD_NUMBER = 3;
-  private volatile Object topic_;
-  /**
-   * string topic = 3;
-   */
-  public String getTopic() {
-    Object ref = topic_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      topic_ = s;
-      return s;
-    }
-  }
-  /**
-   * string topic = 3;
-   */
-  public com.google.protobuf.ByteString
-      getTopicBytes() {
-    Object ref = topic_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      topic_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int MESSAGEITEM_FIELD_NUMBER = 4;
-  private java.util.List messageItem_;
-  /**
-   * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-   */
-  public java.util.List getMessageItemList() {
-    return messageItem_;
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-   */
-  public java.util.List
-      getMessageItemOrBuilderList() {
-    return messageItem_;
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-   */
-  public int getMessageItemCount() {
-    return messageItem_.size();
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-   */
-  public MessageItem getMessageItem(int index) {
-    return messageItem_.get(index);
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-   */
-  public MessageItemOrBuilder getMessageItemOrBuilder(
-      int index) {
-    return messageItem_.get(index);
-  }
-
-  private byte memoizedIsInitialized = -1;
-  public final boolean isInitialized() {
-    byte isInitialized = memoizedIsInitialized;
-    if (isInitialized == 1) return true;
-    if (isInitialized == 0) return false;
-
-    memoizedIsInitialized = 1;
-    return true;
-  }
-
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
-    if (header_ != null) {
-      output.writeMessage(1, getHeader());
-    }
-    if (!getProducerGroupBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerGroup_);
-    }
-    if (!getTopicBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
-    }
-    for (int i = 0; i < messageItem_.size(); i++) {
-      output.writeMessage(4, messageItem_.get(i));
-    }
-    unknownFields.writeTo(output);
-  }
+        private int bitField0_;
+        public static final int CONTENT_FIELD_NUMBER = 1;
+        private volatile String content_;
 
-  public int getSerializedSize() {
-    int size = memoizedSize;
-    if (size != -1) return size;
+        /**
+         * string content = 1;
+         */
+        public String getContent() {
+            return content_;
+        }
 
-    size = 0;
-    if (header_ != null) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(1, getHeader());
-    }
-    if (!getProducerGroupBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerGroup_);
-    }
-    if (!getTopicBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
-    }
-    for (int i = 0; i < messageItem_.size(); i++) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(4, messageItem_.get(i));
-    }
-    size += unknownFields.getSerializedSize();
-    memoizedSize = size;
-    return size;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == this) {
-     return true;
-    }
-    if (!(obj instanceof BatchMessage)) {
-      return super.equals(obj);
-    }
-    BatchMessage other = (BatchMessage) obj;
+        /**
+         * string content = 1;
+         */
+        public com.google.protobuf.ByteString
+        getContentBytes() {
+            return ByteString.copyFromUtf8(content_);
+        }
 
-    boolean result = true;
-    result = result && (hasHeader() == other.hasHeader());
-    if (hasHeader()) {
-      result = result && getHeader()
-          .equals(other.getHeader());
-    }
-    result = result && getProducerGroup()
-        .equals(other.getProducerGroup());
-    result = result && getTopic()
-        .equals(other.getTopic());
-    result = result && getMessageItemList()
-        .equals(other.getMessageItemList());
-    result = result && unknownFields.equals(other.unknownFields);
-    return result;
-  }
-
-  @Override
-  public int hashCode() {
-    if (memoizedHashCode != 0) {
-      return memoizedHashCode;
-    }
-    int hash = 41;
-    hash = (19 * hash) + getDescriptor().hashCode();
-    if (hasHeader()) {
-      hash = (37 * hash) + HEADER_FIELD_NUMBER;
-      hash = (53 * hash) + getHeader().hashCode();
-    }
-    hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
-    hash = (53 * hash) + getProducerGroup().hashCode();
-    hash = (37 * hash) + TOPIC_FIELD_NUMBER;
-    hash = (53 * hash) + getTopic().hashCode();
-    if (getMessageItemCount() > 0) {
-      hash = (37 * hash) + MESSAGEITEM_FIELD_NUMBER;
-      hash = (53 * hash) + getMessageItemList().hashCode();
-    }
-    hash = (29 * hash) + unknownFields.hashCode();
-    memoizedHashCode = hash;
-    return hash;
-  }
-
-  public static BatchMessage parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static BatchMessage parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static BatchMessage parseFrom(
-      com.google.protobuf.ByteString data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static BatchMessage parseFrom(
-      com.google.protobuf.ByteString data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static BatchMessage parseFrom(byte[] data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static BatchMessage parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static BatchMessage parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static BatchMessage parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static BatchMessage parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
-  }
-  public static BatchMessage parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static BatchMessage parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static BatchMessage parseFrom(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-
-  public Builder newBuilderForType() { return newBuilder(); }
-  public static Builder newBuilder() {
-    return DEFAULT_INSTANCE.toBuilder();
-  }
-  public static Builder newBuilder(BatchMessage prototype) {
-    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-  }
-  public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
-  }
-
-  @Override
-  protected Builder newBuilderForType(
-      BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage}
-   */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
-      // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.BatchMessage)
-      BatchMessageOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
-    }
+        public static final int TTL_FIELD_NUMBER = 2;
+        private volatile String ttl_;
 
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              BatchMessage.class, Builder.class);
-    }
+        /**
+         * string ttl = 2;
+         */
+        public String getTtl() {
+            return ttl_;
+        }
 
-    // Construct using org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+        /**
+         * string ttl = 2;
+         */
+        public com.google.protobuf.ByteString
+        getTtlBytes() {
+            return ByteString.copyFromUtf8(ttl_);
+        }
 
-    private Builder(
-        BuilderParent parent) {
-      super(parent);
-      maybeForceBuilderInitialization();
-    }
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-        getMessageItemFieldBuilder();
-      }
-    }
-    public Builder clear() {
-      super.clear();
-      if (headerBuilder_ == null) {
-        header_ = null;
-      } else {
-        header_ = null;
-        headerBuilder_ = null;
-      }
-      producerGroup_ = "";
-
-      topic_ = "";
-
-      if (messageItemBuilder_ == null) {
-        messageItem_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000008);
-      } else {
-        messageItemBuilder_.clear();
-      }
-      return this;
-    }
+        public static final int UNIQUEID_FIELD_NUMBER = 3;
+        private volatile String uniqueId_;
 
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
-    }
+        /**
+         * string uniqueId = 3;
+         */
+        public String getUniqueId() {
+            return uniqueId_;
+        }
 
-    public BatchMessage getDefaultInstanceForType() {
-      return BatchMessage.getDefaultInstance();
-    }
+        /**
+         * string uniqueId = 3;
+         */
+        public com.google.protobuf.ByteString
+        getUniqueIdBytes() {
+            return ByteString.copyFromUtf8(uniqueId_);
+        }
 
-    public BatchMessage build() {
-      BatchMessage result = buildPartial();
-      if (!result.isInitialized()) {
-        throw newUninitializedMessageException(result);
-      }
-      return result;
-    }
+        public static final int SEQNUM_FIELD_NUMBER = 4;
+        private volatile String seqNum_;
 
-    public BatchMessage buildPartial() {
-      BatchMessage result = new BatchMessage(this);
-      int from_bitField0_ = bitField0_;
-      int to_bitField0_ = 0;
-      if (headerBuilder_ == null) {
-        result.header_ = header_;
-      } else {
-        result.header_ = headerBuilder_.build();
-      }
-      result.producerGroup_ = producerGroup_;
-      result.topic_ = topic_;
-      if (messageItemBuilder_ == null) {
-        if (((bitField0_ & 0x00000008) == 0x00000008)) {
-          messageItem_ = java.util.Collections.unmodifiableList(messageItem_);
-          bitField0_ = (bitField0_ & ~0x00000008);
-        }
-        result.messageItem_ = messageItem_;
-      } else {
-        result.messageItem_ = messageItemBuilder_.build();
-      }
-      result.bitField0_ = to_bitField0_;
-      onBuilt();
-      return result;
-    }
+        /**
+         * string seqNum = 4;
+         */
+        public String getSeqNum() {
+            return seqNum_;
+        }
 
-    public Builder clone() {
-      return (Builder) super.clone();
-    }
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.setField(field, value);
-    }
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return (Builder) super.clearField(field);
-    }
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return (Builder) super.clearOneof(oneof);
-    }
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, Object value) {
-      return (Builder) super.setRepeatedField(field, index, value);
-    }
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.addRepeatedField(field, value);
-    }
-    public Builder mergeFrom(com.google.protobuf.Message other) {
-      if (other instanceof BatchMessage) {
-        return mergeFrom((BatchMessage)other);
-      } else {
-        super.mergeFrom(other);
-        return this;
-      }
-    }
+        /**
+         * string seqNum = 4;
+         */
+        public com.google.protobuf.ByteString
+        getSeqNumBytes() {
+            return ByteString.copyFromUtf8(seqNum_);
+        }
 
-    public Builder mergeFrom(BatchMessage other) {
-      if (other == BatchMessage.getDefaultInstance()) return this;
-      if (other.hasHeader()) {
-        mergeHeader(other.getHeader());
-      }
-      if (!other.getProducerGroup().isEmpty()) {
-        producerGroup_ = other.producerGroup_;
-        onChanged();
-      }
-      if (!other.getTopic().isEmpty()) {
-        topic_ = other.topic_;
-        onChanged();
-      }
-      if (messageItemBuilder_ == null) {
-        if (!other.messageItem_.isEmpty()) {
-          if (messageItem_.isEmpty()) {
-            messageItem_ = other.messageItem_;
-            bitField0_ = (bitField0_ & ~0x00000008);
-          } else {
-            ensureMessageItemIsMutable();
-            messageItem_.addAll(other.messageItem_);
-          }
-          onChanged();
-        }
-      } else {
-        if (!other.messageItem_.isEmpty()) {
-          if (messageItemBuilder_.isEmpty()) {
-            messageItemBuilder_.dispose();
-            messageItemBuilder_ = null;
-            messageItem_ = other.messageItem_;
-            bitField0_ = (bitField0_ & ~0x00000008);
-            messageItemBuilder_ = 
-              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
-                 getMessageItemFieldBuilder() : null;
-          } else {
-            messageItemBuilder_.addAllMessages(other.messageItem_);
-          }
-        }
-      }
-      this.mergeUnknownFields(other.unknownFields);
-      onChanged();
-      return this;
-    }
+        public static final int TAG_FIELD_NUMBER = 5;
+        private volatile String tag_;
 
-    public final boolean isInitialized() {
-      return true;
-    }
+        /**
+         * string tag = 5;
+         */
+        public String getTag() {
+            return tag_;
+        }
 
-    public Builder mergeFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      BatchMessage parsedMessage = null;
-      try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (BatchMessage) e.getUnfinishedMessage();
-        throw e.unwrapIOException();
-      } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
-      return this;
-    }
-    private int bitField0_;
+        /**
+         * string tag = 5;
+         */
+        public com.google.protobuf.ByteString
+        getTagBytes() {
+            return ByteString.copyFromUtf8(tag_);
+        }
 
-    private RequestHeader header_ = null;
-    private com.google.protobuf.SingleFieldBuilderV3<
-        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public boolean hasHeader() {
-      return headerBuilder_ != null || header_ != null;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public RequestHeader getHeader() {
-      if (headerBuilder_ == null) {
-        return header_ == null ? RequestHeader.getDefaultInstance() : header_;
-      } else {
-        return headerBuilder_.getMessage();
-      }
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder setHeader(RequestHeader value) {
-      if (headerBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        header_ = value;
-        onChanged();
-      } else {
-        headerBuilder_.setMessage(value);
-      }
-
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder setHeader(
-        RequestHeader.Builder builderForValue) {
-      if (headerBuilder_ == null) {
-        header_ = builderForValue.build();
-        onChanged();
-      } else {
-        headerBuilder_.setMessage(builderForValue.build());
-      }
-
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder mergeHeader(RequestHeader value) {
-      if (headerBuilder_ == null) {
-        if (header_ != null) {
-          header_ =
-            RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
-        } else {
-          header_ = value;
+        public static final int PROPERTIES_FIELD_NUMBER = 6;
+
+        private static final class PropertiesDefaultEntryHolder {
+            static final com.google.protobuf.MapEntry<
+                    String, String> defaultEntry =
+                    com.google.protobuf.MapEntry
+                            .newDefaultInstance(
+                                    EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_PropertiesEntry_descriptor,
+                                    com.google.protobuf.WireFormat.FieldType.STRING,
+                                    "",
+                                    com.google.protobuf.WireFormat.FieldType.STRING,
+                                    "");
+        }
+
+        private com.google.protobuf.MapField<
+                String, String> properties_;
+
+        private com.google.protobuf.MapField
+        internalGetProperties() {
+            if (properties_ == null) {
+                return com.google.protobuf.MapField.emptyMapField(
+                        PropertiesDefaultEntryHolder.defaultEntry);
+            }
+            return properties_;
+        }
+
+        public int getPropertiesCount() {
+            return internalGetProperties().getMap().size();
+        }
+
+        /**
+         * map<string, string> properties = 6;
+         */
+
+        public boolean containsProperties(
+                String key) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            return internalGetProperties().getMap().containsKey(key);
+        }
+
+        /**
+         * Use {@link #getPropertiesMap()} instead.
+         */
+        @Deprecated
+        public java.util.Map getProperties() {
+            return getPropertiesMap();
+        }
+
+        /**
+         * map<string, string> properties = 6;
+         */
+
+        public java.util.Map getPropertiesMap() {
+            return internalGetProperties().getMap();
+        }
+
+        /**
+         * map<string, string> properties = 6;
+         */
+
+        public String getPropertiesOrDefault(
+                String key,
+                String defaultValue) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            java.util.Map map =
+                    internalGetProperties().getMap();
+            String value = map.get(key);
+            if (value == null) return defaultValue;
+            return value;
+        }
+
+        /**
+         * map<string, string> properties = 6;
+         */
+
+        public String getPropertiesOrThrow(
+                String key) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            java.util.Map map =
+                    internalGetProperties().getMap();
+            if (!map.containsKey(key)) {
+                throw new IllegalArgumentException();
+            }
+            return map.get(key);
+        }
+
+        private byte memoizedIsInitialized = -1;
+
+        public final boolean isInitialized() {
+            if (memoizedIsInitialized == 1) return true;
+            if (memoizedIsInitialized == 0) return false;
+
+            memoizedIsInitialized = 1;
+            return true;
+        }
+
+        public void writeTo(com.google.protobuf.CodedOutputStream output)
+                throws java.io.IOException {
+            if (!getContentBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
+            }
+            if (!getTtlBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ttl_);
+            }
+            if (!getUniqueIdBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uniqueId_);
+            }
+            if (!getSeqNumBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 4, seqNum_);
+            }
+            if (!getTagBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tag_);
+            }
+            com.google.protobuf.GeneratedMessageV3
+                    .serializeStringMapTo(
+                            output,
+                            internalGetProperties(),
+                            PropertiesDefaultEntryHolder.defaultEntry,
+                            6);
+            unknownFields.writeTo(output);
+        }
+
+        public int getSerializedSize() {
+            int size = memoizedSize;
+            if (size != -1) return size;
+
+            size = 0;
+            if (!getContentBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
+            }
+            if (!getTtlBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ttl_);
+            }
+            if (!getUniqueIdBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uniqueId_);
+            }
+            if (!getSeqNumBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, seqNum_);
+            }
+            if (!getTagBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tag_);
+            }
+            for (java.util.Map.Entry entry
+                    : internalGetProperties().getMap().entrySet()) {
+                com.google.protobuf.MapEntry
+                        properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
+                        .setKey(entry.getKey())
+                        .setValue(entry.getValue())
+                        .build();
+                size += com.google.protobuf.CodedOutputStream
+                        .computeMessageSize(6, properties__);
+            }
+            size += unknownFields.getSerializedSize();
+            memoizedSize = size;
+            return size;
+        }
+
+        @Override
+        public boolean equals(final Object obj) {
+            if (obj == this) {
+                return true;
+            }
+            if (!(obj instanceof MessageItem)) {
+                return super.equals(obj);
+            }
+            MessageItem other = (MessageItem) obj;
+
+            return getContent()
+                    .equals(other.getContent())
+                    && getTtl()
+                    .equals(other.getTtl())
+                    && getUniqueId()
+                    .equals(other.getUniqueId())
+                    && getSeqNum()
+                    .equals(other.getSeqNum())
+                    && getTag()
+                    .equals(other.getTag())
+                    && internalGetProperties().equals(
+                    other.internalGetProperties())
+                    && unknownFields.equals(other.unknownFields);
+        }
+
+        @Override
+        public int hashCode() {
+            if (memoizedHashCode != 0) {
+                return memoizedHashCode;
+            }
+            int hash = 41;
+            hash = (19 * hash) + getDescriptor().hashCode();
+            hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+            hash = (53 * hash) + getContent().hashCode();
+            hash = (37 * hash) + TTL_FIELD_NUMBER;
+            hash = (53 * hash) + getTtl().hashCode();
+            hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
+            hash = (53 * hash) + getUniqueId().hashCode();
+            hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
+            hash = (53 * hash) + getSeqNum().hashCode();
+            hash = (37 * hash) + TAG_FIELD_NUMBER;
+            hash = (53 * hash) + getTag().hashCode();
+            if (!internalGetProperties().getMap().isEmpty()) {
+                hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
+                hash = (53 * hash) + internalGetProperties().hashCode();
+            }
+            hash = (29 * hash) + unknownFields.hashCode();
+            memoizedHashCode = hash;
+            return hash;
+        }
+
+        public static MessageItem parseFrom(
+                java.nio.ByteBuffer data)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
+
+        public static MessageItem parseFrom(
+                java.nio.ByteBuffer data,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
+
+        public static MessageItem parseFrom(
+                com.google.protobuf.ByteString data)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
+
+        public static MessageItem parseFrom(
+                com.google.protobuf.ByteString data,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
+
+        public static MessageItem parseFrom(byte[] data)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
+
+        public static MessageItem parseFrom(
+                byte[] data,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
+
+        public static MessageItem parseFrom(java.io.InputStream input)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input);
+        }
+
+        public static MessageItem parseFrom(
+                java.io.InputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input, extensionRegistry);
+        }
+
+        public static MessageItem parseDelimitedFrom(java.io.InputStream input)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseDelimitedWithIOException(PARSER, input);
+        }
+
+        public static MessageItem parseDelimitedFrom(
+                java.io.InputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+        }
+
+        public static MessageItem parseFrom(
+                com.google.protobuf.CodedInputStream input)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input);
+        }
+
+        public static MessageItem parseFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input, extensionRegistry);
+        }
+
+        public Builder newBuilderForType() {
+            return newBuilder();
+        }
+
+        public static Builder newBuilder() {
+            return DEFAULT_INSTANCE.toBuilder();
+        }
+
+        public static Builder newBuilder(MessageItem prototype) {
+            return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+        }
+
+        public Builder toBuilder() {
+            return this == DEFAULT_INSTANCE
+                    ? new Builder() : new Builder().mergeFrom(this);
+        }
+
+        @Override
+        protected Builder newBuilderForType(
+                BuilderParent parent) {
+            return new Builder(parent);
+        }
+
+        /**
+         * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage.MessageItem}
+         */
+        public static final class Builder extends
+                com.google.protobuf.GeneratedMessageV3.Builder implements
+                // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+                MessageItemOrBuilder {
+            public static final com.google.protobuf.Descriptors.Descriptor
+            getDescriptor() {
+                return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+            }
+
+            @SuppressWarnings({"rawtypes"})
+            protected com.google.protobuf.MapField internalGetMapField(
+                    int number) {
+                switch (number) {
+                    case 6:
+                        return internalGetProperties();
+                    default:
+                        throw new RuntimeException(
+                                "Invalid map field number: " + number);
+                }
+            }
+
+            @SuppressWarnings({"rawtypes"})
+            protected com.google.protobuf.MapField internalGetMutableMapField(
+                    int number) {
+                switch (number) {
+                    case 6:
+                        return internalGetMutableProperties();
+                    default:
+                        throw new RuntimeException(
+                                "Invalid map field number: " + number);
+                }
+            }
+
+            protected FieldAccessorTable
+            internalGetFieldAccessorTable() {
+                return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_fieldAccessorTable
+                        .ensureFieldAccessorsInitialized(
+                                MessageItem.class, Builder.class);
+            }
+
+            // Construct using org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.MessageItem.newBuilder()
+            private Builder() {
+                maybeForceBuilderInitialization();
+            }
+
+            private Builder(BuilderParent parent) {
+                super(parent);
+                maybeForceBuilderInitialization();
+            }
+
+            private void maybeForceBuilderInitialization() {
+                if (com.google.protobuf.GeneratedMessageV3
+                        .alwaysUseFieldBuilders) {
+                }
+            }
+
+            public Builder clear() {
+                super.clear();
+                content_ = "";
+                ttl_ = "";
+                uniqueId_ = "";
+                seqNum_ = "";
+                tag_ = "";
+                internalGetMutableProperties().clear();
+                return this;
+            }
+
+            public com.google.protobuf.Descriptors.Descriptor
+            getDescriptorForType() {
+                return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_MessageItem_descriptor;
+            }
+
+            public MessageItem getDefaultInstanceForType() {
+                return MessageItem.getDefaultInstance();
+            }
+
+            public MessageItem build() {
+                MessageItem result = buildPartial();
+                if (!result.isInitialized()) {
+                    throw newUninitializedMessageException(result);
+                }
+                return result;
+            }
+
+            public MessageItem buildPartial() {
+                MessageItem result = new MessageItem(this);
+                int from_bitField0_ = bitField0_;
+                int to_bitField0_ = 0;
+                result.content_ = content_;
+                result.ttl_ = ttl_;
+                result.uniqueId_ = uniqueId_;
+                result.seqNum_ = seqNum_;
+                result.tag_ = tag_;
+                result.properties_ = internalGetProperties();
+                result.properties_.makeImmutable();
+                result.bitField0_ = to_bitField0_;
+                onBuilt();
+                return result;
+            }
+
+            public Builder clone() {
+                return (Builder) super.clone();
+            }
+
+            public Builder setField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field,
+                    Object value) {
+                return (Builder) super.setField(field, value);
+            }
+
+            public Builder clearField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field) {
+                return (Builder) super.clearField(field);
+            }
+
+            public Builder clearOneof(
+                    com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+                return (Builder) super.clearOneof(oneof);
+            }
+
+            public Builder setRepeatedField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field,
+                    int index, Object value) {
+                return (Builder) super.setRepeatedField(field, index, value);
+            }
+
+            public Builder addRepeatedField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field,
+                    Object value) {
+                return (Builder) super.addRepeatedField(field, value);
+            }
+
+            public Builder mergeFrom(com.google.protobuf.Message other) {
+                if (other instanceof MessageItem) {
+                    return mergeFrom((MessageItem) other);
+                } else {
+                    super.mergeFrom(other);
+                    return this;
+                }
+            }
+
+            public Builder mergeFrom(MessageItem other) {
+                if (other == MessageItem.getDefaultInstance()) return this;
+                if (!other.getContent().isEmpty()) {
+                    content_ = other.content_;
+                    onChanged();
+                }
+                if (!other.getTtl().isEmpty()) {
+                    ttl_ = other.ttl_;
+                    onChanged();
+                }
+                if (!other.getUniqueId().isEmpty()) {
+                    uniqueId_ = other.uniqueId_;
+                    onChanged();
+                }
+                if (!other.getSeqNum().isEmpty()) {
+                    seqNum_ = other.seqNum_;
+                    onChanged();
+                }
+                if (!other.getTag().isEmpty()) {
+                    tag_ = other.tag_;
+                    onChanged();
+                }
+                internalGetMutableProperties().mergeFrom(
+                        other.internalGetProperties());
+                this.mergeUnknownFields(other.unknownFields);
+                onChanged();
+                return this;
+            }
+
+            public final boolean isInitialized() {
+                return true;
+            }
+
+            public Builder mergeFrom(
+                    com.google.protobuf.CodedInputStream input,
+                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                    throws java.io.IOException {
+                MessageItem parsedMessage = null;
+                try {
+                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    parsedMessage = (MessageItem) e.getUnfinishedMessage();
+                    throw e.unwrapIOException();
+                } finally {
+                    if (parsedMessage != null) {
+                        mergeFrom(parsedMessage);
+                    }
+                }
+                return this;
+            }
+
+            private int bitField0_;
+
+            private String content_ = "";
+
+            /**
+             * string content = 1;
+             */
+            public String getContent() {
+                return content_;
+            }
+
+            /**
+             * string content = 1;
+             */
+            public com.google.protobuf.ByteString
+            getContentBytes() {
+                return ByteString.copyFromUtf8(content_);
+            }
+
+            /**
+             * string content = 1;
+             */
+            public Builder setContent(
+                    String value) {
+                Objects.requireNonNull(value, "content can not be null");
+
+                content_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string content = 1;
+             */
+            public Builder clearContent() {
+
+                content_ = getDefaultInstance().getContent();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string content = 1;
+             */
+            public Builder setContentBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "ContentBytes can not be null");
+                checkByteStringIsUtf8(value);
+
+                content_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            private String ttl_ = "";
+
+            /**
+             * string ttl = 2;
+             */
+            public String getTtl() {
+                return ttl_;
+            }
+
+            /**
+             * string ttl = 2;
+             */
+            public com.google.protobuf.ByteString
+            getTtlBytes() {
+                return ByteString.copyFromUtf8(ttl_);
+            }
+
+            /**
+             * string ttl = 2;
+             */
+            public Builder setTtl(
+                    String value) {
+                Objects.requireNonNull(value, "ttl can not be null");
+
+                ttl_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string ttl = 2;
+             */
+            public Builder clearTtl() {
+
+                ttl_ = getDefaultInstance().getTtl();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string ttl = 2;
+             */
+            public Builder setTtlBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "TtlBytes can not be null");
+                checkByteStringIsUtf8(value);
+
+                ttl_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            private String uniqueId_ = "";
+
+            /**
+             * string uniqueId = 3;
+             */
+            public String getUniqueId() {
+                return uniqueId_;
+            }
+
+            /**
+             * string uniqueId = 3;
+             */
+            public com.google.protobuf.ByteString
+            getUniqueIdBytes() {
+                return ByteString.copyFromUtf8(uniqueId_);
+            }
+
+            /**
+             * string uniqueId = 3;
+             */
+            public Builder setUniqueId(
+                    String value) {
+                Objects.requireNonNull(value, "uniqueId_ can not be null");
+
+                uniqueId_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string uniqueId = 3;
+             */
+            public Builder clearUniqueId() {
+
+                uniqueId_ = getDefaultInstance().getUniqueId();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string uniqueId = 3;
+             */
+            public Builder setUniqueIdBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "UniqueIdBytes can not be null");
+                checkByteStringIsUtf8(value);
+
+                uniqueId_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            private String seqNum_ = "";
+
+            /**
+             * string seqNum = 4;
+             */
+            public String getSeqNum() {
+                return seqNum_;
+            }
+
+            /**
+             * string seqNum = 4;
+             */
+            public com.google.protobuf.ByteString
+            getSeqNumBytes() {
+                return ByteString.copyFromUtf8(seqNum_);
+            }
+
+            /**
+             * string seqNum = 4;
+             */
+            public Builder setSeqNum(
+                    String value) {
+                Objects.requireNonNull(value, "SeqNum can not be null");
+
+                seqNum_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string seqNum = 4;
+             */
+            public Builder clearSeqNum() {
+
+                seqNum_ = getDefaultInstance().getSeqNum();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string seqNum = 4;
+             */
+            public Builder setSeqNumBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "SeqNumBytes can not be null");
+                checkByteStringIsUtf8(value);
+
+                seqNum_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            private String tag_ = "";
+
+            /**
+             * string tag = 5;
+             */
+            public String getTag() {
+                return tag_;
+            }
+
+            /**
+             * string tag = 5;
+             */
+            public com.google.protobuf.ByteString
+            getTagBytes() {
+                return ByteString.copyFromUtf8(tag_);
+            }
+
+            /**
+             * string tag = 5;
+             */
+            public Builder setTag(
+                    String value) {
+                Objects.requireNonNull(value, "tag can not be null");
+
+                tag_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string tag = 5;
+             */
+            public Builder clearTag() {
+
+                tag_ = getDefaultInstance().getTag();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string tag = 5;
+             */
+            public Builder setTagBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "TagBytes can not be null");
+                checkByteStringIsUtf8(value);
+
+                tag_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            private com.google.protobuf.MapField<
+                    String, String> properties_;
+
+            private com.google.protobuf.MapField
+            internalGetProperties() {
+                if (properties_ == null) {
+                    return com.google.protobuf.MapField.emptyMapField(
+                            PropertiesDefaultEntryHolder.defaultEntry);
+                }
+                return properties_;
+            }
+
+            private com.google.protobuf.MapField
+            internalGetMutableProperties() {
+                onChanged();
+                ;
+                if (properties_ == null) {
+                    properties_ = com.google.protobuf.MapField.newMapField(
+                            PropertiesDefaultEntryHolder.defaultEntry);
+                }
+                if (!properties_.isMutable()) {
+                    properties_ = properties_.copy();
+                }
+                return properties_;
+            }
+
+            public int getPropertiesCount() {
+                return internalGetProperties().getMap().size();
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+
+            public boolean containsProperties(
+                    String key) {
+                Objects.requireNonNull(key, "key can not be null");
+
+                return internalGetProperties().getMap().containsKey(key);
+            }
+
+            /**
+             * Use {@link #getPropertiesMap()} instead.
+             */
+            @Deprecated
+            public java.util.Map getProperties() {
+                return getPropertiesMap();
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+
+            public java.util.Map getPropertiesMap() {
+                return internalGetProperties().getMap();
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+
+            public String getPropertiesOrDefault(
+                    String key,
+                    String defaultValue) {
+                Objects.requireNonNull(key, "key can not be null");
+
+                java.util.Map map =
+                        internalGetProperties().getMap();
+                String value = map.get(key);
+                if (value == null) return defaultValue;
+                return value;
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+
+            public String getPropertiesOrThrow(
+                    String key) {
+                Objects.requireNonNull(key, "key can not be null");
+
+                java.util.Map map =
+                        internalGetProperties().getMap();
+                if (!map.containsKey(key)) {
+                    throw new IllegalArgumentException();
+                }
+                return map.get(key);
+            }
+
+            public Builder clearProperties() {
+                internalGetMutableProperties().getMutableMap()
+                        .clear();
+                return this;
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+
+            public Builder removeProperties(
+                    String key) {
+                Objects.requireNonNull(key, "key can not be null");
+
+                internalGetMutableProperties().getMutableMap()
+                        .remove(key);
+                return this;
+            }
+
+            /**
+             * Use alternate mutation accessors instead.
+             */
+            @Deprecated
+            public java.util.Map
+            getMutableProperties() {
+                return internalGetMutableProperties().getMutableMap();
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+            public Builder putProperties(
+                    String key,
+                    String value) {
+                Objects.requireNonNull(key, "key can not be null");
+                Objects.requireNonNull(value, "value can not be null");
+
+                internalGetMutableProperties().getMutableMap()
+                        .put(key, value);
+                return this;
+            }
+
+            /**
+             * map<string, string> properties = 6;
+             */
+
+            public Builder putAllProperties(
+                    java.util.Map values) {
+                internalGetMutableProperties().getMutableMap()
+                        .putAll(values);
+                return this;
+            }
+
+            public final Builder setUnknownFields(
+                    final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.setUnknownFieldsProto3(unknownFields);
+            }
+
+            public final Builder mergeUnknownFields(
+                    final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.mergeUnknownFields(unknownFields);
+            }
+
+
+            // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+        }
+
+        // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.BatchMessage.MessageItem)
+        private static final MessageItem DEFAULT_INSTANCE;
+
+        static {
+            DEFAULT_INSTANCE = new MessageItem();
+        }
+
+        public static MessageItem getDefaultInstance() {
+            return DEFAULT_INSTANCE;
+        }
+
+        private static final com.google.protobuf.Parser
+                PARSER = new com.google.protobuf.AbstractParser() {
+            public MessageItem parsePartialFrom(
+                    com.google.protobuf.CodedInputStream input,
+                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                    throws com.google.protobuf.InvalidProtocolBufferException {
+                return new MessageItem(input, extensionRegistry);
+            }
+        };
+
+        public static com.google.protobuf.Parser parser() {
+            return PARSER;
+        }
+
+        @Override
+        public com.google.protobuf.Parser getParserForType() {
+            return PARSER;
+        }
+
+        public MessageItem getDefaultInstanceForType() {
+            return DEFAULT_INSTANCE;
         }
-        onChanged();
-      } else {
-        headerBuilder_.mergeFrom(value);
-      }
 
-      return this;
     }
+
+    private int bitField0_;
+    public static final int HEADER_FIELD_NUMBER = 1;
+    private RequestHeader header_;
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
-    public Builder clearHeader() {
-      if (headerBuilder_ == null) {
-        header_ = null;
-        onChanged();
-      } else {
-        header_ = null;
-        headerBuilder_ = null;
-      }
-
-      return this;
+    public boolean hasHeader() {
+        return header_ != null;
     }
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
-    public RequestHeader.Builder getHeaderBuilder() {
-      
-      onChanged();
-      return getHeaderFieldBuilder().getBuilder();
+    public RequestHeader getHeader() {
+        return header_ == null ? RequestHeader.getDefaultInstance() : header_;
     }
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
     public RequestHeaderOrBuilder getHeaderOrBuilder() {
-      if (headerBuilder_ != null) {
-        return headerBuilder_.getMessageOrBuilder();
-      } else {
-        return header_ == null ?
-            RequestHeader.getDefaultInstance() : header_;
-      }
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    private com.google.protobuf.SingleFieldBuilderV3<
-        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
-        getHeaderFieldBuilder() {
-      if (headerBuilder_ == null) {
-        headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-            RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
-                getHeader(),
-                getParentForChildren(),
-                isClean());
-        header_ = null;
-      }
-      return headerBuilder_;
+        return getHeader();
     }
 
-    private Object producerGroup_ = "";
+    public static final int PRODUCERGROUP_FIELD_NUMBER = 2;
+    private volatile String producerGroup_;
+
     /**
      * string producerGroup = 2;
      */
     public String getProducerGroup() {
-      Object ref = producerGroup_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        producerGroup_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return producerGroup_;
     }
+
     /**
      * string producerGroup = 2;
      */
     public com.google.protobuf.ByteString
-        getProducerGroupBytes() {
-      Object ref = producerGroup_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        producerGroup_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string producerGroup = 2;
-     */
-    public Builder setProducerGroup(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      producerGroup_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string producerGroup = 2;
-     */
-    public Builder clearProducerGroup() {
-      
-      producerGroup_ = getDefaultInstance().getProducerGroup();
-      onChanged();
-      return this;
-    }
-    /**
-     * string producerGroup = 2;
-     */
-    public Builder setProducerGroupBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      producerGroup_ = value;
-      onChanged();
-      return this;
+    getProducerGroupBytes() {
+        return ByteString.copyFromUtf8(producerGroup_);
     }
 
-    private Object topic_ = "";
+    public static final int TOPIC_FIELD_NUMBER = 3;
+    private volatile String topic_;
+
     /**
      * string topic = 3;
      */
     public String getTopic() {
-      Object ref = topic_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        topic_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return topic_;
     }
+
     /**
      * string topic = 3;
      */
     public com.google.protobuf.ByteString
-        getTopicBytes() {
-      Object ref = topic_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        topic_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string topic = 3;
-     */
-    public Builder setTopic(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      topic_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string topic = 3;
-     */
-    public Builder clearTopic() {
-      
-      topic_ = getDefaultInstance().getTopic();
-      onChanged();
-      return this;
+    getTopicBytes() {
+        return ByteString.copyFromUtf8(topic_);
     }
+
+    public static final int MESSAGEITEM_FIELD_NUMBER = 4;
+    private java.util.List messageItem_;
+
     /**
-     * string topic = 3;
+     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
      */
-    public Builder setTopicBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      topic_ = value;
-      onChanged();
-      return this;
-    }
-
-    private java.util.List messageItem_ =
-      java.util.Collections.emptyList();
-    private void ensureMessageItemIsMutable() {
-      if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-        messageItem_ = new java.util.ArrayList(messageItem_);
-        bitField0_ |= 0x00000008;
-       }
+    public java.util.List getMessageItemList() {
+        return messageItem_;
     }
 
-    private com.google.protobuf.RepeatedFieldBuilderV3<
-        MessageItem, MessageItem.Builder, MessageItemOrBuilder> messageItemBuilder_;
-
     /**
      * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
      */
-    public java.util.List getMessageItemList() {
-      if (messageItemBuilder_ == null) {
-        return java.util.Collections.unmodifiableList(messageItem_);
-      } else {
-        return messageItemBuilder_.getMessageList();
-      }
+    public java.util.List
+    getMessageItemOrBuilderList() {
+        return messageItem_;
     }
+
     /**
      * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
      */
     public int getMessageItemCount() {
-      if (messageItemBuilder_ == null) {
         return messageItem_.size();
-      } else {
-        return messageItemBuilder_.getCount();
-      }
     }
+
     /**
      * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
      */
     public MessageItem getMessageItem(int index) {
-      if (messageItemBuilder_ == null) {
         return messageItem_.get(index);
-      } else {
-        return messageItemBuilder_.getMessage(index);
-      }
     }
+
     /**
      * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
      */
-    public Builder setMessageItem(
-        int index, MessageItem value) {
-      if (messageItemBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureMessageItemIsMutable();
-        messageItem_.set(index, value);
-        onChanged();
-      } else {
-        messageItemBuilder_.setMessage(index, value);
-      }
-      return this;
+    public MessageItemOrBuilder getMessageItemOrBuilder(
+            int index) {
+        return messageItem_.get(index);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder setMessageItem(
-        int index, MessageItem.Builder builderForValue) {
-      if (messageItemBuilder_ == null) {
-        ensureMessageItemIsMutable();
-        messageItem_.set(index, builderForValue.build());
-        onChanged();
-      } else {
-        messageItemBuilder_.setMessage(index, builderForValue.build());
-      }
-      return this;
+
+    private byte memoizedIsInitialized = -1;
+
+    public final boolean isInitialized() {
+        if (memoizedIsInitialized == 1) return true;
+        if (memoizedIsInitialized == 0) return false;
+
+        memoizedIsInitialized = 1;
+        return true;
+    }
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+            throws java.io.IOException {
+        if (header_ != null) {
+            output.writeMessage(1, getHeader());
+        }
+        if (!getProducerGroupBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerGroup_);
+        }
+        if (!getTopicBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
+        }
+        for (int i = 0; i < messageItem_.size(); i++) {
+            output.writeMessage(4, messageItem_.get(i));
+        }
+        unknownFields.writeTo(output);
+    }
+
+    public int getSerializedSize() {
+        int size;
+        if (memoizedSize != -1) return memoizedSize;
+        size = header_ != null ?
+                com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()) : 0;
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerGroup_);
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
+        size += messageItem_.stream()
+                .mapToInt(messageItem -> com.google.protobuf.CodedOutputStream.computeMessageSize(4, messageItem))
+                .sum();
+        size += unknownFields.getSerializedSize();
+        memoizedSize = size;
+        return memoizedSize;
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof BatchMessage)) {
+            return super.equals(obj);
+        }
+        BatchMessage other = (BatchMessage) obj;
+
+        return (hasHeader() == other.hasHeader())
+                && (hasHeader() ? getHeader().equals(other.getHeader()) : true)
+                && getProducerGroup().equals(other.getProducerGroup())
+                && getTopic().equals(other.getTopic())
+                && getMessageItemList().equals(other.getMessageItemList())
+                && unknownFields.equals(other.unknownFields);
+    }
+
+    @Override
+    public int hashCode() {
+        if (memoizedHashCode != 0) {
+            return memoizedHashCode;
+        }
+        int hash = 41;
+        hash = (19 * hash) + getDescriptor().hashCode();
+        if (hasHeader()) {
+            hash = (37 * hash) + HEADER_FIELD_NUMBER;
+            hash = (53 * hash) + getHeader().hashCode();
+        }
+        hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+        hash = (53 * hash) + getProducerGroup().hashCode();
+        hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+        hash = (53 * hash) + getTopic().hashCode();
+        if (getMessageItemCount() > 0) {
+            hash = (37 * hash) + MESSAGEITEM_FIELD_NUMBER;
+            hash = (53 * hash) + getMessageItemList().hashCode();
+        }
+        hash = (29 * hash) + unknownFields.hashCode();
+        memoizedHashCode = hash;
+        return hash;
+    }
+
+    public static BatchMessage parseFrom(
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder addMessageItem(MessageItem value) {
-      if (messageItemBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureMessageItemIsMutable();
-        messageItem_.add(value);
-        onChanged();
-      } else {
-        messageItemBuilder_.addMessage(value);
-      }
-      return this;
+
+    public static BatchMessage parseFrom(
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder addMessageItem(
-        int index, MessageItem value) {
-      if (messageItemBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureMessageItemIsMutable();
-        messageItem_.add(index, value);
-        onChanged();
-      } else {
-        messageItemBuilder_.addMessage(index, value);
-      }
-      return this;
+
+    public static BatchMessage parseFrom(
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder addMessageItem(
-        MessageItem.Builder builderForValue) {
-      if (messageItemBuilder_ == null) {
-        ensureMessageItemIsMutable();
-        messageItem_.add(builderForValue.build());
-        onChanged();
-      } else {
-        messageItemBuilder_.addMessage(builderForValue.build());
-      }
-      return this;
+
+    public static BatchMessage parseFrom(
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder addMessageItem(
-        int index, MessageItem.Builder builderForValue) {
-      if (messageItemBuilder_ == null) {
-        ensureMessageItemIsMutable();
-        messageItem_.add(index, builderForValue.build());
-        onChanged();
-      } else {
-        messageItemBuilder_.addMessage(index, builderForValue.build());
-      }
-      return this;
+
+    public static BatchMessage parseFrom(byte[] data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder addAllMessageItem(
-        Iterable values) {
-      if (messageItemBuilder_ == null) {
-        ensureMessageItemIsMutable();
-        com.google.protobuf.AbstractMessageLite.Builder.addAll(
-            values, messageItem_);
-        onChanged();
-      } else {
-        messageItemBuilder_.addAllMessages(values);
-      }
-      return this;
+
+    public static BatchMessage parseFrom(
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder clearMessageItem() {
-      if (messageItemBuilder_ == null) {
-        messageItem_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000008);
-        onChanged();
-      } else {
-        messageItemBuilder_.clear();
-      }
-      return this;
+
+    public static BatchMessage parseFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public Builder removeMessageItem(int index) {
-      if (messageItemBuilder_ == null) {
-        ensureMessageItemIsMutable();
-        messageItem_.remove(index);
-        onChanged();
-      } else {
-        messageItemBuilder_.remove(index);
-      }
-      return this;
+
+    public static BatchMessage parseFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public MessageItem.Builder getMessageItemBuilder(
-        int index) {
-      return getMessageItemFieldBuilder().getBuilder(index);
+
+    public static BatchMessage parseDelimitedFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public MessageItemOrBuilder getMessageItemOrBuilder(
-        int index) {
-      if (messageItemBuilder_ == null) {
-        return messageItem_.get(index);  } else {
-        return messageItemBuilder_.getMessageOrBuilder(index);
-      }
+
+    public static BatchMessage parseDelimitedFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public java.util.List
-         getMessageItemOrBuilderList() {
-      if (messageItemBuilder_ != null) {
-        return messageItemBuilder_.getMessageOrBuilderList();
-      } else {
-        return java.util.Collections.unmodifiableList(messageItem_);
-      }
+
+    public static BatchMessage parseFrom(
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public MessageItem.Builder addMessageItemBuilder() {
-      return getMessageItemFieldBuilder().addBuilder(
-          MessageItem.getDefaultInstance());
+
+    public static BatchMessage parseFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public MessageItem.Builder addMessageItemBuilder(
-        int index) {
-      return getMessageItemFieldBuilder().addBuilder(
-          index, MessageItem.getDefaultInstance());
+
+    public Builder newBuilderForType() {
+        return newBuilder();
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
-     */
-    public java.util.List
-         getMessageItemBuilderList() {
-      return getMessageItemFieldBuilder().getBuilderList();
+
+    public static Builder newBuilder() {
+        return DEFAULT_INSTANCE.toBuilder();
     }
-    private com.google.protobuf.RepeatedFieldBuilderV3<
-        MessageItem, MessageItem.Builder, MessageItemOrBuilder>
-        getMessageItemFieldBuilder() {
-      if (messageItemBuilder_ == null) {
-        messageItemBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-            MessageItem, MessageItem.Builder, MessageItemOrBuilder>(
-                messageItem_,
-                ((bitField0_ & 0x00000008) == 0x00000008),
-                getParentForChildren(),
-                isClean());
-        messageItem_ = null;
-      }
-      return messageItemBuilder_;
+
+    public static Builder newBuilder(BatchMessage prototype) {
+        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
     }
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFieldsProto3(unknownFields);
+
+    public Builder toBuilder() {
+        return this == DEFAULT_INSTANCE
+                ? new Builder() : new Builder().mergeFrom(this);
     }
 
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
+    @Override
+    protected Builder newBuilderForType(
+            BuilderParent parent) {
+        Builder builder = new Builder(parent);
+        return builder;
     }
 
+    /**
+     * Protobuf type {@code eventmesh.common.protocol.grpc.BatchMessage}
+     */
+    public static final class Builder extends
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.BatchMessage)
+            BatchMessageOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
+        }
+
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            BatchMessage.class, Builder.class);
+        }
+
+        // Construct using org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage.newBuilder()
+        private Builder() {
+            maybeForceBuilderInitialization();
+        }
+
+        private Builder(BuilderParent parent) {
+            super(parent);
+            maybeForceBuilderInitialization();
+        }
+
+        private void maybeForceBuilderInitialization() {
+            if (com.google.protobuf.GeneratedMessageV3
+                    .alwaysUseFieldBuilders) {
+                getMessageItemFieldBuilder();
+            }
+        }
+
+        public Builder clear() {
+            super.clear();
+            if (headerBuilder_ == null) {
+                header_ = null;
+            } else {
+                header_ = null;
+                headerBuilder_ = null;
+            }
+            producerGroup_ = "";
+
+            topic_ = "";
+
+            if (messageItemBuilder_ == null) {
+                messageItem_ = java.util.Collections.emptyList();
+                bitField0_ = (bitField0_ & ~0x00000008);
+            } else {
+                messageItemBuilder_.clear();
+            }
+            return this;
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+        getDescriptorForType() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_BatchMessage_descriptor;
+        }
+
+        public BatchMessage getDefaultInstanceForType() {
+            return BatchMessage.getDefaultInstance();
+        }
+
+        public BatchMessage build() {
+            BatchMessage result = buildPartial();
+            if (!result.isInitialized()) {
+                throw newUninitializedMessageException(result);
+            }
+            return result;
+        }
+
+        public BatchMessage buildPartial() {
+            BatchMessage result = new BatchMessage(this);
+            int from_bitField0_ = bitField0_;
+            int to_bitField0_ = 0;
+            if (headerBuilder_ == null) {
+                result.header_ = header_;
+            } else {
+                result.header_ = headerBuilder_.build();
+            }
+            result.producerGroup_ = producerGroup_;
+            result.topic_ = topic_;
+            if (messageItemBuilder_ == null) {
+                if (((bitField0_ & 0x00000008) == 0x00000008)) {
+                    messageItem_ = java.util.Collections.unmodifiableList(messageItem_);
+                    bitField0_ = (bitField0_ & ~0x00000008);
+                }
+                result.messageItem_ = messageItem_;
+            } else {
+                result.messageItem_ = messageItemBuilder_.build();
+            }
+            result.bitField0_ = to_bitField0_;
+            onBuilt();
+            return result;
+        }
+
+        public Builder clone() {
+            return (Builder) super.clone();
+        }
+
+        public Builder setField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.setField(field, value);
+        }
+
+        public Builder clearField(
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
+            return (Builder) super.clearField(field);
+        }
+
+        public Builder clearOneof(
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+            return (Builder) super.clearOneof(oneof);
+        }
+
+        public Builder setRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
+            return (Builder) super.setRepeatedField(field, index, value);
+        }
+
+        public Builder addRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.addRepeatedField(field, value);
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+            if (other instanceof BatchMessage) {
+                return mergeFrom((BatchMessage) other);
+            } else {
+                super.mergeFrom(other);
+                return this;
+            }
+        }
+
+        public Builder mergeFrom(BatchMessage other) {
+            if (other == BatchMessage.getDefaultInstance()) return this;
+            if (other.hasHeader()) {
+                mergeHeader(other.getHeader());
+            }
+            if (!other.getProducerGroup().isEmpty()) {
+                producerGroup_ = other.producerGroup_;
+                onChanged();
+            }
+            if (!other.getTopic().isEmpty()) {
+                topic_ = other.topic_;
+                onChanged();
+            }
+            if (messageItemBuilder_ == null) {
+                if (!other.messageItem_.isEmpty()) {
+                    if (messageItem_.isEmpty()) {
+                        messageItem_ = other.messageItem_;
+                        bitField0_ = (bitField0_ & ~0x00000008);
+                    } else {
+                        ensureMessageItemIsMutable();
+                        messageItem_.addAll(other.messageItem_);
+                    }
+                    onChanged();
+                }
+            } else {
+                if (!other.messageItem_.isEmpty()) {
+                    if (messageItemBuilder_.isEmpty()) {
+                        messageItemBuilder_.dispose();
+                        messageItemBuilder_ = null;
+                        messageItem_ = other.messageItem_;
+                        bitField0_ = (bitField0_ & ~0x00000008);
+                        messageItemBuilder_ =
+                                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+                                        getMessageItemFieldBuilder() : null;
+                    } else {
+                        messageItemBuilder_.addAllMessages(other.messageItem_);
+                    }
+                }
+            }
+            this.mergeUnknownFields(other.unknownFields);
+            onChanged();
+            return this;
+        }
+
+        public final boolean isInitialized() {
+            return true;
+        }
+
+        public Builder mergeFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            BatchMessage parsedMessage = null;
+            try {
+                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                parsedMessage = (BatchMessage) e.getUnfinishedMessage();
+                throw e.unwrapIOException();
+            } finally {
+                if (parsedMessage != null) {
+                    mergeFrom(parsedMessage);
+                }
+            }
+            return this;
+        }
+
+        private int bitField0_;
+
+        private RequestHeader header_ = null;
+        private com.google.protobuf.SingleFieldBuilderV3<
+                RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public boolean hasHeader() {
+            return headerBuilder_ != null || header_ != null;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeader getHeader() {
+            if (headerBuilder_ == null) {
+                return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+            } else {
+                return headerBuilder_.getMessage();
+            }
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder setHeader(RequestHeader value) {
+            if (headerBuilder_ == null) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                header_ = value;
+                onChanged();
+            } else {
+                headerBuilder_.setMessage(value);
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder setHeader(
+                RequestHeader.Builder builderForValue) {
+            if (headerBuilder_ == null) {
+                header_ = builderForValue.build();
+                onChanged();
+            } else {
+                headerBuilder_.setMessage(builderForValue.build());
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder mergeHeader(RequestHeader value) {
+            if (headerBuilder_ == null) {
+                if (header_ != null) {
+                    header_ =
+                            RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+                } else {
+                    header_ = value;
+                }
+                onChanged();
+            } else {
+                headerBuilder_.mergeFrom(value);
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder clearHeader() {
+            if (headerBuilder_ == null) {
+                header_ = null;
+                onChanged();
+            } else {
+                header_ = null;
+                headerBuilder_ = null;
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeader.Builder getHeaderBuilder() {
+
+            onChanged();
+            return getHeaderFieldBuilder().getBuilder();
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeaderOrBuilder getHeaderOrBuilder() {
+            if (headerBuilder_ != null) {
+                return headerBuilder_.getMessageOrBuilder();
+            } else {
+                return header_ == null ?
+                        RequestHeader.getDefaultInstance() : header_;
+            }
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        private com.google.protobuf.SingleFieldBuilderV3<
+                RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+        getHeaderFieldBuilder() {
+            if (headerBuilder_ == null) {
+                headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+                        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+                        getHeader(),
+                        getParentForChildren(),
+                        isClean());
+                header_ = null;
+            }
+            return headerBuilder_;
+        }
+
+        private String producerGroup_ = "";
+
+        /**
+         * string producerGroup = 2;
+         */
+        public String getProducerGroup() {
+            return producerGroup_;
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public com.google.protobuf.ByteString
+        getProducerGroupBytes() {
+            return ByteString.copyFromUtf8(producerGroup_);
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public Builder setProducerGroup(
+                String value) {
+            Objects.requireNonNull(value, "ProducerGroup can not be null");
+
+            producerGroup_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public Builder clearProducerGroup() {
+
+            producerGroup_ = getDefaultInstance().getProducerGroup();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public Builder setProducerGroupBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ProducerGroupBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            producerGroup_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String topic_ = "";
+
+        /**
+         * string topic = 3;
+         */
+        public String getTopic() {
+            return topic_;
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public com.google.protobuf.ByteString
+        getTopicBytes() {
+            return ByteString.copyFromUtf8(topic_);
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public Builder setTopic(
+                String value) {
+            Objects.requireNonNull(value, "Topic can not be null");
+
+            topic_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public Builder clearTopic() {
+
+            topic_ = getDefaultInstance().getTopic();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public Builder setTopicBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "TopicBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            topic_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private java.util.List messageItem_ =
+                java.util.Collections.emptyList();
+
+        private void ensureMessageItemIsMutable() {
+            if (!((bitField0_ & 0x00000008) == 0x00000008)) {
+                messageItem_ = new java.util.ArrayList(messageItem_);
+                bitField0_ |= 0x00000008;
+            }
+        }
+
+        private com.google.protobuf.RepeatedFieldBuilderV3<
+                MessageItem, MessageItem.Builder, MessageItemOrBuilder> messageItemBuilder_;
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public java.util.List getMessageItemList() {
+            if (messageItemBuilder_ == null) {
+                return java.util.Collections.unmodifiableList(messageItem_);
+            } else {
+                return messageItemBuilder_.getMessageList();
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public int getMessageItemCount() {
+            if (messageItemBuilder_ == null) {
+                return messageItem_.size();
+            } else {
+                return messageItemBuilder_.getCount();
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public MessageItem getMessageItem(int index) {
+            if (messageItemBuilder_ == null) {
+                return messageItem_.get(index);
+            } else {
+                return messageItemBuilder_.getMessage(index);
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder setMessageItem(
+                int index, MessageItem value) {
+            if (messageItemBuilder_ == null) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                ensureMessageItemIsMutable();
+                messageItem_.set(index, value);
+                onChanged();
+            } else {
+                messageItemBuilder_.setMessage(index, value);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder setMessageItem(
+                int index, MessageItem.Builder builderForValue) {
+            if (messageItemBuilder_ == null) {
+                ensureMessageItemIsMutable();
+                messageItem_.set(index, builderForValue.build());
+                onChanged();
+            } else {
+                messageItemBuilder_.setMessage(index, builderForValue.build());
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder addMessageItem(MessageItem value) {
+            if (messageItemBuilder_ == null) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                ensureMessageItemIsMutable();
+                messageItem_.add(value);
+                onChanged();
+            } else {
+                messageItemBuilder_.addMessage(value);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder addMessageItem(
+                int index, MessageItem value) {
+            if (messageItemBuilder_ == null) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                ensureMessageItemIsMutable();
+                messageItem_.add(index, value);
+                onChanged();
+            } else {
+                messageItemBuilder_.addMessage(index, value);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder addMessageItem(
+                MessageItem.Builder builderForValue) {
+            if (messageItemBuilder_ == null) {
+                ensureMessageItemIsMutable();
+                messageItem_.add(builderForValue.build());
+                onChanged();
+            } else {
+                messageItemBuilder_.addMessage(builderForValue.build());
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder addMessageItem(
+                int index, MessageItem.Builder builderForValue) {
+            if (messageItemBuilder_ == null) {
+                ensureMessageItemIsMutable();
+                messageItem_.add(index, builderForValue.build());
+                onChanged();
+            } else {
+                messageItemBuilder_.addMessage(index, builderForValue.build());
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder addAllMessageItem(
+                Iterable values) {
+            if (messageItemBuilder_ == null) {
+                ensureMessageItemIsMutable();
+                com.google.protobuf.AbstractMessageLite.Builder.addAll(
+                        values, messageItem_);
+                onChanged();
+            } else {
+                messageItemBuilder_.addAllMessages(values);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder clearMessageItem() {
+            if (messageItemBuilder_ == null) {
+                messageItem_ = java.util.Collections.emptyList();
+                bitField0_ = (bitField0_ & ~0x00000008);
+                onChanged();
+            } else {
+                messageItemBuilder_.clear();
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public Builder removeMessageItem(int index) {
+            if (messageItemBuilder_ == null) {
+                ensureMessageItemIsMutable();
+                messageItem_.remove(index);
+                onChanged();
+            } else {
+                messageItemBuilder_.remove(index);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public MessageItem.Builder getMessageItemBuilder(
+                int index) {
+            return getMessageItemFieldBuilder().getBuilder(index);
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public MessageItemOrBuilder getMessageItemOrBuilder(
+                int index) {
+            if (messageItemBuilder_ == null) {
+                return messageItem_.get(index);
+            } else {
+                return messageItemBuilder_.getMessageOrBuilder(index);
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public java.util.List
+        getMessageItemOrBuilderList() {
+            if (messageItemBuilder_ != null) {
+                return messageItemBuilder_.getMessageOrBuilderList();
+            } else {
+                return java.util.Collections.unmodifiableList(messageItem_);
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public MessageItem.Builder addMessageItemBuilder() {
+            return getMessageItemFieldBuilder().addBuilder(
+                    MessageItem.getDefaultInstance());
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public MessageItem.Builder addMessageItemBuilder(
+                int index) {
+            return getMessageItemFieldBuilder().addBuilder(
+                    index, MessageItem.getDefaultInstance());
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.BatchMessage.MessageItem messageItem = 4;
+         */
+        public java.util.List
+        getMessageItemBuilderList() {
+            return getMessageItemFieldBuilder().getBuilderList();
+        }
+
+        private com.google.protobuf.RepeatedFieldBuilderV3<
+                MessageItem, MessageItem.Builder, MessageItemOrBuilder>
+        getMessageItemFieldBuilder() {
+            if (messageItemBuilder_ == null) {
+                messageItemBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+                        MessageItem, MessageItem.Builder, MessageItemOrBuilder>(
+                        messageItem_,
+                        ((bitField0_ & 0x00000008) == 0x00000008),
+                        getParentForChildren(),
+                        isClean());
+                messageItem_ = null;
+            }
+            return messageItemBuilder_;
+        }
+
+        public final Builder setUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.setUnknownFieldsProto3(unknownFields);
+        }
+
+        public final Builder mergeUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.mergeUnknownFields(unknownFields);
+        }
+
 
-    // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.BatchMessage)
-  }
+        // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.BatchMessage)
+    }
 
-  // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.BatchMessage)
-  private static final BatchMessage DEFAULT_INSTANCE;
-  static {
-    DEFAULT_INSTANCE = new BatchMessage();
-  }
+    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.BatchMessage)
+    private static final BatchMessage DEFAULT_INSTANCE;
 
-  public static BatchMessage getDefaultInstance() {
-    return DEFAULT_INSTANCE;
-  }
+    static {
+        DEFAULT_INSTANCE = new BatchMessage();
+    }
 
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
-    public BatchMessage parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new BatchMessage(input, extensionRegistry);
+    public static BatchMessage getDefaultInstance() {
+        return DEFAULT_INSTANCE;
     }
-  };
 
-  public static com.google.protobuf.Parser parser() {
-    return PARSER;
-  }
+    private static final com.google.protobuf.Parser
+            PARSER = new com.google.protobuf.AbstractParser() {
+        public BatchMessage parsePartialFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return new BatchMessage(input, extensionRegistry);
+        }
+    };
+
+    public static com.google.protobuf.Parser parser() {
+        return PARSER;
+    }
 
-  @Override
-  public com.google.protobuf.Parser getParserForType() {
-    return PARSER;
-  }
+    @Override
+    public com.google.protobuf.Parser getParserForType() {
+        return PARSER;
+    }
 
-  public BatchMessage getDefaultInstanceForType() {
-    return DEFAULT_INSTANCE;
-  }
+    public BatchMessage getDefaultInstanceForType() {
+        return DEFAULT_INSTANCE;
+    }
 
 }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
index bbab602dba..54b68ee467 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Heartbeat.java
@@ -20,2014 +20,1969 @@
 
 package org.apache.eventmesh.common.protocol.grpc.protos;
 
+import java.util.Objects;
+
+import com.google.protobuf.ByteString;
+
+
+
 /**
  * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat}
  */
 @SuppressWarnings({"all"})
-public  final class Heartbeat extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Heartbeat)
-    HeartbeatOrBuilder {
-private static final long serialVersionUID = 0L;
-  // Use Heartbeat.newBuilder() to construct.
-  private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-    super(builder);
-  }
-  private Heartbeat() {
-    clientType_ = 0;
-    producerGroup_ = "";
-    consumerGroup_ = "";
-    heartbeatItems_ = java.util.Collections.emptyList();
-  }
-
-  @Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
-    return this.unknownFields;
-  }
-  private Heartbeat(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new NullPointerException();
+public final class Heartbeat extends
+        com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Heartbeat)
+        HeartbeatOrBuilder {
+    private static final long serialVersionUID = -617903330545075556L;
+
+    // Use Heartbeat.newBuilder() to construct.
+    private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        super(builder);
     }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          default: {
-            if (!parseUnknownFieldProto3(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
-            }
-            break;
-          }
-          case 10: {
-            RequestHeader.Builder subBuilder = null;
-            if (header_ != null) {
-              subBuilder = header_.toBuilder();
-            }
-            header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
-            if (subBuilder != null) {
-              subBuilder.mergeFrom(header_);
-              header_ = subBuilder.buildPartial();
-            }
-
-            break;
-          }
-          case 16: {
-            int rawValue = input.readEnum();
-
-            clientType_ = rawValue;
-            break;
-          }
-          case 26: {
-            String s = input.readStringRequireUtf8();
-
-            producerGroup_ = s;
-            break;
-          }
-          case 34: {
-            String s = input.readStringRequireUtf8();
-
-            consumerGroup_ = s;
-            break;
-          }
-          case 42: {
-            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-              heartbeatItems_ = new java.util.ArrayList();
-              mutable_bitField0_ |= 0x00000010;
-            }
-            heartbeatItems_.add(
-                input.readMessage(HeartbeatItem.parser(), extensionRegistry));
-            break;
-          }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
-    } finally {
-      if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-        heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
-      }
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
+
+    private Heartbeat() {
+        clientType_ = 0;
+        producerGroup_ = "";
+        consumerGroup_ = "";
+        heartbeatItems_ = java.util.Collections.emptyList();
     }
-  }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
-  }
-
-  protected FieldAccessorTable
-      internalGetFieldAccessorTable() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable
-        .ensureFieldAccessorsInitialized(
-            Heartbeat.class, Builder.class);
-  }
-
-  /**
-   * Protobuf enum {@code eventmesh.common.protocol.grpc.Heartbeat.ClientType}
-   */
-  public enum ClientType
-      implements com.google.protobuf.ProtocolMessageEnum {
-    /**
-     * PUB = 0;
-     */
-    PUB(0),
-    /**
-     * SUB = 1;
-     */
-    SUB(1),
-    UNRECOGNIZED(-1),
-    ;
 
-    /**
-     * PUB = 0;
-     */
-    public static final int PUB_VALUE = 0;
-    /**
-     * SUB = 1;
-     */
-    public static final int SUB_VALUE = 1;
+    @Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+        return this.unknownFields;
+    }
+
+    private Heartbeat(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        this();
+        if (extensionRegistry == null) {
+            throw new NullPointerException();
+        }
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+            boolean done = false;
+            while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                    case 0:
+                        done = true;
+                        break;
+                    default: {
+                        if (!parseUnknownFieldProto3(
+                                input, unknownFields, extensionRegistry, tag)) {
+                            done = true;
+                        }
+                        break;
+                    }
+                    case 10: {
+                        RequestHeader.Builder subBuilder = null;
+                        if (header_ != null) {
+                            subBuilder = header_.toBuilder();
+                        }
+                        header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+                        if (subBuilder != null) {
+                            subBuilder.mergeFrom(header_);
+                            header_ = subBuilder.buildPartial();
+                        }
+
+                        break;
+                    }
+                    case 16: {
+                        clientType_ = input.readEnum();
+                        break;
+                    }
+                    case 26: {
+                        producerGroup_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 34: {
+                        consumerGroup_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 42: {
+                        if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                            heartbeatItems_ = new java.util.ArrayList();
+                            mutable_bitField0_ |= 0x00000010;
+                        }
+                        heartbeatItems_.add(
+                                input.readMessage(HeartbeatItem.parser(), extensionRegistry));
+                        break;
+                    }
+                }
+            }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(
+                    e).setUnfinishedMessage(this);
+        } finally {
+            if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
+            }
+            this.unknownFields = unknownFields.build();
+            makeExtensionsImmutable();
+        }
+    }
 
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+    }
 
-    public final int getNumber() {
-      if (this == UNRECOGNIZED) {
-        throw new IllegalArgumentException(
-            "Can't get the number of an unknown enum value.");
-      }
-      return value;
+    protected FieldAccessorTable internalGetFieldAccessorTable() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable
+                .ensureFieldAccessorsInitialized(
+                        Heartbeat.class, Builder.class);
     }
 
     /**
-     * @deprecated Use {@link #forNumber(int)} instead.
+     * Protobuf enum {@code eventmesh.common.protocol.grpc.Heartbeat.ClientType}
      */
-    @Deprecated
-    public static ClientType valueOf(int value) {
-      return forNumber(value);
-    }
+    public enum ClientType
+            implements com.google.protobuf.ProtocolMessageEnum {
+        /**
+         * PUB = 0;
+         */
+        PUB(0),
+        /**
+         * SUB = 1;
+         */
+        SUB(1),
+        UNRECOGNIZED(-1),
+        ;
+
+        /**
+         * PUB = 0;
+         */
+        public static final int PUB_VALUE = 0;
+        /**
+         * SUB = 1;
+         */
+        public static final int SUB_VALUE = 1;
+
+
+        public final int getNumber() {
+            if (this == UNRECOGNIZED) {
+                throw new IllegalArgumentException(
+                        "Can't get the number of an unknown enum value.");
+            }
+            return value;
+        }
 
-    public static ClientType forNumber(int value) {
-      switch (value) {
-        case 0: return PUB;
-        case 1: return SUB;
-        default: return null;
-      }
-    }
+        /**
+         * @deprecated Use {@link #forNumber(int)} instead.
+         */
+        @Deprecated
+        public static ClientType valueOf(int value) {
+            return forNumber(value);
+        }
 
-    public static com.google.protobuf.Internal.EnumLiteMap
-        internalGetValueMap() {
-      return internalValueMap;
-    }
-    private static final com.google.protobuf.Internal.EnumLiteMap<
-        ClientType> internalValueMap =
-          new com.google.protobuf.Internal.EnumLiteMap() {
-            public ClientType findValueByNumber(int number) {
-              return ClientType.forNumber(number);
+        public static ClientType forNumber(int value) {
+            switch (value) {
+                case 0:
+                    return PUB;
+                case 1:
+                    return SUB;
+                default:
+                    return null;
             }
-          };
+        }
+
+        public static com.google.protobuf.Internal.EnumLiteMap
+        internalGetValueMap() {
+            return internalValueMap;
+        }
 
-    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        private static final com.google.protobuf.Internal.EnumLiteMap<
+                ClientType> internalValueMap =
+                new com.google.protobuf.Internal.EnumLiteMap() {
+                    public ClientType findValueByNumber(int number) {
+                        return ClientType.forNumber(number);
+                    }
+                };
+
+        public final com.google.protobuf.Descriptors.EnumValueDescriptor
         getValueDescriptor() {
-      return getDescriptor().getValues().get(ordinal());
-    }
-    public final com.google.protobuf.Descriptors.EnumDescriptor
+            return getDescriptor().getValues().get(ordinal());
+        }
+
+        public final com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptorForType() {
-      return getDescriptor();
-    }
-    public static final com.google.protobuf.Descriptors.EnumDescriptor
+            return getDescriptor();
+        }
+
+        public static final com.google.protobuf.Descriptors.EnumDescriptor
         getDescriptor() {
-      return Heartbeat.getDescriptor().getEnumTypes().get(0);
-    }
+            return Heartbeat.getDescriptor().getEnumTypes().get(0);
+        }
 
-    private static final ClientType[] VALUES = values();
-
-    public static ClientType valueOf(
-        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
-      if (desc.getType() != getDescriptor()) {
-        throw new IllegalArgumentException(
-          "EnumValueDescriptor is not for this type.");
-      }
-      if (desc.getIndex() == -1) {
-        return UNRECOGNIZED;
-      }
-      return VALUES[desc.getIndex()];
-    }
+        private static final ClientType[] VALUES = values();
+
+        public static ClientType valueOf(
+                com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+            if (desc.getType() != getDescriptor()) {
+                throw new IllegalArgumentException(
+                        "EnumValueDescriptor is not for this type.");
+            }
+            if (desc.getIndex() == -1) {
+                return UNRECOGNIZED;
+            }
+            return VALUES[desc.getIndex()];
+        }
 
-    private final int value;
+        private final int value;
+
+        private ClientType(int value) {
+            this.value = value;
+        }
 
-    private ClientType(int value) {
-      this.value = value;
+        // @@protoc_insertion_point(enum_scope:eventmesh.common.protocol.grpc.Heartbeat.ClientType)
     }
 
-    // @@protoc_insertion_point(enum_scope:eventmesh.common.protocol.grpc.Heartbeat.ClientType)
-  }
+    public interface HeartbeatItemOrBuilder extends
+            // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+            com.google.protobuf.MessageOrBuilder {
 
-  public interface HeartbeatItemOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
-      com.google.protobuf.MessageOrBuilder {
+        /**
+         * string topic = 1;
+         */
+        String getTopic();
 
-    /**
-     * string topic = 1;
-     */
-    String getTopic();
-    /**
-     * string topic = 1;
-     */
-    com.google.protobuf.ByteString
+        /**
+         * string topic = 1;
+         */
+        com.google.protobuf.ByteString
         getTopicBytes();
 
-    /**
-     * string url = 2;
-     */
-    String getUrl();
-    /**
-     * string url = 2;
-     */
-    com.google.protobuf.ByteString
-        getUrlBytes();
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem}
-   */
-  public  static final class HeartbeatItem extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
-      HeartbeatItemOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use HeartbeatItem.newBuilder() to construct.
-    private HeartbeatItem(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
-    private HeartbeatItem() {
-      topic_ = "";
-      url_ = "";
-    }
-
-    @Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private HeartbeatItem(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownFieldProto3(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              String s = input.readStringRequireUtf8();
-
-              topic_ = s;
-              break;
-            }
-            case 18: {
-              String s = input.readStringRequireUtf8();
-
-              url_ = s;
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
-    }
+        /**
+         * string url = 2;
+         */
+        String getUrl();
 
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              HeartbeatItem.class, Builder.class);
+        /**
+         * string url = 2;
+         */
+        com.google.protobuf.ByteString
+        getUrlBytes();
     }
 
-    public static final int TOPIC_FIELD_NUMBER = 1;
-    private volatile Object topic_;
-    /**
-     * string topic = 1;
-     */
-    public String getTopic() {
-      Object ref = topic_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        topic_ = s;
-        return s;
-      }
-    }
     /**
-     * string topic = 1;
+     * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem}
      */
-    public com.google.protobuf.ByteString
-        getTopicBytes() {
-      Object ref = topic_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        topic_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+    public static final class HeartbeatItem extends
+            com.google.protobuf.GeneratedMessageV3 implements
+            // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+            HeartbeatItemOrBuilder {
+        private static final long serialVersionUID = 0L;
+
+        // Use HeartbeatItem.newBuilder() to construct.
+        private HeartbeatItem(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+            super(builder);
+        }
 
-    public static final int URL_FIELD_NUMBER = 2;
-    private volatile Object url_;
-    /**
-     * string url = 2;
-     */
-    public String getUrl() {
-      Object ref = url_;
-      if (ref instanceof String) {
-        return (String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        url_ = s;
-        return s;
-      }
-    }
-    /**
-     * string url = 2;
-     */
-    public com.google.protobuf.ByteString
-        getUrlBytes() {
-      Object ref = url_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        url_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
+        private HeartbeatItem() {
+            topic_ = "";
+            url_ = "";
+        }
 
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
+        @Override
+        public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+            return this.unknownFields;
+        }
 
-      memoizedIsInitialized = 1;
-      return true;
-    }
+        private HeartbeatItem(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            this();
+            if (extensionRegistry == null) {
+                throw new NullPointerException();
+            }
+            int mutable_bitField0_ = 0;
+            com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                    com.google.protobuf.UnknownFieldSet.newBuilder();
+            try {
+                boolean done = false;
+                while (!done) {
+                    int tag = input.readTag();
+                    switch (tag) {
+                        case 0:
+                            done = true;
+                            break;
+                        default: {
+                            if (!parseUnknownFieldProto3(
+                                    input, unknownFields, extensionRegistry, tag)) {
+                                done = true;
+                            }
+                            break;
+                        }
+                        case 10: {
+                            topic_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                        case 18: {
+                            url_ = input.readStringRequireUtf8();
+                            break;
+                        }
+                    }
+                }
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                throw e.setUnfinishedMessage(this);
+            } catch (java.io.IOException e) {
+                throw new com.google.protobuf.InvalidProtocolBufferException(
+                        e).setUnfinishedMessage(this);
+            } finally {
+                this.unknownFields = unknownFields.build();
+                makeExtensionsImmutable();
+            }
+        }
 
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (!getTopicBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
-      }
-      if (!getUrlBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
-      }
-      unknownFields.writeTo(output);
-    }
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+        }
 
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (!getTopicBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
-      }
-      if (!getUrlBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
-      }
-      size += unknownFields.getSerializedSize();
-      memoizedSize = size;
-      return size;
-    }
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            HeartbeatItem.class, Builder.class);
+        }
 
-    @Override
-    public boolean equals(final Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof HeartbeatItem)) {
-        return super.equals(obj);
-      }
-      HeartbeatItem other = (HeartbeatItem) obj;
-
-      boolean result = true;
-      result = result && getTopic()
-          .equals(other.getTopic());
-      result = result && getUrl()
-          .equals(other.getUrl());
-      result = result && unknownFields.equals(other.unknownFields);
-      return result;
-    }
+        public static final int TOPIC_FIELD_NUMBER = 1;
+        private volatile String topic_;
 
-    @Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + TOPIC_FIELD_NUMBER;
-      hash = (53 * hash) + getTopic().hashCode();
-      hash = (37 * hash) + URL_FIELD_NUMBER;
-      hash = (53 * hash) + getUrl().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
+        /**
+         * string topic = 1;
+         */
+        public String getTopic() {
+            return topic_;
+        }
 
-    public static HeartbeatItem parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static HeartbeatItem parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static HeartbeatItem parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static HeartbeatItem parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static HeartbeatItem parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static HeartbeatItem parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static HeartbeatItem parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static HeartbeatItem parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static HeartbeatItem parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static HeartbeatItem parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static HeartbeatItem parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static HeartbeatItem parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
+        /**
+         * string topic = 1;
+         */
+        public com.google.protobuf.ByteString getTopicBytes() {
+            return ByteString.copyFromUtf8(topic_);
+        }
 
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(HeartbeatItem prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
+        public static final int URL_FIELD_NUMBER = 2;
+        private volatile String url_;
 
-    @Override
-    protected Builder newBuilderForType(
-        BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
-        HeartbeatItemOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
-      }
-
-      protected FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                HeartbeatItem.class, Builder.class);
-      }
-
-      // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat.HeartbeatItem.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      public Builder clear() {
-        super.clear();
-        topic_ = "";
-
-        url_ = "";
-
-        return this;
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
-      }
-
-      public HeartbeatItem getDefaultInstanceForType() {
-        return HeartbeatItem.getDefaultInstance();
-      }
-
-      public HeartbeatItem build() {
-        HeartbeatItem result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public HeartbeatItem buildPartial() {
-        HeartbeatItem result = new HeartbeatItem(this);
-        result.topic_ = topic_;
-        result.url_ = url_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder clone() {
-        return (Builder) super.clone();
-      }
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return (Builder) super.setField(field, value);
-      }
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return (Builder) super.clearField(field);
-      }
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return (Builder) super.clearOneof(oneof);
-      }
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, Object value) {
-        return (Builder) super.setRepeatedField(field, index, value);
-      }
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          Object value) {
-        return (Builder) super.addRepeatedField(field, value);
-      }
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof HeartbeatItem) {
-          return mergeFrom((HeartbeatItem)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(HeartbeatItem other) {
-        if (other == HeartbeatItem.getDefaultInstance()) return this;
-        if (!other.getTopic().isEmpty()) {
-          topic_ = other.topic_;
-          onChanged();
-        }
-        if (!other.getUrl().isEmpty()) {
-          url_ = other.url_;
-          onChanged();
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
+        /**
+         * string url = 2;
+         */
+        public String getUrl() {
+            return url_;
+        }
 
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        HeartbeatItem parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (HeartbeatItem) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private Object topic_ = "";
-      /**
-       * string topic = 1;
-       */
-      public String getTopic() {
-        Object ref = topic_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          topic_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string topic = 1;
-       */
-      public com.google.protobuf.ByteString
-          getTopicBytes() {
-        Object ref = topic_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          topic_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string topic = 1;
-       */
-      public Builder setTopic(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        topic_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string topic = 1;
-       */
-      public Builder clearTopic() {
-        
-        topic_ = getDefaultInstance().getTopic();
-        onChanged();
-        return this;
-      }
-      /**
-       * string topic = 1;
-       */
-      public Builder setTopicBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        topic_ = value;
-        onChanged();
-        return this;
-      }
-
-      private Object url_ = "";
-      /**
-       * string url = 2;
-       */
-      public String getUrl() {
-        Object ref = url_;
-        if (!(ref instanceof String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          String s = bs.toStringUtf8();
-          url_ = s;
-          return s;
-        } else {
-          return (String) ref;
-        }
-      }
-      /**
-       * string url = 2;
-       */
-      public com.google.protobuf.ByteString
-          getUrlBytes() {
-        Object ref = url_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (String) ref);
-          url_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string url = 2;
-       */
-      public Builder setUrl(
-          String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        url_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string url = 2;
-       */
-      public Builder clearUrl() {
-        
-        url_ = getDefaultInstance().getUrl();
-        onChanged();
-        return this;
-      }
-      /**
-       * string url = 2;
-       */
-      public Builder setUrlBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        url_ = value;
-        onChanged();
-        return this;
-      }
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFieldsProto3(unknownFields);
-      }
-
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
-    }
+        /**
+         * string url = 2;
+         */
+        public com.google.protobuf.ByteString getUrlBytes() {
+            return ByteString.copyFromUtf8(url_);
+        }
 
-    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
-    private static final HeartbeatItem DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new HeartbeatItem();
-    }
+        private byte memoizedIsInitialized = -1;
 
-    public static HeartbeatItem getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
+        public final boolean isInitialized() {
+            if (memoizedIsInitialized == 1) return true;
+            if (memoizedIsInitialized == 0) return false;
 
-    private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      public HeartbeatItem parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new HeartbeatItem(input, extensionRegistry);
-      }
-    };
+            memoizedIsInitialized = 1;
+            return true;
+        }
 
-    public static com.google.protobuf.Parser parser() {
-      return PARSER;
-    }
+        public void writeTo(com.google.protobuf.CodedOutputStream output)
+                throws java.io.IOException {
+            if (!getTopicBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_);
+            }
+            if (!getUrlBytes().isEmpty()) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
+            }
+            unknownFields.writeTo(output);
+        }
 
-    @Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
+        public int getSerializedSize() {
+            int size = memoizedSize;
+            if (size != -1) return size;
 
-    public HeartbeatItem getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
+            size = 0;
+            if (!getTopicBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_);
+            }
+            if (!getUrlBytes().isEmpty()) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
+            }
+            size += unknownFields.getSerializedSize();
+            memoizedSize = size;
+            return size;
+        }
 
-  }
-
-  private int bitField0_;
-  public static final int HEADER_FIELD_NUMBER = 1;
-  private RequestHeader header_;
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public boolean hasHeader() {
-    return header_ != null;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public RequestHeader getHeader() {
-    return header_ == null ? RequestHeader.getDefaultInstance() : header_;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public RequestHeaderOrBuilder getHeaderOrBuilder() {
-    return getHeader();
-  }
-
-  public static final int CLIENTTYPE_FIELD_NUMBER = 2;
-  private int clientType_;
-  /**
-   * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
-   */
-  public int getClientTypeValue() {
-    return clientType_;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
-   */
-  public ClientType getClientType() {
-    ClientType result = ClientType.valueOf(clientType_);
-    return result == null ? ClientType.UNRECOGNIZED : result;
-  }
-
-  public static final int PRODUCERGROUP_FIELD_NUMBER = 3;
-  private volatile Object producerGroup_;
-  /**
-   * string producerGroup = 3;
-   */
-  public String getProducerGroup() {
-    Object ref = producerGroup_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      producerGroup_ = s;
-      return s;
-    }
-  }
-  /**
-   * string producerGroup = 3;
-   */
-  public com.google.protobuf.ByteString
-      getProducerGroupBytes() {
-    Object ref = producerGroup_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      producerGroup_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int CONSUMERGROUP_FIELD_NUMBER = 4;
-  private volatile Object consumerGroup_;
-  /**
-   * string consumerGroup = 4;
-   */
-  public String getConsumerGroup() {
-    Object ref = consumerGroup_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      consumerGroup_ = s;
-      return s;
-    }
-  }
-  /**
-   * string consumerGroup = 4;
-   */
-  public com.google.protobuf.ByteString
-      getConsumerGroupBytes() {
-    Object ref = consumerGroup_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      consumerGroup_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int HEARTBEATITEMS_FIELD_NUMBER = 5;
-  private java.util.List heartbeatItems_;
-  /**
-   * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-   */
-  public java.util.List getHeartbeatItemsList() {
-    return heartbeatItems_;
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-   */
-  public java.util.List
-      getHeartbeatItemsOrBuilderList() {
-    return heartbeatItems_;
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-   */
-  public int getHeartbeatItemsCount() {
-    return heartbeatItems_.size();
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-   */
-  public HeartbeatItem getHeartbeatItems(int index) {
-    return heartbeatItems_.get(index);
-  }
-  /**
-   * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-   */
-  public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
-      int index) {
-    return heartbeatItems_.get(index);
-  }
-
-  private byte memoizedIsInitialized = -1;
-  public final boolean isInitialized() {
-    byte isInitialized = memoizedIsInitialized;
-    if (isInitialized == 1) return true;
-    if (isInitialized == 0) return false;
-
-    memoizedIsInitialized = 1;
-    return true;
-  }
-
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
-    if (header_ != null) {
-      output.writeMessage(1, getHeader());
-    }
-    if (clientType_ != ClientType.PUB.getNumber()) {
-      output.writeEnum(2, clientType_);
-    }
-    if (!getProducerGroupBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, producerGroup_);
-    }
-    if (!getConsumerGroupBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, consumerGroup_);
-    }
-    for (int i = 0; i < heartbeatItems_.size(); i++) {
-      output.writeMessage(5, heartbeatItems_.get(i));
-    }
-    unknownFields.writeTo(output);
-  }
+        @Override
+        public boolean equals(final Object obj) {
+            if (obj == this) {
+                return true;
+            }
+            if (!(obj instanceof HeartbeatItem)) {
+                return super.equals(obj);
+            }
+            HeartbeatItem other = (HeartbeatItem) obj;
 
-  public int getSerializedSize() {
-    int size = memoizedSize;
-    if (size != -1) return size;
+            return getTopic().equals(other.getTopic())
+                    && getUrl().equals(other.getUrl())
+                    && unknownFields.equals(other.unknownFields);
+        }
 
-    size = 0;
-    if (header_ != null) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(1, getHeader());
-    }
-    if (clientType_ != ClientType.PUB.getNumber()) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeEnumSize(2, clientType_);
-    }
-    if (!getProducerGroupBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, producerGroup_);
-    }
-    if (!getConsumerGroupBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, consumerGroup_);
-    }
-    for (int i = 0; i < heartbeatItems_.size(); i++) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(5, heartbeatItems_.get(i));
-    }
-    size += unknownFields.getSerializedSize();
-    memoizedSize = size;
-    return size;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == this) {
-     return true;
-    }
-    if (!(obj instanceof Heartbeat)) {
-      return super.equals(obj);
-    }
-    Heartbeat other = (Heartbeat) obj;
+        @Override
+        public int hashCode() {
+            if (memoizedHashCode != 0) {
+                return memoizedHashCode;
+            }
+            int hash = 41;
+            hash = (19 * hash) + getDescriptor().hashCode();
+            hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+            hash = (53 * hash) + getTopic().hashCode();
+            hash = (37 * hash) + URL_FIELD_NUMBER;
+            hash = (53 * hash) + getUrl().hashCode();
+            hash = (29 * hash) + unknownFields.hashCode();
+            memoizedHashCode = hash;
+            return hash;
+        }
 
-    boolean result = true;
-    result = result && (hasHeader() == other.hasHeader());
-    if (hasHeader()) {
-      result = result && getHeader()
-          .equals(other.getHeader());
-    }
-    result = result && clientType_ == other.clientType_;
-    result = result && getProducerGroup()
-        .equals(other.getProducerGroup());
-    result = result && getConsumerGroup()
-        .equals(other.getConsumerGroup());
-    result = result && getHeartbeatItemsList()
-        .equals(other.getHeartbeatItemsList());
-    result = result && unknownFields.equals(other.unknownFields);
-    return result;
-  }
-
-  @Override
-  public int hashCode() {
-    if (memoizedHashCode != 0) {
-      return memoizedHashCode;
-    }
-    int hash = 41;
-    hash = (19 * hash) + getDescriptor().hashCode();
-    if (hasHeader()) {
-      hash = (37 * hash) + HEADER_FIELD_NUMBER;
-      hash = (53 * hash) + getHeader().hashCode();
-    }
-    hash = (37 * hash) + CLIENTTYPE_FIELD_NUMBER;
-    hash = (53 * hash) + clientType_;
-    hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
-    hash = (53 * hash) + getProducerGroup().hashCode();
-    hash = (37 * hash) + CONSUMERGROUP_FIELD_NUMBER;
-    hash = (53 * hash) + getConsumerGroup().hashCode();
-    if (getHeartbeatItemsCount() > 0) {
-      hash = (37 * hash) + HEARTBEATITEMS_FIELD_NUMBER;
-      hash = (53 * hash) + getHeartbeatItemsList().hashCode();
-    }
-    hash = (29 * hash) + unknownFields.hashCode();
-    memoizedHashCode = hash;
-    return hash;
-  }
-
-  public static Heartbeat parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static Heartbeat parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static Heartbeat parseFrom(
-      com.google.protobuf.ByteString data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static Heartbeat parseFrom(
-      com.google.protobuf.ByteString data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static Heartbeat parseFrom(byte[] data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static Heartbeat parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static Heartbeat parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static Heartbeat parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static Heartbeat parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
-  }
-  public static Heartbeat parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static Heartbeat parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static Heartbeat parseFrom(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-
-  public Builder newBuilderForType() { return newBuilder(); }
-  public static Builder newBuilder() {
-    return DEFAULT_INSTANCE.toBuilder();
-  }
-  public static Builder newBuilder(Heartbeat prototype) {
-    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-  }
-  public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
-  }
-
-  @Override
-  protected Builder newBuilderForType(
-      BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat}
-   */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
-      // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Heartbeat)
-      HeartbeatOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
-    }
+        public static HeartbeatItem parseFrom(
+                java.nio.ByteBuffer data)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
 
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              Heartbeat.class, Builder.class);
-    }
+        public static HeartbeatItem parseFrom(
+                java.nio.ByteBuffer data,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
 
-    // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+        public static HeartbeatItem parseFrom(
+                com.google.protobuf.ByteString data)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
 
-    private Builder(
-        BuilderParent parent) {
-      super(parent);
-      maybeForceBuilderInitialization();
-    }
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-        getHeartbeatItemsFieldBuilder();
-      }
-    }
-    public Builder clear() {
-      super.clear();
-      if (headerBuilder_ == null) {
-        header_ = null;
-      } else {
-        header_ = null;
-        headerBuilder_ = null;
-      }
-      clientType_ = 0;
+        public static HeartbeatItem parseFrom(
+                com.google.protobuf.ByteString data,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
 
-      producerGroup_ = "";
+        public static HeartbeatItem parseFrom(byte[] data)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
 
-      consumerGroup_ = "";
+        public static HeartbeatItem parseFrom(
+                byte[] data,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
 
-      if (heartbeatItemsBuilder_ == null) {
-        heartbeatItems_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000010);
-      } else {
-        heartbeatItemsBuilder_.clear();
-      }
-      return this;
-    }
+        public static HeartbeatItem parseFrom(java.io.InputStream input)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input);
+        }
 
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
-    }
+        public static HeartbeatItem parseFrom(
+                java.io.InputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input, extensionRegistry);
+        }
 
-    public Heartbeat getDefaultInstanceForType() {
-      return Heartbeat.getDefaultInstance();
-    }
+        public static HeartbeatItem parseDelimitedFrom(java.io.InputStream input)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseDelimitedWithIOException(PARSER, input);
+        }
 
-    public Heartbeat build() {
-      Heartbeat result = buildPartial();
-      if (!result.isInitialized()) {
-        throw newUninitializedMessageException(result);
-      }
-      return result;
-    }
+        public static HeartbeatItem parseDelimitedFrom(
+                java.io.InputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+        }
 
-    public Heartbeat buildPartial() {
-      Heartbeat result = new Heartbeat(this);
-      int from_bitField0_ = bitField0_;
-      int to_bitField0_ = 0;
-      if (headerBuilder_ == null) {
-        result.header_ = header_;
-      } else {
-        result.header_ = headerBuilder_.build();
-      }
-      result.clientType_ = clientType_;
-      result.producerGroup_ = producerGroup_;
-      result.consumerGroup_ = consumerGroup_;
-      if (heartbeatItemsBuilder_ == null) {
-        if (((bitField0_ & 0x00000010) == 0x00000010)) {
-          heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
-          bitField0_ = (bitField0_ & ~0x00000010);
-        }
-        result.heartbeatItems_ = heartbeatItems_;
-      } else {
-        result.heartbeatItems_ = heartbeatItemsBuilder_.build();
-      }
-      result.bitField0_ = to_bitField0_;
-      onBuilt();
-      return result;
-    }
+        public static HeartbeatItem parseFrom(
+                com.google.protobuf.CodedInputStream input)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input);
+        }
 
-    public Builder clone() {
-      return (Builder) super.clone();
-    }
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.setField(field, value);
-    }
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return (Builder) super.clearField(field);
-    }
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return (Builder) super.clearOneof(oneof);
-    }
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, Object value) {
-      return (Builder) super.setRepeatedField(field, index, value);
-    }
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.addRepeatedField(field, value);
-    }
-    public Builder mergeFrom(com.google.protobuf.Message other) {
-      if (other instanceof Heartbeat) {
-        return mergeFrom((Heartbeat)other);
-      } else {
-        super.mergeFrom(other);
-        return this;
-      }
-    }
+        public static HeartbeatItem parseFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3
+                    .parseWithIOException(PARSER, input, extensionRegistry);
+        }
 
-    public Builder mergeFrom(Heartbeat other) {
-      if (other == Heartbeat.getDefaultInstance()) return this;
-      if (other.hasHeader()) {
-        mergeHeader(other.getHeader());
-      }
-      if (other.clientType_ != 0) {
-        setClientTypeValue(other.getClientTypeValue());
-      }
-      if (!other.getProducerGroup().isEmpty()) {
-        producerGroup_ = other.producerGroup_;
-        onChanged();
-      }
-      if (!other.getConsumerGroup().isEmpty()) {
-        consumerGroup_ = other.consumerGroup_;
-        onChanged();
-      }
-      if (heartbeatItemsBuilder_ == null) {
-        if (!other.heartbeatItems_.isEmpty()) {
-          if (heartbeatItems_.isEmpty()) {
-            heartbeatItems_ = other.heartbeatItems_;
-            bitField0_ = (bitField0_ & ~0x00000010);
-          } else {
-            ensureHeartbeatItemsIsMutable();
-            heartbeatItems_.addAll(other.heartbeatItems_);
-          }
-          onChanged();
-        }
-      } else {
-        if (!other.heartbeatItems_.isEmpty()) {
-          if (heartbeatItemsBuilder_.isEmpty()) {
-            heartbeatItemsBuilder_.dispose();
-            heartbeatItemsBuilder_ = null;
-            heartbeatItems_ = other.heartbeatItems_;
-            bitField0_ = (bitField0_ & ~0x00000010);
-            heartbeatItemsBuilder_ = 
-              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
-                 getHeartbeatItemsFieldBuilder() : null;
-          } else {
-            heartbeatItemsBuilder_.addAllMessages(other.heartbeatItems_);
-          }
-        }
-      }
-      this.mergeUnknownFields(other.unknownFields);
-      onChanged();
-      return this;
-    }
+        public Builder newBuilderForType() {
+            return newBuilder();
+        }
 
-    public final boolean isInitialized() {
-      return true;
-    }
+        public static Builder newBuilder() {
+            return DEFAULT_INSTANCE.toBuilder();
+        }
 
-    public Builder mergeFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      Heartbeat parsedMessage = null;
-      try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (Heartbeat) e.getUnfinishedMessage();
-        throw e.unwrapIOException();
-      } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
-      return this;
-    }
-    private int bitField0_;
+        public static Builder newBuilder(HeartbeatItem prototype) {
+            return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+        }
 
-    private RequestHeader header_ = null;
-    private com.google.protobuf.SingleFieldBuilderV3<
-        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public boolean hasHeader() {
-      return headerBuilder_ != null || header_ != null;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public RequestHeader getHeader() {
-      if (headerBuilder_ == null) {
-        return header_ == null ? RequestHeader.getDefaultInstance() : header_;
-      } else {
-        return headerBuilder_.getMessage();
-      }
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder setHeader(RequestHeader value) {
-      if (headerBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        header_ = value;
-        onChanged();
-      } else {
-        headerBuilder_.setMessage(value);
-      }
-
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder setHeader(
-        RequestHeader.Builder builderForValue) {
-      if (headerBuilder_ == null) {
-        header_ = builderForValue.build();
-        onChanged();
-      } else {
-        headerBuilder_.setMessage(builderForValue.build());
-      }
-
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder mergeHeader(RequestHeader value) {
-      if (headerBuilder_ == null) {
-        if (header_ != null) {
-          header_ =
-            RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
-        } else {
-          header_ = value;
+        public Builder toBuilder() {
+            return this == DEFAULT_INSTANCE
+                    ? new Builder() : new Builder().mergeFrom(this);
         }
-        onChanged();
-      } else {
-        headerBuilder_.mergeFrom(value);
-      }
 
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder clearHeader() {
-      if (headerBuilder_ == null) {
-        header_ = null;
-        onChanged();
-      } else {
-        header_ = null;
-        headerBuilder_ = null;
-      }
-
-      return this;
-    }
+        @Override
+        protected Builder newBuilderForType(
+                BuilderParent parent) {
+            return new Builder(parent);
+        }
+
+        /**
+         * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem}
+         */
+        public static final class Builder extends
+                com.google.protobuf.GeneratedMessageV3.Builder implements
+                // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+                HeartbeatItemOrBuilder {
+            public static final com.google.protobuf.Descriptors.Descriptor
+            getDescriptor() {
+                return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+            }
+
+            protected FieldAccessorTable
+            internalGetFieldAccessorTable() {
+                return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_fieldAccessorTable
+                        .ensureFieldAccessorsInitialized(
+                                HeartbeatItem.class, Builder.class);
+            }
+
+            // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat.HeartbeatItem.newBuilder()
+            private Builder() {
+                maybeForceBuilderInitialization();
+            }
+
+            private Builder(
+                    BuilderParent parent) {
+                super(parent);
+                maybeForceBuilderInitialization();
+            }
+
+            private void maybeForceBuilderInitialization() {
+                if (com.google.protobuf.GeneratedMessageV3
+                        .alwaysUseFieldBuilders) {
+                }
+            }
+
+            public Builder clear() {
+                super.clear();
+                topic_ = "";
+                url_ = "";
+
+                return this;
+            }
+
+            public com.google.protobuf.Descriptors.Descriptor
+            getDescriptorForType() {
+                return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_HeartbeatItem_descriptor;
+            }
+
+            public HeartbeatItem getDefaultInstanceForType() {
+                return HeartbeatItem.getDefaultInstance();
+            }
+
+            public HeartbeatItem build() {
+                HeartbeatItem result = buildPartial();
+                if (!result.isInitialized()) {
+                    throw newUninitializedMessageException(result);
+                }
+                return result;
+            }
+
+            public HeartbeatItem buildPartial() {
+                HeartbeatItem result = new HeartbeatItem(this);
+                result.topic_ = topic_;
+                result.url_ = url_;
+                onBuilt();
+                return result;
+            }
+
+            public Builder clone() {
+                return (Builder) super.clone();
+            }
+
+            public Builder setField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field,
+                    Object value) {
+                return (Builder) super.setField(field, value);
+            }
+
+            public Builder clearField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field) {
+                return (Builder) super.clearField(field);
+            }
+
+            public Builder clearOneof(
+                    com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+                return (Builder) super.clearOneof(oneof);
+            }
+
+            public Builder setRepeatedField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field,
+                    int index, Object value) {
+                return (Builder) super.setRepeatedField(field, index, value);
+            }
+
+            public Builder addRepeatedField(
+                    com.google.protobuf.Descriptors.FieldDescriptor field,
+                    Object value) {
+                return (Builder) super.addRepeatedField(field, value);
+            }
+
+            public Builder mergeFrom(com.google.protobuf.Message other) {
+                if (other instanceof HeartbeatItem) {
+                    return mergeFrom((HeartbeatItem) other);
+                } else {
+                    super.mergeFrom(other);
+                    return this;
+                }
+            }
+
+            public Builder mergeFrom(HeartbeatItem other) {
+                if (other == HeartbeatItem.getDefaultInstance()) return this;
+                if (!other.getTopic().isEmpty()) {
+                    topic_ = other.topic_;
+                    onChanged();
+                }
+                if (!other.getUrl().isEmpty()) {
+                    url_ = other.url_;
+                    onChanged();
+                }
+                this.mergeUnknownFields(other.unknownFields);
+                onChanged();
+                return this;
+            }
+
+            public final boolean isInitialized() {
+                return true;
+            }
+
+            public Builder mergeFrom(
+                    com.google.protobuf.CodedInputStream input,
+                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                    throws java.io.IOException {
+                HeartbeatItem parsedMessage = null;
+                try {
+                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    parsedMessage = (HeartbeatItem) e.getUnfinishedMessage();
+                    throw e.unwrapIOException();
+                } finally {
+                    if (parsedMessage != null) {
+                        mergeFrom(parsedMessage);
+                    }
+                }
+                return this;
+            }
+
+            private String topic_ = "";
+
+            /**
+             * string topic = 1;
+             */
+            public String getTopic() {
+                return topic_;
+            }
+
+            /**
+             * string topic = 1;
+             */
+            public com.google.protobuf.ByteString getTopicBytes() {
+                return ByteString.copyFromUtf8(topic_);
+            }
+
+            /**
+             * string topic = 1;
+             */
+            public Builder setTopic(
+                    String value) {
+                Objects.requireNonNull(value, "topic can not be null");
+
+                topic_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string topic = 1;
+             */
+            public Builder clearTopic() {
+
+                topic_ = getDefaultInstance().getTopic();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string topic = 1;
+             */
+            public Builder setTopicBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "TopicBytes can not be null");
+
+                checkByteStringIsUtf8(value);
+
+                topic_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            private String url_ = "";
+
+            /**
+             * string url = 2;
+             */
+            public String getUrl() {
+                return url_;
+            }
+
+            /**
+             * string url = 2;
+             */
+            public com.google.protobuf.ByteString getUrlBytes() {
+                return ByteString.copyFromUtf8(url_);
+            }
+
+            /**
+             * string url = 2;
+             */
+            public Builder setUrl(
+                    String value) {
+                Objects.requireNonNull(value, "url can not be null");
+
+                url_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string url = 2;
+             */
+            public Builder clearUrl() {
+
+                url_ = getDefaultInstance().getUrl();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string url = 2;
+             */
+            public Builder setUrlBytes(
+                    com.google.protobuf.ByteString value) {
+                Objects.requireNonNull(value, "UrlBytes can not be null");
+                checkByteStringIsUtf8(value);
+
+                url_ = value.toStringUtf8();
+                onChanged();
+                return this;
+            }
+
+            public final Builder setUnknownFields(
+                    final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.setUnknownFieldsProto3(unknownFields);
+            }
+
+            public final Builder mergeUnknownFields(
+                    final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.mergeUnknownFields(unknownFields);
+            }
+
+
+            // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+        }
+
+        // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem)
+        private static final HeartbeatItem DEFAULT_INSTANCE;
+
+        static {
+            DEFAULT_INSTANCE = new HeartbeatItem();
+        }
+
+        public static HeartbeatItem getDefaultInstance() {
+            return DEFAULT_INSTANCE;
+        }
+
+        private static final com.google.protobuf.Parser
+                PARSER = new com.google.protobuf.AbstractParser() {
+            public HeartbeatItem parsePartialFrom(
+                    com.google.protobuf.CodedInputStream input,
+                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                    throws com.google.protobuf.InvalidProtocolBufferException {
+                return new HeartbeatItem(input, extensionRegistry);
+            }
+        };
+
+        public static com.google.protobuf.Parser parser() {
+            return PARSER;
+        }
+
+        @Override
+        public com.google.protobuf.Parser getParserForType() {
+            return PARSER;
+        }
+
+        public HeartbeatItem getDefaultInstanceForType() {
+            return DEFAULT_INSTANCE;
+        }
+
+    }
+
+    private int bitField0_;
+    public static final int HEADER_FIELD_NUMBER = 1;
+    private RequestHeader header_;
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
-    public RequestHeader.Builder getHeaderBuilder() {
-      
-      onChanged();
-      return getHeaderFieldBuilder().getBuilder();
+    public boolean hasHeader() {
+        return header_ != null;
     }
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
-    public RequestHeaderOrBuilder getHeaderOrBuilder() {
-      if (headerBuilder_ != null) {
-        return headerBuilder_.getMessageOrBuilder();
-      } else {
-        return header_ == null ?
-            RequestHeader.getDefaultInstance() : header_;
-      }
+    public RequestHeader getHeader() {
+        return header_ == null ? RequestHeader.getDefaultInstance() : header_;
     }
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
-    private com.google.protobuf.SingleFieldBuilderV3<
-        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
-        getHeaderFieldBuilder() {
-      if (headerBuilder_ == null) {
-        headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-            RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
-                getHeader(),
-                getParentForChildren(),
-                isClean());
-        header_ = null;
-      }
-      return headerBuilder_;
+    public RequestHeaderOrBuilder getHeaderOrBuilder() {
+        return getHeader();
     }
 
-    private int clientType_ = 0;
+    public static final int CLIENTTYPE_FIELD_NUMBER = 2;
+    private int clientType_;
+
     /**
      * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
      */
     public int getClientTypeValue() {
-      return clientType_;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
-     */
-    public Builder setClientTypeValue(int value) {
-      clientType_ = value;
-      onChanged();
-      return this;
+        return clientType_;
     }
+
     /**
      * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
      */
     public ClientType getClientType() {
-      ClientType result = ClientType.valueOf(clientType_);
-      return result == null ? ClientType.UNRECOGNIZED : result;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
-     */
-    public Builder setClientType(ClientType value) {
-      if (value == null) {
-        throw new NullPointerException();
-      }
-      
-      clientType_ = value.getNumber();
-      onChanged();
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
-     */
-    public Builder clearClientType() {
-      
-      clientType_ = 0;
-      onChanged();
-      return this;
+        ClientType result = ClientType.valueOf(clientType_);
+        return result == null ? ClientType.UNRECOGNIZED : result;
     }
 
-    private Object producerGroup_ = "";
+    public static final int PRODUCERGROUP_FIELD_NUMBER = 3;
+    private volatile String producerGroup_;
+
     /**
      * string producerGroup = 3;
      */
     public String getProducerGroup() {
-      Object ref = producerGroup_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        producerGroup_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return producerGroup_;
     }
+
     /**
      * string producerGroup = 3;
      */
     public com.google.protobuf.ByteString
-        getProducerGroupBytes() {
-      Object ref = producerGroup_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        producerGroup_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string producerGroup = 3;
-     */
-    public Builder setProducerGroup(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      producerGroup_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string producerGroup = 3;
-     */
-    public Builder clearProducerGroup() {
-      
-      producerGroup_ = getDefaultInstance().getProducerGroup();
-      onChanged();
-      return this;
-    }
-    /**
-     * string producerGroup = 3;
-     */
-    public Builder setProducerGroupBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      producerGroup_ = value;
-      onChanged();
-      return this;
+    getProducerGroupBytes() {
+        return ByteString.copyFromUtf8(producerGroup_);
     }
 
-    private Object consumerGroup_ = "";
+    public static final int CONSUMERGROUP_FIELD_NUMBER = 4;
+    private volatile String consumerGroup_;
+
     /**
      * string consumerGroup = 4;
      */
     public String getConsumerGroup() {
-      Object ref = consumerGroup_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        consumerGroup_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return consumerGroup_;
     }
+
     /**
      * string consumerGroup = 4;
      */
     public com.google.protobuf.ByteString
-        getConsumerGroupBytes() {
-      Object ref = consumerGroup_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        consumerGroup_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string consumerGroup = 4;
-     */
-    public Builder setConsumerGroup(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      consumerGroup_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string consumerGroup = 4;
-     */
-    public Builder clearConsumerGroup() {
-      
-      consumerGroup_ = getDefaultInstance().getConsumerGroup();
-      onChanged();
-      return this;
+    getConsumerGroupBytes() {
+        return ByteString.copyFromUtf8(consumerGroup_);
     }
+
+    public static final int HEARTBEATITEMS_FIELD_NUMBER = 5;
+    private java.util.List heartbeatItems_;
+
     /**
-     * string consumerGroup = 4;
+     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
      */
-    public Builder setConsumerGroupBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      consumerGroup_ = value;
-      onChanged();
-      return this;
-    }
-
-    private java.util.List heartbeatItems_ =
-      java.util.Collections.emptyList();
-    private void ensureHeartbeatItemsIsMutable() {
-      if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-        heartbeatItems_ = new java.util.ArrayList(heartbeatItems_);
-        bitField0_ |= 0x00000010;
-       }
+    public java.util.List getHeartbeatItemsList() {
+        return heartbeatItems_;
     }
 
-    private com.google.protobuf.RepeatedFieldBuilderV3<
-        HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder> heartbeatItemsBuilder_;
-
     /**
      * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
      */
-    public java.util.List getHeartbeatItemsList() {
-      if (heartbeatItemsBuilder_ == null) {
-        return java.util.Collections.unmodifiableList(heartbeatItems_);
-      } else {
-        return heartbeatItemsBuilder_.getMessageList();
-      }
+    public java.util.List
+    getHeartbeatItemsOrBuilderList() {
+        return heartbeatItems_;
     }
+
     /**
      * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
      */
     public int getHeartbeatItemsCount() {
-      if (heartbeatItemsBuilder_ == null) {
         return heartbeatItems_.size();
-      } else {
-        return heartbeatItemsBuilder_.getCount();
-      }
     }
+
     /**
      * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
      */
     public HeartbeatItem getHeartbeatItems(int index) {
-      if (heartbeatItemsBuilder_ == null) {
         return heartbeatItems_.get(index);
-      } else {
-        return heartbeatItemsBuilder_.getMessage(index);
-      }
     }
+
     /**
      * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
      */
-    public Builder setHeartbeatItems(
-        int index, HeartbeatItem value) {
-      if (heartbeatItemsBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.set(index, value);
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.setMessage(index, value);
-      }
-      return this;
+    public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+            int index) {
+        return heartbeatItems_.get(index);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder setHeartbeatItems(
-        int index, HeartbeatItem.Builder builderForValue) {
-      if (heartbeatItemsBuilder_ == null) {
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.set(index, builderForValue.build());
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.setMessage(index, builderForValue.build());
-      }
-      return this;
+
+    private byte memoizedIsInitialized = -1;
+
+    public final boolean isInitialized() {
+        byte isInitialized = memoizedIsInitialized;
+        if (isInitialized == 1) return true;
+        if (isInitialized == 0) return false;
+
+        memoizedIsInitialized = 1;
+        return true;
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder addHeartbeatItems(HeartbeatItem value) {
-      if (heartbeatItemsBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.add(value);
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.addMessage(value);
-      }
-      return this;
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+            throws java.io.IOException {
+        if (header_ != null) {
+            output.writeMessage(1, getHeader());
+        }
+        if (clientType_ != ClientType.PUB.getNumber()) {
+            output.writeEnum(2, clientType_);
+        }
+        if (!getProducerGroupBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, producerGroup_);
+        }
+        if (!getConsumerGroupBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 4, consumerGroup_);
+        }
+        for (HeartbeatItem heartbeatItem : heartbeatItems_) {
+            output.writeMessage(5, heartbeatItem);
+        }
+        unknownFields.writeTo(output);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder addHeartbeatItems(
-        int index, HeartbeatItem value) {
-      if (heartbeatItemsBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.add(index, value);
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.addMessage(index, value);
-      }
-      return this;
+
+    public int getSerializedSize() {
+        int size = memoizedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (header_ != null) {
+            size += com.google.protobuf.CodedOutputStream
+                    .computeMessageSize(1, getHeader());
+        }
+        if (clientType_ != ClientType.PUB.getNumber()) {
+            size += com.google.protobuf.CodedOutputStream
+                    .computeEnumSize(2, clientType_);
+        }
+        if (!getProducerGroupBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, producerGroup_);
+        }
+        if (!getConsumerGroupBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, consumerGroup_);
+        }
+        for (HeartbeatItem heartbeatItem : heartbeatItems_) {
+            size += com.google.protobuf.CodedOutputStream
+                    .computeMessageSize(5, heartbeatItem);
+        }
+        size += unknownFields.getSerializedSize();
+        memoizedSize = size;
+        return size;
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder addHeartbeatItems(
-        HeartbeatItem.Builder builderForValue) {
-      if (heartbeatItemsBuilder_ == null) {
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.add(builderForValue.build());
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.addMessage(builderForValue.build());
-      }
-      return this;
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof Heartbeat)) {
+            return super.equals(obj);
+        }
+        Heartbeat other = (Heartbeat) obj;
+
+        return hasHeader() == other.hasHeader()
+                && hasHeader() ? getHeader().equals(other.getHeader()) : true
+                && clientType_ == other.clientType_
+                && getProducerGroup().equals(other.getProducerGroup())
+                && getConsumerGroup().equals(other.getConsumerGroup())
+                && getHeartbeatItemsList().equals(other.getHeartbeatItemsList())
+                && unknownFields.equals(other.unknownFields);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder addHeartbeatItems(
-        int index, HeartbeatItem.Builder builderForValue) {
-      if (heartbeatItemsBuilder_ == null) {
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.add(index, builderForValue.build());
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.addMessage(index, builderForValue.build());
-      }
-      return this;
+
+    @Override
+    public int hashCode() {
+        if (memoizedHashCode != 0) {
+            return memoizedHashCode;
+        }
+        int hash = 41;
+        hash = (19 * hash) + getDescriptor().hashCode();
+        if (hasHeader()) {
+            hash = (37 * hash) + HEADER_FIELD_NUMBER;
+            hash = (53 * hash) + getHeader().hashCode();
+        }
+        hash = (37 * hash) + CLIENTTYPE_FIELD_NUMBER;
+        hash = (53 * hash) + clientType_;
+        hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+        hash = (53 * hash) + getProducerGroup().hashCode();
+        hash = (37 * hash) + CONSUMERGROUP_FIELD_NUMBER;
+        hash = (53 * hash) + getConsumerGroup().hashCode();
+        if (getHeartbeatItemsCount() > 0) {
+            hash = (37 * hash) + HEARTBEATITEMS_FIELD_NUMBER;
+            hash = (53 * hash) + getHeartbeatItemsList().hashCode();
+        }
+        hash = (29 * hash) + unknownFields.hashCode();
+        memoizedHashCode = hash;
+        return hash;
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder addAllHeartbeatItems(
-        Iterable values) {
-      if (heartbeatItemsBuilder_ == null) {
-        ensureHeartbeatItemsIsMutable();
-        com.google.protobuf.AbstractMessageLite.Builder.addAll(
-            values, heartbeatItems_);
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.addAllMessages(values);
-      }
-      return this;
+
+    public static Heartbeat parseFrom(
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder clearHeartbeatItems() {
-      if (heartbeatItemsBuilder_ == null) {
-        heartbeatItems_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000010);
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.clear();
-      }
-      return this;
+
+    public static Heartbeat parseFrom(
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public Builder removeHeartbeatItems(int index) {
-      if (heartbeatItemsBuilder_ == null) {
-        ensureHeartbeatItemsIsMutable();
-        heartbeatItems_.remove(index);
-        onChanged();
-      } else {
-        heartbeatItemsBuilder_.remove(index);
-      }
-      return this;
+
+    public static Heartbeat parseFrom(
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public HeartbeatItem.Builder getHeartbeatItemsBuilder(
-        int index) {
-      return getHeartbeatItemsFieldBuilder().getBuilder(index);
+
+    public static Heartbeat parseFrom(
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
-        int index) {
-      if (heartbeatItemsBuilder_ == null) {
-        return heartbeatItems_.get(index);  } else {
-        return heartbeatItemsBuilder_.getMessageOrBuilder(index);
-      }
+
+    public static Heartbeat parseFrom(byte[] data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public java.util.List
-         getHeartbeatItemsOrBuilderList() {
-      if (heartbeatItemsBuilder_ != null) {
-        return heartbeatItemsBuilder_.getMessageOrBuilderList();
-      } else {
-        return java.util.Collections.unmodifiableList(heartbeatItems_);
-      }
+
+    public static Heartbeat parseFrom(
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public HeartbeatItem.Builder addHeartbeatItemsBuilder() {
-      return getHeartbeatItemsFieldBuilder().addBuilder(
-          HeartbeatItem.getDefaultInstance());
+
+    public static Heartbeat parseFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public HeartbeatItem.Builder addHeartbeatItemsBuilder(
-        int index) {
-      return getHeartbeatItemsFieldBuilder().addBuilder(
-          index, HeartbeatItem.getDefaultInstance());
+
+    public static Heartbeat parseFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    /**
-     * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
-     */
-    public java.util.List
-         getHeartbeatItemsBuilderList() {
-      return getHeartbeatItemsFieldBuilder().getBuilderList();
+
+    public static Heartbeat parseDelimitedFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input);
     }
-    private com.google.protobuf.RepeatedFieldBuilderV3<
-        HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>
-        getHeartbeatItemsFieldBuilder() {
-      if (heartbeatItemsBuilder_ == null) {
-        heartbeatItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-            HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>(
-                heartbeatItems_,
-                ((bitField0_ & 0x00000010) == 0x00000010),
-                getParentForChildren(),
-                isClean());
-        heartbeatItems_ = null;
-      }
-      return heartbeatItemsBuilder_;
+
+    public static Heartbeat parseDelimitedFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFieldsProto3(unknownFields);
+
+    public static Heartbeat parseFrom(
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
 
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
+    public static Heartbeat parseFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
+    public Builder newBuilderForType() {
+        return newBuilder();
+    }
 
-    // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Heartbeat)
-  }
+    public static Builder newBuilder() {
+        return DEFAULT_INSTANCE.toBuilder();
+    }
 
-  // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Heartbeat)
-  private static final Heartbeat DEFAULT_INSTANCE;
-  static {
-    DEFAULT_INSTANCE = new Heartbeat();
-  }
+    public static Builder newBuilder(Heartbeat prototype) {
+        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
 
-  public static Heartbeat getDefaultInstance() {
-    return DEFAULT_INSTANCE;
-  }
+    public Builder toBuilder() {
+        return this == DEFAULT_INSTANCE
+                ? new Builder() : new Builder().mergeFrom(this);
+    }
 
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
-    public Heartbeat parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new Heartbeat(input, extensionRegistry);
+    @Override
+    protected Builder newBuilderForType(
+            BuilderParent parent) {
+        return new Builder(parent);
     }
-  };
 
-  public static com.google.protobuf.Parser parser() {
-    return PARSER;
-  }
+    /**
+     * Protobuf type {@code eventmesh.common.protocol.grpc.Heartbeat}
+     */
+    public static final class Builder extends
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Heartbeat)
+            HeartbeatOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+        }
+
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            Heartbeat.class, Builder.class);
+        }
+
+        // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Heartbeat.newBuilder()
+        private Builder() {
+            maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+                BuilderParent parent) {
+            super(parent);
+            maybeForceBuilderInitialization();
+        }
+
+        private void maybeForceBuilderInitialization() {
+            if (com.google.protobuf.GeneratedMessageV3
+                    .alwaysUseFieldBuilders) {
+                getHeartbeatItemsFieldBuilder();
+            }
+        }
+
+        public Builder clear() {
+            super.clear();
+            if (headerBuilder_ == null) {
+                header_ = null;
+            } else {
+                header_ = null;
+                headerBuilder_ = null;
+            }
+            clientType_ = 0;
+
+            producerGroup_ = "";
+
+            consumerGroup_ = "";
+
+            if (heartbeatItemsBuilder_ == null) {
+                heartbeatItems_ = java.util.Collections.emptyList();
+                bitField0_ = (bitField0_ & ~0x00000010);
+            } else {
+                heartbeatItemsBuilder_.clear();
+            }
+            return this;
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+        getDescriptorForType() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Heartbeat_descriptor;
+        }
+
+        public Heartbeat getDefaultInstanceForType() {
+            return Heartbeat.getDefaultInstance();
+        }
+
+        public Heartbeat build() {
+            Heartbeat result = buildPartial();
+            if (!result.isInitialized()) {
+                throw newUninitializedMessageException(result);
+            }
+            return result;
+        }
 
-  @Override
-  public com.google.protobuf.Parser getParserForType() {
-    return PARSER;
-  }
+        public Heartbeat buildPartial() {
+            Heartbeat result = new Heartbeat(this);
+            int from_bitField0_ = bitField0_;
+            int to_bitField0_ = 0;
+            if (headerBuilder_ == null) {
+                result.header_ = header_;
+            } else {
+                result.header_ = headerBuilder_.build();
+            }
+            result.clientType_ = clientType_;
+            result.producerGroup_ = producerGroup_;
+            result.consumerGroup_ = consumerGroup_;
+            if (heartbeatItemsBuilder_ == null) {
+                if (((bitField0_ & 0x00000010) == 0x00000010)) {
+                    heartbeatItems_ = java.util.Collections.unmodifiableList(heartbeatItems_);
+                    bitField0_ = (bitField0_ & ~0x00000010);
+                }
+                result.heartbeatItems_ = heartbeatItems_;
+            } else {
+                result.heartbeatItems_ = heartbeatItemsBuilder_.build();
+            }
+            result.bitField0_ = to_bitField0_;
+            onBuilt();
+            return result;
+        }
+
+        public Builder clone() {
+            return (Builder) super.clone();
+        }
+
+        public Builder setField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.setField(field, value);
+        }
+
+        public Builder clearField(
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
+            return (Builder) super.clearField(field);
+        }
+
+        public Builder clearOneof(
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+            return (Builder) super.clearOneof(oneof);
+        }
+
+        public Builder setRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
+            return (Builder) super.setRepeatedField(field, index, value);
+        }
+
+        public Builder addRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.addRepeatedField(field, value);
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+            if (other instanceof Heartbeat) {
+                return mergeFrom((Heartbeat) other);
+            } else {
+                super.mergeFrom(other);
+                return this;
+            }
+        }
+
+        public Builder mergeFrom(Heartbeat other) {
+            if (other == Heartbeat.getDefaultInstance()) return this;
+            if (other.hasHeader()) {
+                mergeHeader(other.getHeader());
+            }
+            if (other.clientType_ != 0) {
+                setClientTypeValue(other.getClientTypeValue());
+            }
+            if (!other.getProducerGroup().isEmpty()) {
+                producerGroup_ = other.producerGroup_;
+                onChanged();
+            }
+            if (!other.getConsumerGroup().isEmpty()) {
+                consumerGroup_ = other.consumerGroup_;
+                onChanged();
+            }
+            if (heartbeatItemsBuilder_ == null) {
+                if (!other.heartbeatItems_.isEmpty()) {
+                    if (heartbeatItems_.isEmpty()) {
+                        heartbeatItems_ = other.heartbeatItems_;
+                        bitField0_ = (bitField0_ & ~0x00000010);
+                    } else {
+                        ensureHeartbeatItemsIsMutable();
+                        heartbeatItems_.addAll(other.heartbeatItems_);
+                    }
+                    onChanged();
+                }
+            } else {
+                if (!other.heartbeatItems_.isEmpty()) {
+                    if (heartbeatItemsBuilder_.isEmpty()) {
+                        heartbeatItemsBuilder_.dispose();
+                        heartbeatItemsBuilder_ = null;
+                        heartbeatItems_ = other.heartbeatItems_;
+                        bitField0_ = (bitField0_ & ~0x00000010);
+                        heartbeatItemsBuilder_ =
+                                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+                                        getHeartbeatItemsFieldBuilder() : null;
+                    } else {
+                        heartbeatItemsBuilder_.addAllMessages(other.heartbeatItems_);
+                    }
+                }
+            }
+            this.mergeUnknownFields(other.unknownFields);
+            onChanged();
+            return this;
+        }
+
+        public final boolean isInitialized() {
+            return true;
+        }
+
+        public Builder mergeFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            Heartbeat parsedMessage = null;
+            try {
+                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                parsedMessage = (Heartbeat) e.getUnfinishedMessage();
+                throw e.unwrapIOException();
+            } finally {
+                if (parsedMessage != null) {
+                    mergeFrom(parsedMessage);
+                }
+            }
+            return this;
+        }
+
+        private int bitField0_;
+
+        private RequestHeader header_ = null;
+        private com.google.protobuf.SingleFieldBuilderV3<
+                RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public boolean hasHeader() {
+            return headerBuilder_ != null || header_ != null;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeader getHeader() {
+            if (headerBuilder_ == null) {
+                return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+            } else {
+                return headerBuilder_.getMessage();
+            }
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder setHeader(RequestHeader value) {
+            if (headerBuilder_ == null) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                header_ = value;
+                onChanged();
+            } else {
+                headerBuilder_.setMessage(value);
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder setHeader(
+                RequestHeader.Builder builderForValue) {
+            if (headerBuilder_ == null) {
+                header_ = builderForValue.build();
+                onChanged();
+            } else {
+                headerBuilder_.setMessage(builderForValue.build());
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder mergeHeader(RequestHeader value) {
+            if (headerBuilder_ == null) {
+                if (header_ != null) {
+                    header_ =
+                            RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+                } else {
+                    header_ = value;
+                }
+                onChanged();
+            } else {
+                headerBuilder_.mergeFrom(value);
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder clearHeader() {
+            if (headerBuilder_ == null) {
+                header_ = null;
+                onChanged();
+            } else {
+                header_ = null;
+                headerBuilder_ = null;
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeader.Builder getHeaderBuilder() {
+
+            onChanged();
+            return getHeaderFieldBuilder().getBuilder();
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeaderOrBuilder getHeaderOrBuilder() {
+            if (headerBuilder_ != null) {
+                return headerBuilder_.getMessageOrBuilder();
+            } else {
+                return header_ == null ?
+                        RequestHeader.getDefaultInstance() : header_;
+            }
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        private com.google.protobuf.SingleFieldBuilderV3<
+                RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+        getHeaderFieldBuilder() {
+            if (headerBuilder_ == null) {
+                headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+                        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+                        getHeader(),
+                        getParentForChildren(),
+                        isClean());
+                header_ = null;
+            }
+            return headerBuilder_;
+        }
+
+        private int clientType_ = 0;
+
+        /**
+         * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
+         */
+        public int getClientTypeValue() {
+            return clientType_;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
+         */
+        public Builder setClientTypeValue(int value) {
+            clientType_ = value;
+            onChanged();
+            return this;
+        }
 
-  public Heartbeat getDefaultInstanceForType() {
-    return DEFAULT_INSTANCE;
-  }
+        /**
+         * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
+         */
+        public ClientType getClientType() {
+            ClientType result = ClientType.valueOf(clientType_);
+            return result == null ? ClientType.UNRECOGNIZED : result;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
+         */
+        public Builder setClientType(ClientType value) {
+            if (value == null) {
+                throw new NullPointerException();
+            }
+
+            clientType_ = value.getNumber();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.Heartbeat.ClientType clientType = 2;
+         */
+        public Builder clearClientType() {
+
+            clientType_ = 0;
+            onChanged();
+            return this;
+        }
+
+        private String producerGroup_ = "";
+
+        /**
+         * string producerGroup = 3;
+         */
+        public String getProducerGroup() {
+            return producerGroup_;
+        }
+
+        /**
+         * string producerGroup = 3;
+         */
+        public com.google.protobuf.ByteString
+        getProducerGroupBytes() {
+            return ByteString.copyFromUtf8(producerGroup_);
+        }
+
+        /**
+         * string producerGroup = 3;
+         */
+        public Builder setProducerGroup(
+                String value) {
+            Objects.requireNonNull(value, "ProducerGroup can not be null");
+
+            producerGroup_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string producerGroup = 3;
+         */
+        public Builder clearProducerGroup() {
+
+            producerGroup_ = getDefaultInstance().getProducerGroup();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string producerGroup = 3;
+         */
+        public Builder setProducerGroupBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ProducerGroupBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            producerGroup_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String consumerGroup_ = "";
+
+        /**
+         * string consumerGroup = 4;
+         */
+        public String getConsumerGroup() {
+            return consumerGroup_;
+        }
+
+        /**
+         * string consumerGroup = 4;
+         */
+        public com.google.protobuf.ByteString
+        getConsumerGroupBytes() {
+            return ByteString.copyFromUtf8(consumerGroup_);
+        }
+
+        /**
+         * string consumerGroup = 4;
+         */
+        public Builder setConsumerGroup(
+                String value) {
+            Objects.requireNonNull(value, "ConsumerGroup can not be null");
+
+            consumerGroup_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string consumerGroup = 4;
+         */
+        public Builder clearConsumerGroup() {
+
+            consumerGroup_ = getDefaultInstance().getConsumerGroup();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string consumerGroup = 4;
+         */
+        public Builder setConsumerGroupBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ConsumerGroupBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            consumerGroup_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private java.util.List heartbeatItems_ =
+                java.util.Collections.emptyList();
+
+        private void ensureHeartbeatItemsIsMutable() {
+            if (!((bitField0_ & 0x00000010) == 0x00000010)) {
+                heartbeatItems_ = new java.util.ArrayList(heartbeatItems_);
+                bitField0_ |= 0x00000010;
+            }
+        }
+
+        private com.google.protobuf.RepeatedFieldBuilderV3<
+                HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder> heartbeatItemsBuilder_;
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public java.util.List getHeartbeatItemsList() {
+            if (heartbeatItemsBuilder_ == null) {
+                return java.util.Collections.unmodifiableList(heartbeatItems_);
+            } else {
+                return heartbeatItemsBuilder_.getMessageList();
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public int getHeartbeatItemsCount() {
+            if (heartbeatItemsBuilder_ == null) {
+                return heartbeatItems_.size();
+            } else {
+                return heartbeatItemsBuilder_.getCount();
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public HeartbeatItem getHeartbeatItems(int index) {
+            if (heartbeatItemsBuilder_ == null) {
+                return heartbeatItems_.get(index);
+            } else {
+                return heartbeatItemsBuilder_.getMessage(index);
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder setHeartbeatItems(
+                int index, HeartbeatItem value) {
+            if (heartbeatItemsBuilder_ == null) {
+                Objects.requireNonNull(value, "HeartbeatItem can not be null");
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.set(index, value);
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.setMessage(index, value);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder setHeartbeatItems(
+                int index, HeartbeatItem.Builder builderForValue) {
+            if (heartbeatItemsBuilder_ == null) {
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.set(index, builderForValue.build());
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.setMessage(index, builderForValue.build());
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder addHeartbeatItems(HeartbeatItem value) {
+            if (heartbeatItemsBuilder_ == null) {
+                Objects.requireNonNull(value, "HeartbeatItem can not be null");
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.add(value);
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.addMessage(value);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder addHeartbeatItems(
+                int index, HeartbeatItem value) {
+            if (heartbeatItemsBuilder_ == null) {
+                Objects.requireNonNull(value, "HeartbeatItem can not be null");
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.add(index, value);
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.addMessage(index, value);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder addHeartbeatItems(
+                HeartbeatItem.Builder builderForValue) {
+            if (heartbeatItemsBuilder_ == null) {
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.add(builderForValue.build());
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.addMessage(builderForValue.build());
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder addHeartbeatItems(
+                int index, HeartbeatItem.Builder builderForValue) {
+            if (heartbeatItemsBuilder_ == null) {
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.add(index, builderForValue.build());
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.addMessage(index, builderForValue.build());
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder addAllHeartbeatItems(
+                Iterable values) {
+            if (heartbeatItemsBuilder_ == null) {
+                ensureHeartbeatItemsIsMutable();
+                com.google.protobuf.AbstractMessageLite.Builder.addAll(
+                        values, heartbeatItems_);
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.addAllMessages(values);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder clearHeartbeatItems() {
+            if (heartbeatItemsBuilder_ == null) {
+                heartbeatItems_ = java.util.Collections.emptyList();
+                bitField0_ = (bitField0_ & ~0x00000010);
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.clear();
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public Builder removeHeartbeatItems(int index) {
+            if (heartbeatItemsBuilder_ == null) {
+                ensureHeartbeatItemsIsMutable();
+                heartbeatItems_.remove(index);
+                onChanged();
+            } else {
+                heartbeatItemsBuilder_.remove(index);
+            }
+            return this;
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public HeartbeatItem.Builder getHeartbeatItemsBuilder(
+                int index) {
+            return getHeartbeatItemsFieldBuilder().getBuilder(index);
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public HeartbeatItemOrBuilder getHeartbeatItemsOrBuilder(
+                int index) {
+            if (heartbeatItemsBuilder_ == null) {
+                return heartbeatItems_.get(index);
+            } else {
+                return heartbeatItemsBuilder_.getMessageOrBuilder(index);
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public java.util.List
+        getHeartbeatItemsOrBuilderList() {
+            if (heartbeatItemsBuilder_ != null) {
+                return heartbeatItemsBuilder_.getMessageOrBuilderList();
+            } else {
+                return java.util.Collections.unmodifiableList(heartbeatItems_);
+            }
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public HeartbeatItem.Builder addHeartbeatItemsBuilder() {
+            return getHeartbeatItemsFieldBuilder().addBuilder(
+                    HeartbeatItem.getDefaultInstance());
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public HeartbeatItem.Builder addHeartbeatItemsBuilder(
+                int index) {
+            return getHeartbeatItemsFieldBuilder().addBuilder(
+                    index, HeartbeatItem.getDefaultInstance());
+        }
+
+        /**
+         * repeated .eventmesh.common.protocol.grpc.Heartbeat.HeartbeatItem heartbeatItems = 5;
+         */
+        public java.util.List
+        getHeartbeatItemsBuilderList() {
+            return getHeartbeatItemsFieldBuilder().getBuilderList();
+        }
+
+        private com.google.protobuf.RepeatedFieldBuilderV3<
+                HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>
+        getHeartbeatItemsFieldBuilder() {
+            if (heartbeatItemsBuilder_ == null) {
+                heartbeatItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+                        HeartbeatItem, HeartbeatItem.Builder, HeartbeatItemOrBuilder>(
+                        heartbeatItems_,
+                        ((bitField0_ & 0x00000010) == 0x00000010),
+                        getParentForChildren(),
+                        isClean());
+                heartbeatItems_ = null;
+            }
+            return heartbeatItemsBuilder_;
+        }
+
+        public final Builder setUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.setUnknownFieldsProto3(unknownFields);
+        }
+
+        public final Builder mergeUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.mergeUnknownFields(unknownFields);
+        }
+
+
+        // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Heartbeat)
+    }
+
+    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Heartbeat)
+    private static final Heartbeat DEFAULT_INSTANCE;
+
+    static {
+        DEFAULT_INSTANCE = new Heartbeat();
+    }
+
+    public static Heartbeat getDefaultInstance() {
+        return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser
+            PARSER = new com.google.protobuf.AbstractParser() {
+        public Heartbeat parsePartialFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return new Heartbeat(input, extensionRegistry);
+        }
+    };
+
+    public static com.google.protobuf.Parser parser() {
+        return PARSER;
+    }
+
+    @Override
+    public com.google.protobuf.Parser getParserForType() {
+        return PARSER;
+    }
+
+    public Heartbeat getDefaultInstanceForType() {
+        return DEFAULT_INSTANCE;
+    }
 
 }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java
index 3bd71b33e4..21b23be268 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/RequestHeader.java
@@ -20,1912 +20,1488 @@
 
 package org.apache.eventmesh.common.protocol.grpc.protos;
 
+import java.util.Objects;
+
+import com.google.protobuf.ByteString;
+
 /**
  * Protobuf type {@code eventmesh.common.protocol.grpc.RequestHeader}
  */
 @SuppressWarnings({"all"})
-public  final class RequestHeader extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.RequestHeader)
-    RequestHeaderOrBuilder {
-private static final long serialVersionUID = 0L;
-  // Use RequestHeader.newBuilder() to construct.
-  private RequestHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-    super(builder);
-  }
-  private RequestHeader() {
-    env_ = "";
-    region_ = "";
-    idc_ = "";
-    ip_ = "";
-    pid_ = "";
-    sys_ = "";
-    username_ = "";
-    password_ = "";
-    language_ = "";
-    protocolType_ = "";
-    protocolVersion_ = "";
-    protocolDesc_ = "";
-  }
-
-  @Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
-    return this.unknownFields;
-  }
-  private RequestHeader(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new NullPointerException();
-    }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          default: {
-            if (!parseUnknownFieldProto3(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
+public final class RequestHeader extends
+        com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.RequestHeader)
+        RequestHeaderOrBuilder {
+
+    private static final long serialVersionUID = 51630109646794056L;
+
+    // Use RequestHeader.newBuilder() to construct.
+    private RequestHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        super(builder);
+    }
+
+    private RequestHeader() {
+        env_ = "";
+        region_ = "";
+        idc_ = "";
+        ip_ = "";
+        pid_ = "";
+        sys_ = "";
+        username_ = "";
+        password_ = "";
+        language_ = "";
+        protocolType_ = "";
+        protocolVersion_ = "";
+        protocolDesc_ = "";
+    }
+
+    @Override
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+        return this.unknownFields;
+    }
+
+    private RequestHeader(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        this();
+        Objects.requireNonNull(input, "CodedInputStream can not be null");
+        Objects.requireNonNull(extensionRegistry, "ExtensionRegistryLite can not be null");
+
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+            boolean done = false;
+            while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                    case 0:
+                        done = true;
+                        break;
+                    default: {
+                        if (!parseUnknownFieldProto3(
+                                input, unknownFields, extensionRegistry, tag)) {
+                            done = true;
+                        }
+                        break;
+                    }
+                    case 10: {
+                        env_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 18: {
+                        region_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 26: {
+                        idc_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 34: {
+                        ip_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 42: {
+                        pid_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 50: {
+                        sys_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 58: {
+                        username_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 66: {
+                        password_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 74: {
+                        language_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 82: {
+                        protocolType_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 90: {
+                        protocolVersion_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 98: {
+                        protocolDesc_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                }
             }
-            break;
-          }
-          case 10: {
-            String s = input.readStringRequireUtf8();
-
-            env_ = s;
-            break;
-          }
-          case 18: {
-            String s = input.readStringRequireUtf8();
-
-            region_ = s;
-            break;
-          }
-          case 26: {
-            String s = input.readStringRequireUtf8();
-
-            idc_ = s;
-            break;
-          }
-          case 34: {
-            String s = input.readStringRequireUtf8();
-
-            ip_ = s;
-            break;
-          }
-          case 42: {
-            String s = input.readStringRequireUtf8();
-
-            pid_ = s;
-            break;
-          }
-          case 50: {
-            String s = input.readStringRequireUtf8();
-
-            sys_ = s;
-            break;
-          }
-          case 58: {
-            String s = input.readStringRequireUtf8();
-
-            username_ = s;
-            break;
-          }
-          case 66: {
-            String s = input.readStringRequireUtf8();
-
-            password_ = s;
-            break;
-          }
-          case 74: {
-            String s = input.readStringRequireUtf8();
-
-            language_ = s;
-            break;
-          }
-          case 82: {
-            String s = input.readStringRequireUtf8();
-
-            protocolType_ = s;
-            break;
-          }
-          case 90: {
-            String s = input.readStringRequireUtf8();
-
-            protocolVersion_ = s;
-            break;
-          }
-          case 98: {
-            String s = input.readStringRequireUtf8();
-
-            protocolDesc_ = s;
-            break;
-          }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
-  }
-
-  protected FieldAccessorTable
-      internalGetFieldAccessorTable() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable
-        .ensureFieldAccessorsInitialized(
-            RequestHeader.class, Builder.class);
-  }
-
-  public static final int ENV_FIELD_NUMBER = 1;
-  private volatile Object env_;
-  /**
-   * string env = 1;
-   */
-  public String getEnv() {
-    Object ref = env_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      env_ = s;
-      return s;
-    }
-  }
-  /**
-   * string env = 1;
-   */
-  public com.google.protobuf.ByteString
-      getEnvBytes() {
-    Object ref = env_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      env_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int REGION_FIELD_NUMBER = 2;
-  private volatile Object region_;
-  /**
-   * string region = 2;
-   */
-  public String getRegion() {
-    Object ref = region_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      region_ = s;
-      return s;
-    }
-  }
-  /**
-   * string region = 2;
-   */
-  public com.google.protobuf.ByteString
-      getRegionBytes() {
-    Object ref = region_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      region_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int IDC_FIELD_NUMBER = 3;
-  private volatile Object idc_;
-  /**
-   * string idc = 3;
-   */
-  public String getIdc() {
-    Object ref = idc_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      idc_ = s;
-      return s;
-    }
-  }
-  /**
-   * string idc = 3;
-   */
-  public com.google.protobuf.ByteString
-      getIdcBytes() {
-    Object ref = idc_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      idc_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int IP_FIELD_NUMBER = 4;
-  private volatile Object ip_;
-  /**
-   * string ip = 4;
-   */
-  public String getIp() {
-    Object ref = ip_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      ip_ = s;
-      return s;
-    }
-  }
-  /**
-   * string ip = 4;
-   */
-  public com.google.protobuf.ByteString
-      getIpBytes() {
-    Object ref = ip_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      ip_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int PID_FIELD_NUMBER = 5;
-  private volatile Object pid_;
-  /**
-   * string pid = 5;
-   */
-  public String getPid() {
-    Object ref = pid_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      pid_ = s;
-      return s;
-    }
-  }
-  /**
-   * string pid = 5;
-   */
-  public com.google.protobuf.ByteString
-      getPidBytes() {
-    Object ref = pid_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      pid_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int SYS_FIELD_NUMBER = 6;
-  private volatile Object sys_;
-  /**
-   * string sys = 6;
-   */
-  public String getSys() {
-    Object ref = sys_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      sys_ = s;
-      return s;
-    }
-  }
-  /**
-   * string sys = 6;
-   */
-  public com.google.protobuf.ByteString
-      getSysBytes() {
-    Object ref = sys_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      sys_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int USERNAME_FIELD_NUMBER = 7;
-  private volatile Object username_;
-  /**
-   * string username = 7;
-   */
-  public String getUsername() {
-    Object ref = username_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      username_ = s;
-      return s;
-    }
-  }
-  /**
-   * string username = 7;
-   */
-  public com.google.protobuf.ByteString
-      getUsernameBytes() {
-    Object ref = username_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      username_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int PASSWORD_FIELD_NUMBER = 8;
-  private volatile Object password_;
-  /**
-   * string password = 8;
-   */
-  public String getPassword() {
-    Object ref = password_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      password_ = s;
-      return s;
-    }
-  }
-  /**
-   * string password = 8;
-   */
-  public com.google.protobuf.ByteString
-      getPasswordBytes() {
-    Object ref = password_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      password_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int LANGUAGE_FIELD_NUMBER = 9;
-  private volatile Object language_;
-  /**
-   * string language = 9;
-   */
-  public String getLanguage() {
-    Object ref = language_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      language_ = s;
-      return s;
-    }
-  }
-  /**
-   * string language = 9;
-   */
-  public com.google.protobuf.ByteString
-      getLanguageBytes() {
-    Object ref = language_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      language_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int PROTOCOLTYPE_FIELD_NUMBER = 10;
-  private volatile Object protocolType_;
-  /**
-   * string protocolType = 10;
-   */
-  public String getProtocolType() {
-    Object ref = protocolType_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      protocolType_ = s;
-      return s;
-    }
-  }
-  /**
-   * string protocolType = 10;
-   */
-  public com.google.protobuf.ByteString
-      getProtocolTypeBytes() {
-    Object ref = protocolType_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      protocolType_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int PROTOCOLVERSION_FIELD_NUMBER = 11;
-  private volatile Object protocolVersion_;
-  /**
-   * string protocolVersion = 11;
-   */
-  public String getProtocolVersion() {
-    Object ref = protocolVersion_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      protocolVersion_ = s;
-      return s;
-    }
-  }
-  /**
-   * string protocolVersion = 11;
-   */
-  public com.google.protobuf.ByteString
-      getProtocolVersionBytes() {
-    Object ref = protocolVersion_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      protocolVersion_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int PROTOCOLDESC_FIELD_NUMBER = 12;
-  private volatile Object protocolDesc_;
-  /**
-   * string protocolDesc = 12;
-   */
-  public String getProtocolDesc() {
-    Object ref = protocolDesc_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      protocolDesc_ = s;
-      return s;
-    }
-  }
-  /**
-   * string protocolDesc = 12;
-   */
-  public com.google.protobuf.ByteString
-      getProtocolDescBytes() {
-    Object ref = protocolDesc_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      protocolDesc_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  private byte memoizedIsInitialized = -1;
-  public final boolean isInitialized() {
-    byte isInitialized = memoizedIsInitialized;
-    if (isInitialized == 1) return true;
-    if (isInitialized == 0) return false;
-
-    memoizedIsInitialized = 1;
-    return true;
-  }
-
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
-    if (!getEnvBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, env_);
-    }
-    if (!getRegionBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_);
-    }
-    if (!getIdcBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idc_);
-    }
-    if (!getIpBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_);
-    }
-    if (!getPidBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pid_);
-    }
-    if (!getSysBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sys_);
-    }
-    if (!getUsernameBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, username_);
-    }
-    if (!getPasswordBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, password_);
-    }
-    if (!getLanguageBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, language_);
-    }
-    if (!getProtocolTypeBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, protocolType_);
-    }
-    if (!getProtocolVersionBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, protocolVersion_);
-    }
-    if (!getProtocolDescBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, protocolDesc_);
-    }
-    unknownFields.writeTo(output);
-  }
-
-  public int getSerializedSize() {
-    int size = memoizedSize;
-    if (size != -1) return size;
-
-    size = 0;
-    if (!getEnvBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, env_);
-    }
-    if (!getRegionBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_);
-    }
-    if (!getIdcBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idc_);
-    }
-    if (!getIpBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_);
-    }
-    if (!getPidBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pid_);
-    }
-    if (!getSysBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sys_);
-    }
-    if (!getUsernameBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, username_);
-    }
-    if (!getPasswordBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, password_);
-    }
-    if (!getLanguageBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, language_);
-    }
-    if (!getProtocolTypeBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, protocolType_);
-    }
-    if (!getProtocolVersionBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, protocolVersion_);
-    }
-    if (!getProtocolDescBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, protocolDesc_);
-    }
-    size += unknownFields.getSerializedSize();
-    memoizedSize = size;
-    return size;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == this) {
-     return true;
-    }
-    if (!(obj instanceof RequestHeader)) {
-      return super.equals(obj);
-    }
-    RequestHeader other = (RequestHeader) obj;
-
-    boolean result = true;
-    result = result && getEnv()
-        .equals(other.getEnv());
-    result = result && getRegion()
-        .equals(other.getRegion());
-    result = result && getIdc()
-        .equals(other.getIdc());
-    result = result && getIp()
-        .equals(other.getIp());
-    result = result && getPid()
-        .equals(other.getPid());
-    result = result && getSys()
-        .equals(other.getSys());
-    result = result && getUsername()
-        .equals(other.getUsername());
-    result = result && getPassword()
-        .equals(other.getPassword());
-    result = result && getLanguage()
-        .equals(other.getLanguage());
-    result = result && getProtocolType()
-        .equals(other.getProtocolType());
-    result = result && getProtocolVersion()
-        .equals(other.getProtocolVersion());
-    result = result && getProtocolDesc()
-        .equals(other.getProtocolDesc());
-    result = result && unknownFields.equals(other.unknownFields);
-    return result;
-  }
-
-  @Override
-  public int hashCode() {
-    if (memoizedHashCode != 0) {
-      return memoizedHashCode;
-    }
-    int hash = 41;
-    hash = (19 * hash) + getDescriptor().hashCode();
-    hash = (37 * hash) + ENV_FIELD_NUMBER;
-    hash = (53 * hash) + getEnv().hashCode();
-    hash = (37 * hash) + REGION_FIELD_NUMBER;
-    hash = (53 * hash) + getRegion().hashCode();
-    hash = (37 * hash) + IDC_FIELD_NUMBER;
-    hash = (53 * hash) + getIdc().hashCode();
-    hash = (37 * hash) + IP_FIELD_NUMBER;
-    hash = (53 * hash) + getIp().hashCode();
-    hash = (37 * hash) + PID_FIELD_NUMBER;
-    hash = (53 * hash) + getPid().hashCode();
-    hash = (37 * hash) + SYS_FIELD_NUMBER;
-    hash = (53 * hash) + getSys().hashCode();
-    hash = (37 * hash) + USERNAME_FIELD_NUMBER;
-    hash = (53 * hash) + getUsername().hashCode();
-    hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
-    hash = (53 * hash) + getPassword().hashCode();
-    hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
-    hash = (53 * hash) + getLanguage().hashCode();
-    hash = (37 * hash) + PROTOCOLTYPE_FIELD_NUMBER;
-    hash = (53 * hash) + getProtocolType().hashCode();
-    hash = (37 * hash) + PROTOCOLVERSION_FIELD_NUMBER;
-    hash = (53 * hash) + getProtocolVersion().hashCode();
-    hash = (37 * hash) + PROTOCOLDESC_FIELD_NUMBER;
-    hash = (53 * hash) + getProtocolDesc().hashCode();
-    hash = (29 * hash) + unknownFields.hashCode();
-    memoizedHashCode = hash;
-    return hash;
-  }
-
-  public static RequestHeader parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static RequestHeader parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static RequestHeader parseFrom(
-      com.google.protobuf.ByteString data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static RequestHeader parseFrom(
-      com.google.protobuf.ByteString data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static RequestHeader parseFrom(byte[] data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static RequestHeader parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static RequestHeader parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static RequestHeader parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static RequestHeader parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
-  }
-  public static RequestHeader parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static RequestHeader parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static RequestHeader parseFrom(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-
-  public Builder newBuilderForType() { return newBuilder(); }
-  public static Builder newBuilder() {
-    return DEFAULT_INSTANCE.toBuilder();
-  }
-  public static Builder newBuilder(RequestHeader prototype) {
-    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-  }
-  public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
-  }
-
-  @Override
-  protected Builder newBuilderForType(
-      BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.RequestHeader}
-   */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
-      // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.RequestHeader)
-      RequestHeaderOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
-    }
-
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              RequestHeader.class, Builder.class);
-    }
-
-    // Construct using org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
-
-    private Builder(
-        BuilderParent parent) {
-      super(parent);
-      maybeForceBuilderInitialization();
-    }
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
-    }
-    public Builder clear() {
-      super.clear();
-      env_ = "";
-
-      region_ = "";
-
-      idc_ = "";
-
-      ip_ = "";
-
-      pid_ = "";
-
-      sys_ = "";
-
-      username_ = "";
-
-      password_ = "";
-
-      language_ = "";
-
-      protocolType_ = "";
-
-      protocolVersion_ = "";
-
-      protocolDesc_ = "";
-
-      return this;
-    }
-
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
-    }
-
-    public RequestHeader getDefaultInstanceForType() {
-      return RequestHeader.getDefaultInstance();
-    }
-
-    public RequestHeader build() {
-      RequestHeader result = buildPartial();
-      if (!result.isInitialized()) {
-        throw newUninitializedMessageException(result);
-      }
-      return result;
-    }
-
-    public RequestHeader buildPartial() {
-      RequestHeader result = new RequestHeader(this);
-      result.env_ = env_;
-      result.region_ = region_;
-      result.idc_ = idc_;
-      result.ip_ = ip_;
-      result.pid_ = pid_;
-      result.sys_ = sys_;
-      result.username_ = username_;
-      result.password_ = password_;
-      result.language_ = language_;
-      result.protocolType_ = protocolType_;
-      result.protocolVersion_ = protocolVersion_;
-      result.protocolDesc_ = protocolDesc_;
-      onBuilt();
-      return result;
-    }
-
-    public Builder clone() {
-      return (Builder) super.clone();
-    }
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.setField(field, value);
-    }
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return (Builder) super.clearField(field);
-    }
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return (Builder) super.clearOneof(oneof);
-    }
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, Object value) {
-      return (Builder) super.setRepeatedField(field, index, value);
-    }
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.addRepeatedField(field, value);
-    }
-    public Builder mergeFrom(com.google.protobuf.Message other) {
-      if (other instanceof RequestHeader) {
-        return mergeFrom((RequestHeader)other);
-      } else {
-        super.mergeFrom(other);
-        return this;
-      }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(
+                    e).setUnfinishedMessage(this);
+        } finally {
+            this.unknownFields = unknownFields.build();
+            makeExtensionsImmutable();
+        }
     }
 
-    public Builder mergeFrom(RequestHeader other) {
-      if (other == RequestHeader.getDefaultInstance()) return this;
-      if (!other.getEnv().isEmpty()) {
-        env_ = other.env_;
-        onChanged();
-      }
-      if (!other.getRegion().isEmpty()) {
-        region_ = other.region_;
-        onChanged();
-      }
-      if (!other.getIdc().isEmpty()) {
-        idc_ = other.idc_;
-        onChanged();
-      }
-      if (!other.getIp().isEmpty()) {
-        ip_ = other.ip_;
-        onChanged();
-      }
-      if (!other.getPid().isEmpty()) {
-        pid_ = other.pid_;
-        onChanged();
-      }
-      if (!other.getSys().isEmpty()) {
-        sys_ = other.sys_;
-        onChanged();
-      }
-      if (!other.getUsername().isEmpty()) {
-        username_ = other.username_;
-        onChanged();
-      }
-      if (!other.getPassword().isEmpty()) {
-        password_ = other.password_;
-        onChanged();
-      }
-      if (!other.getLanguage().isEmpty()) {
-        language_ = other.language_;
-        onChanged();
-      }
-      if (!other.getProtocolType().isEmpty()) {
-        protocolType_ = other.protocolType_;
-        onChanged();
-      }
-      if (!other.getProtocolVersion().isEmpty()) {
-        protocolVersion_ = other.protocolVersion_;
-        onChanged();
-      }
-      if (!other.getProtocolDesc().isEmpty()) {
-        protocolDesc_ = other.protocolDesc_;
-        onChanged();
-      }
-      this.mergeUnknownFields(other.unknownFields);
-      onChanged();
-      return this;
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
     }
 
-    public final boolean isInitialized() {
-      return true;
+    protected FieldAccessorTable internalGetFieldAccessorTable() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable
+                .ensureFieldAccessorsInitialized(
+                        RequestHeader.class, Builder.class);
     }
 
-    public Builder mergeFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      RequestHeader parsedMessage = null;
-      try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (RequestHeader) e.getUnfinishedMessage();
-        throw e.unwrapIOException();
-      } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
-      return this;
-    }
+    public static final int ENV_FIELD_NUMBER = 1;
+    private volatile String env_;
 
-    private Object env_ = "";
     /**
      * string env = 1;
      */
     public String getEnv() {
-      Object ref = env_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        env_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string env = 1;
-     */
-    public com.google.protobuf.ByteString
-        getEnvBytes() {
-      Object ref = env_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        env_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string env = 1;
-     */
-    public Builder setEnv(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      env_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string env = 1;
-     */
-    public Builder clearEnv() {
-      
-      env_ = getDefaultInstance().getEnv();
-      onChanged();
-      return this;
+        return env_;
     }
+
     /**
      * string env = 1;
      */
-    public Builder setEnvBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      env_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getEnvBytes() {
+        return ByteString.copyFromUtf8(env_);
     }
 
-    private Object region_ = "";
+    public static final int REGION_FIELD_NUMBER = 2;
+    private volatile String region_;
+
     /**
      * string region = 2;
      */
     public String getRegion() {
-      Object ref = region_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        region_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string region = 2;
-     */
-    public com.google.protobuf.ByteString
-        getRegionBytes() {
-      Object ref = region_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        region_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string region = 2;
-     */
-    public Builder setRegion(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      region_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string region = 2;
-     */
-    public Builder clearRegion() {
-      
-      region_ = getDefaultInstance().getRegion();
-      onChanged();
-      return this;
+        return region_;
     }
+
     /**
      * string region = 2;
      */
-    public Builder setRegionBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      region_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getRegionBytes() {
+        return ByteString.copyFromUtf8(region_);
     }
 
-    private Object idc_ = "";
+    public static final int IDC_FIELD_NUMBER = 3;
+    private volatile String idc_;
+
     /**
      * string idc = 3;
      */
     public String getIdc() {
-      Object ref = idc_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        idc_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string idc = 3;
-     */
-    public com.google.protobuf.ByteString
-        getIdcBytes() {
-      Object ref = idc_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        idc_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string idc = 3;
-     */
-    public Builder setIdc(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      idc_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string idc = 3;
-     */
-    public Builder clearIdc() {
-      
-      idc_ = getDefaultInstance().getIdc();
-      onChanged();
-      return this;
+        return idc_;
     }
+
     /**
      * string idc = 3;
      */
-    public Builder setIdcBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      idc_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getIdcBytes() {
+        return ByteString.copyFromUtf8(idc_);
     }
 
-    private Object ip_ = "";
+    public static final int IP_FIELD_NUMBER = 4;
+    private volatile String ip_;
+
     /**
      * string ip = 4;
      */
     public String getIp() {
-      Object ref = ip_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        ip_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string ip = 4;
-     */
-    public com.google.protobuf.ByteString
-        getIpBytes() {
-      Object ref = ip_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        ip_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string ip = 4;
-     */
-    public Builder setIp(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      ip_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string ip = 4;
-     */
-    public Builder clearIp() {
-      
-      ip_ = getDefaultInstance().getIp();
-      onChanged();
-      return this;
+        return ip_;
     }
+
     /**
      * string ip = 4;
      */
-    public Builder setIpBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      ip_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getIpBytes() {
+        return ByteString.copyFromUtf8(ip_);
     }
 
-    private Object pid_ = "";
+    public static final int PID_FIELD_NUMBER = 5;
+    private volatile String pid_;
+
     /**
      * string pid = 5;
      */
     public String getPid() {
-      Object ref = pid_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        pid_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string pid = 5;
-     */
-    public com.google.protobuf.ByteString
-        getPidBytes() {
-      Object ref = pid_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        pid_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string pid = 5;
-     */
-    public Builder setPid(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      pid_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string pid = 5;
-     */
-    public Builder clearPid() {
-      
-      pid_ = getDefaultInstance().getPid();
-      onChanged();
-      return this;
+        return pid_;
     }
+
     /**
      * string pid = 5;
      */
-    public Builder setPidBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      pid_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getPidBytes() {
+        return ByteString.copyFromUtf8(pid_);
     }
 
-    private Object sys_ = "";
+    public static final int SYS_FIELD_NUMBER = 6;
+    private volatile String sys_;
+
     /**
      * string sys = 6;
      */
     public String getSys() {
-      Object ref = sys_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        sys_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string sys = 6;
-     */
-    public com.google.protobuf.ByteString
-        getSysBytes() {
-      Object ref = sys_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        sys_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string sys = 6;
-     */
-    public Builder setSys(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      sys_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string sys = 6;
-     */
-    public Builder clearSys() {
-      
-      sys_ = getDefaultInstance().getSys();
-      onChanged();
-      return this;
+        return sys_;
     }
+
     /**
      * string sys = 6;
      */
-    public Builder setSysBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      sys_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getSysBytes() {
+        return ByteString.copyFromUtf8(sys_);
     }
 
-    private Object username_ = "";
+    public static final int USERNAME_FIELD_NUMBER = 7;
+    private volatile String username_;
+
     /**
      * string username = 7;
      */
     public String getUsername() {
-      Object ref = username_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        username_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string username = 7;
-     */
-    public com.google.protobuf.ByteString
-        getUsernameBytes() {
-      Object ref = username_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        username_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string username = 7;
-     */
-    public Builder setUsername(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      username_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string username = 7;
-     */
-    public Builder clearUsername() {
-      
-      username_ = getDefaultInstance().getUsername();
-      onChanged();
-      return this;
+        return username_;
     }
+
     /**
      * string username = 7;
      */
-    public Builder setUsernameBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      username_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getUsernameBytes() {
+        return ByteString.copyFromUtf8(username_);
     }
 
-    private Object password_ = "";
+    public static final int PASSWORD_FIELD_NUMBER = 8;
+    private volatile String password_;
+
     /**
      * string password = 8;
      */
     public String getPassword() {
-      Object ref = password_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        password_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return password_;
     }
+
     /**
      * string password = 8;
      */
     public com.google.protobuf.ByteString
-        getPasswordBytes() {
-      Object ref = password_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        password_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string password = 8;
-     */
-    public Builder setPassword(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      password_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string password = 8;
-     */
-    public Builder clearPassword() {
-      
-      password_ = getDefaultInstance().getPassword();
-      onChanged();
-      return this;
-    }
-    /**
-     * string password = 8;
-     */
-    public Builder setPasswordBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      password_ = value;
-      onChanged();
-      return this;
+    getPasswordBytes() {
+        return ByteString.copyFromUtf8(password_);
     }
 
-    private Object language_ = "";
+    public static final int LANGUAGE_FIELD_NUMBER = 9;
+    private volatile String language_;
+
     /**
      * string language = 9;
      */
     public String getLanguage() {
-      Object ref = language_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        language_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string language = 9;
-     */
-    public com.google.protobuf.ByteString
-        getLanguageBytes() {
-      Object ref = language_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        language_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string language = 9;
-     */
-    public Builder setLanguage(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      language_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string language = 9;
-     */
-    public Builder clearLanguage() {
-      
-      language_ = getDefaultInstance().getLanguage();
-      onChanged();
-      return this;
+        return language_;
     }
+
     /**
      * string language = 9;
      */
-    public Builder setLanguageBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      language_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getLanguageBytes() {
+        return ByteString.copyFromUtf8(language_);
     }
 
-    private Object protocolType_ = "";
+    public static final int PROTOCOLTYPE_FIELD_NUMBER = 10;
+    private volatile String protocolType_;
+
     /**
      * string protocolType = 10;
      */
     public String getProtocolType() {
-      Object ref = protocolType_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        protocolType_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return protocolType_;
     }
+
     /**
      * string protocolType = 10;
      */
     public com.google.protobuf.ByteString
-        getProtocolTypeBytes() {
-      Object ref = protocolType_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        protocolType_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+    getProtocolTypeBytes() {
+        return ByteString.copyFromUtf8(protocolType_);
     }
+
+    public static final int PROTOCOLVERSION_FIELD_NUMBER = 11;
+    private volatile String protocolVersion_;
+
     /**
-     * string protocolType = 10;
+     * string protocolVersion = 11;
      */
-    public Builder setProtocolType(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      protocolType_ = value;
-      onChanged();
-      return this;
+    public String getProtocolVersion() {
+        return protocolVersion_;
     }
+
     /**
-     * string protocolType = 10;
+     * string protocolVersion = 11;
      */
-    public Builder clearProtocolType() {
-      
-      protocolType_ = getDefaultInstance().getProtocolType();
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getProtocolVersionBytes() {
+        return ByteString.copyFromUtf8(protocolVersion_);
     }
+
+    public static final int PROTOCOLDESC_FIELD_NUMBER = 12;
+    private volatile String protocolDesc_;
+
     /**
-     * string protocolType = 10;
+     * string protocolDesc = 12;
      */
-    public Builder setProtocolTypeBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      protocolType_ = value;
-      onChanged();
-      return this;
+    public String getProtocolDesc() {
+        return protocolDesc_;
     }
 
-    private Object protocolVersion_ = "";
     /**
-     * string protocolVersion = 11;
+     * string protocolDesc = 12;
      */
-    public String getProtocolVersion() {
-      Object ref = protocolVersion_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        protocolVersion_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+    public com.google.protobuf.ByteString getProtocolDescBytes() {
+        return ByteString.copyFromUtf8(protocolDesc_);
     }
-    /**
-     * string protocolVersion = 11;
-     */
-    public com.google.protobuf.ByteString
-        getProtocolVersionBytes() {
-      Object ref = protocolVersion_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        protocolVersion_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+
+    private byte memoizedIsInitialized = -1;
+
+    public final boolean isInitialized() {
+        if (memoizedIsInitialized == 1) return true;
+        if (memoizedIsInitialized == 0) return false;
+
+        memoizedIsInitialized = 1;
+        return true;
     }
-    /**
-     * string protocolVersion = 11;
-     */
-    public Builder setProtocolVersion(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      protocolVersion_ = value;
-      onChanged();
-      return this;
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+            throws java.io.IOException {
+        if (!getEnvBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, env_);
+        }
+        if (!getRegionBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_);
+        }
+        if (!getIdcBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idc_);
+        }
+        if (!getIpBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_);
+        }
+        if (!getPidBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pid_);
+        }
+        if (!getSysBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sys_);
+        }
+        if (!getUsernameBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 7, username_);
+        }
+        if (!getPasswordBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 8, password_);
+        }
+        if (!getLanguageBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 9, language_);
+        }
+        if (!getProtocolTypeBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 10, protocolType_);
+        }
+        if (!getProtocolVersionBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 11, protocolVersion_);
+        }
+        if (!getProtocolDescBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 12, protocolDesc_);
+        }
+        unknownFields.writeTo(output);
     }
-    /**
-     * string protocolVersion = 11;
-     */
-    public Builder clearProtocolVersion() {
-      
-      protocolVersion_ = getDefaultInstance().getProtocolVersion();
-      onChanged();
-      return this;
+
+    public int getSerializedSize() {
+        int size = memoizedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (!getEnvBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, env_);
+        }
+        if (!getRegionBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_);
+        }
+        if (!getIdcBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idc_);
+        }
+        if (!getIpBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_);
+        }
+        if (!getPidBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pid_);
+        }
+        if (!getSysBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sys_);
+        }
+        if (!getUsernameBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, username_);
+        }
+        if (!getPasswordBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, password_);
+        }
+        if (!getLanguageBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, language_);
+        }
+        if (!getProtocolTypeBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, protocolType_);
+        }
+        if (!getProtocolVersionBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, protocolVersion_);
+        }
+        if (!getProtocolDescBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, protocolDesc_);
+        }
+        size += unknownFields.getSerializedSize();
+        memoizedSize = size;
+        return size;
     }
-    /**
-     * string protocolVersion = 11;
-     */
-    public Builder setProtocolVersionBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      protocolVersion_ = value;
-      onChanged();
-      return this;
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof RequestHeader)) {
+            return super.equals(obj);
+        }
+        RequestHeader other = (RequestHeader) obj;
+
+        return getEnv().equals(other.getEnv())
+                && getRegion().equals(other.getRegion())
+                && getIdc().equals(other.getIdc())
+                && getIp().equals(other.getIp())
+                && getPid().equals(other.getPid())
+                && getSys().equals(other.getSys())
+                && getUsername().equals(other.getUsername())
+                && getPassword().equals(other.getPassword())
+                && getLanguage().equals(other.getLanguage())
+                && getProtocolType().equals(other.getProtocolType())
+                && getProtocolVersion().equals(other.getProtocolVersion())
+                && getProtocolDesc().equals(other.getProtocolDesc())
+                && unknownFields.equals(other.unknownFields);
+    }
+
+    @Override
+    public int hashCode() {
+        if (memoizedHashCode != 0) {
+            return memoizedHashCode;
+        }
+        int hash = 41;
+        hash = (19 * hash) + getDescriptor().hashCode();
+        hash = (37 * hash) + ENV_FIELD_NUMBER;
+        hash = (53 * hash) + getEnv().hashCode();
+        hash = (37 * hash) + REGION_FIELD_NUMBER;
+        hash = (53 * hash) + getRegion().hashCode();
+        hash = (37 * hash) + IDC_FIELD_NUMBER;
+        hash = (53 * hash) + getIdc().hashCode();
+        hash = (37 * hash) + IP_FIELD_NUMBER;
+        hash = (53 * hash) + getIp().hashCode();
+        hash = (37 * hash) + PID_FIELD_NUMBER;
+        hash = (53 * hash) + getPid().hashCode();
+        hash = (37 * hash) + SYS_FIELD_NUMBER;
+        hash = (53 * hash) + getSys().hashCode();
+        hash = (37 * hash) + USERNAME_FIELD_NUMBER;
+        hash = (53 * hash) + getUsername().hashCode();
+        hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
+        hash = (53 * hash) + getPassword().hashCode();
+        hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
+        hash = (53 * hash) + getLanguage().hashCode();
+        hash = (37 * hash) + PROTOCOLTYPE_FIELD_NUMBER;
+        hash = (53 * hash) + getProtocolType().hashCode();
+        hash = (37 * hash) + PROTOCOLVERSION_FIELD_NUMBER;
+        hash = (53 * hash) + getProtocolVersion().hashCode();
+        hash = (37 * hash) + PROTOCOLDESC_FIELD_NUMBER;
+        hash = (53 * hash) + getProtocolDesc().hashCode();
+        hash = (29 * hash) + unknownFields.hashCode();
+        memoizedHashCode = hash;
+        return hash;
     }
 
-    private Object protocolDesc_ = "";
-    /**
-     * string protocolDesc = 12;
-     */
-    public String getProtocolDesc() {
-      Object ref = protocolDesc_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        protocolDesc_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+    public static RequestHeader parseFrom(
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * string protocolDesc = 12;
-     */
-    public com.google.protobuf.ByteString
-        getProtocolDescBytes() {
-      Object ref = protocolDesc_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        protocolDesc_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+
+    public static RequestHeader parseFrom(
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * string protocolDesc = 12;
-     */
-    public Builder setProtocolDesc(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      protocolDesc_ = value;
-      onChanged();
-      return this;
+
+    public static RequestHeader parseFrom(
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * string protocolDesc = 12;
-     */
-    public Builder clearProtocolDesc() {
-      
-      protocolDesc_ = getDefaultInstance().getProtocolDesc();
-      onChanged();
-      return this;
+
+    public static RequestHeader parseFrom(
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * string protocolDesc = 12;
-     */
-    public Builder setProtocolDescBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      protocolDesc_ = value;
-      onChanged();
-      return this;
+
+    public static RequestHeader parseFrom(byte[] data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFieldsProto3(unknownFields);
+
+    public static RequestHeader parseFrom(
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
 
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
+    public static RequestHeader parseFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
 
+    public static RequestHeader parseFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
+    }
 
-    // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.RequestHeader)
-  }
+    public static RequestHeader parseDelimitedFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input);
+    }
 
-  // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.RequestHeader)
-  private static final RequestHeader DEFAULT_INSTANCE;
-  static {
-    DEFAULT_INSTANCE = new RequestHeader();
-  }
+    public static RequestHeader parseDelimitedFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
 
-  public static RequestHeader getDefaultInstance() {
-    return DEFAULT_INSTANCE;
-  }
+    public static RequestHeader parseFrom(
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
+    }
 
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
-    public RequestHeader parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new RequestHeader(input, extensionRegistry);
+    public static RequestHeader parseFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
-  };
 
-  public static com.google.protobuf.Parser parser() {
-    return PARSER;
-  }
+    public Builder newBuilderForType() {
+        return newBuilder();
+    }
 
-  @Override
-  public com.google.protobuf.Parser getParserForType() {
-    return PARSER;
-  }
+    public static Builder newBuilder() {
+        return DEFAULT_INSTANCE.toBuilder();
+    }
 
-  public RequestHeader getDefaultInstanceForType() {
-    return DEFAULT_INSTANCE;
-  }
+    public static Builder newBuilder(RequestHeader prototype) {
+        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+
+    public Builder toBuilder() {
+        return this == DEFAULT_INSTANCE
+                ? new Builder() : new Builder().mergeFrom(this);
+    }
+
+    @Override
+    protected Builder newBuilderForType(BuilderParent parent) {
+        return new Builder(parent);
+    }
+
+    /**
+     * Protobuf type {@code eventmesh.common.protocol.grpc.RequestHeader}
+     */
+    public static final class Builder extends
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.RequestHeader)
+            RequestHeaderOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
+        }
+
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            RequestHeader.class, Builder.class);
+        }
+
+        // Construct using org.apache.eventmesh.common.protocol.grpc.protos.RequestHeader.newBuilder()
+        private Builder() {
+            maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+                BuilderParent parent) {
+            super(parent);
+            maybeForceBuilderInitialization();
+        }
+
+        private void maybeForceBuilderInitialization() {
+            if (com.google.protobuf.GeneratedMessageV3
+                    .alwaysUseFieldBuilders) {
+            }
+        }
+
+        public Builder clear() {
+            super.clear();
+            env_ = "";
+
+            region_ = "";
+
+            idc_ = "";
+
+            ip_ = "";
+
+            pid_ = "";
+
+            sys_ = "";
+
+            username_ = "";
+
+            password_ = "";
+
+            language_ = "";
+
+            protocolType_ = "";
+
+            protocolVersion_ = "";
+
+            protocolDesc_ = "";
+
+            return this;
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+        getDescriptorForType() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_RequestHeader_descriptor;
+        }
+
+        public RequestHeader getDefaultInstanceForType() {
+            return RequestHeader.getDefaultInstance();
+        }
+
+        public RequestHeader build() {
+            RequestHeader result = buildPartial();
+            if (!result.isInitialized()) {
+                throw newUninitializedMessageException(result);
+            }
+            return result;
+        }
+
+        public RequestHeader buildPartial() {
+            RequestHeader result = new RequestHeader(this);
+            result.env_ = env_;
+            result.region_ = region_;
+            result.idc_ = idc_;
+            result.ip_ = ip_;
+            result.pid_ = pid_;
+            result.sys_ = sys_;
+            result.username_ = username_;
+            result.password_ = password_;
+            result.language_ = language_;
+            result.protocolType_ = protocolType_;
+            result.protocolVersion_ = protocolVersion_;
+            result.protocolDesc_ = protocolDesc_;
+            onBuilt();
+            return result;
+        }
+
+        public Builder clone() {
+            return (Builder) super.clone();
+        }
+
+        public Builder setField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.setField(field, value);
+        }
+
+        public Builder clearField(
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
+            return (Builder) super.clearField(field);
+        }
+
+        public Builder clearOneof(
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+            return (Builder) super.clearOneof(oneof);
+        }
+
+        public Builder setRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
+            return (Builder) super.setRepeatedField(field, index, value);
+        }
+
+        public Builder addRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.addRepeatedField(field, value);
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+            if (other instanceof RequestHeader) {
+                return mergeFrom((RequestHeader) other);
+            } else {
+                super.mergeFrom(other);
+                return this;
+            }
+        }
+
+        public Builder mergeFrom(RequestHeader other) {
+            if (other == RequestHeader.getDefaultInstance()) return this;
+            if (!other.getEnv().isEmpty()) {
+                env_ = other.env_;
+                onChanged();
+            }
+            if (!other.getRegion().isEmpty()) {
+                region_ = other.region_;
+                onChanged();
+            }
+            if (!other.getIdc().isEmpty()) {
+                idc_ = other.idc_;
+                onChanged();
+            }
+            if (!other.getIp().isEmpty()) {
+                ip_ = other.ip_;
+                onChanged();
+            }
+            if (!other.getPid().isEmpty()) {
+                pid_ = other.pid_;
+                onChanged();
+            }
+            if (!other.getSys().isEmpty()) {
+                sys_ = other.sys_;
+                onChanged();
+            }
+            if (!other.getUsername().isEmpty()) {
+                username_ = other.username_;
+                onChanged();
+            }
+            if (!other.getPassword().isEmpty()) {
+                password_ = other.password_;
+                onChanged();
+            }
+            if (!other.getLanguage().isEmpty()) {
+                language_ = other.language_;
+                onChanged();
+            }
+            if (!other.getProtocolType().isEmpty()) {
+                protocolType_ = other.protocolType_;
+                onChanged();
+            }
+            if (!other.getProtocolVersion().isEmpty()) {
+                protocolVersion_ = other.protocolVersion_;
+                onChanged();
+            }
+            if (!other.getProtocolDesc().isEmpty()) {
+                protocolDesc_ = other.protocolDesc_;
+                onChanged();
+            }
+            this.mergeUnknownFields(other.unknownFields);
+            onChanged();
+            return this;
+        }
+
+        public final boolean isInitialized() {
+            return true;
+        }
+
+        public Builder mergeFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            RequestHeader parsedMessage = null;
+            try {
+                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                parsedMessage = (RequestHeader) e.getUnfinishedMessage();
+                throw e.unwrapIOException();
+            } finally {
+                if (parsedMessage != null) {
+                    mergeFrom(parsedMessage);
+                }
+            }
+            return this;
+        }
+
+        private String env_ = "";
+
+        /**
+         * string env = 1;
+         */
+        public String getEnv() {
+            return env_;
+        }
+
+        /**
+         * string env = 1;
+         */
+        public com.google.protobuf.ByteString getEnvBytes() {
+            return ByteString.copyFromUtf8(env_);
+        }
+
+        /**
+         * string env = 1;
+         */
+        public Builder setEnv(String value) {
+            Objects.requireNonNull(value, "Env can not be null");
+
+            env_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string env = 1;
+         */
+        public Builder clearEnv() {
+            env_ = getDefaultInstance().getEnv();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string env = 1;
+         */
+        public Builder setEnvBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "EnvBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            env_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String region_ = "";
+
+        /**
+         * string region = 2;
+         */
+        public String getRegion() {
+            return region_;
+        }
+
+        /**
+         * string region = 2;
+         */
+        public com.google.protobuf.ByteString getRegionBytes() {
+            return ByteString.copyFromUtf8(region_);
+        }
+
+        /**
+         * string region = 2;
+         */
+        public Builder setRegion(
+                String value) {
+            Objects.requireNonNull(value, "Region can not be null");
+
+            region_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string region = 2;
+         */
+        public Builder clearRegion() {
+
+            region_ = getDefaultInstance().getRegion();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string region = 2;
+         */
+        public Builder setRegionBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "RegionBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            region_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String idc_ = "";
+
+        /**
+         * string idc = 3;
+         */
+        public String getIdc() {
+            return idc_;
+        }
+
+        /**
+         * string idc = 3;
+         */
+        public com.google.protobuf.ByteString getIdcBytes() {
+            return ByteString.copyFromUtf8(idc_);
+        }
+
+        /**
+         * string idc = 3;
+         */
+        public Builder setIdc(String value) {
+            Objects.requireNonNull(value, "Idc can not be null");
+
+            idc_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string idc = 3;
+         */
+        public Builder clearIdc() {
+
+            idc_ = getDefaultInstance().getIdc();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string idc = 3;
+         */
+        public Builder setIdcBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "IdcBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            idc_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String ip_ = "";
+
+        /**
+         * string ip = 4;
+         */
+        public String getIp() {
+            return ip_;
+        }
+
+        /**
+         * string ip = 4;
+         */
+        public com.google.protobuf.ByteString getIpBytes() {
+            return ByteString.copyFromUtf8(ip_);
+        }
+
+        /**
+         * string ip = 4;
+         */
+        public Builder setIp(String value) {
+            Objects.requireNonNull(value, "Ip can not be null");
+
+            ip_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string ip = 4;
+         */
+        public Builder clearIp() {
+
+            ip_ = getDefaultInstance().getIp();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string ip = 4;
+         */
+        public Builder setIpBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "IpBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            ip_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String pid_ = "";
+
+        /**
+         * string pid = 5;
+         */
+        public String getPid() {
+            return pid_;
+        }
+
+        /**
+         * string pid = 5;
+         */
+        public com.google.protobuf.ByteString getPidBytes() {
+            return ByteString.copyFromUtf8(pid_);
+        }
+
+        /**
+         * string pid = 5;
+         */
+        public Builder setPid(
+                String value) {
+            Objects.requireNonNull(value, "Pid can not be null");
+
+            pid_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string pid = 5;
+         */
+        public Builder clearPid() {
+
+            pid_ = getDefaultInstance().getPid();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string pid = 5;
+         */
+        public Builder setPidBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "PidBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            pid_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String sys_ = "";
+
+        /**
+         * string sys = 6;
+         */
+        public String getSys() {
+            return sys_;
+        }
+
+        /**
+         * string sys = 6;
+         */
+        public com.google.protobuf.ByteString getSysBytes() {
+            return ByteString.copyFromUtf8(sys_);
+        }
+
+        /**
+         * string sys = 6;
+         */
+        public Builder setSys(
+                String value) {
+            Objects.requireNonNull(value, "Sys can not be null");
+
+            sys_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string sys = 6;
+         */
+        public Builder clearSys() {
+
+            sys_ = getDefaultInstance().getSys();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string sys = 6;
+         */
+        public Builder setSysBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "SysBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            sys_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String username_ = "";
+
+        /**
+         * string username = 7;
+         */
+        public String getUsername() {
+            return username_;
+        }
+
+        /**
+         * string username = 7;
+         */
+        public com.google.protobuf.ByteString
+        getUsernameBytes() {
+            return ByteString.copyFromUtf8(username_);
+        }
+
+        /**
+         * string username = 7;
+         */
+        public Builder setUsername(
+                String value) {
+            Objects.requireNonNull(value, "Username can not be null");
+
+            username_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string username = 7;
+         */
+        public Builder clearUsername() {
+
+            username_ = getDefaultInstance().getUsername();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string username = 7;
+         */
+        public Builder setUsernameBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "UsernameBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            username_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String password_ = "";
+
+        /**
+         * string password = 8;
+         */
+        public String getPassword() {
+            return password_;
+
+        }
+
+        /**
+         * string password = 8;
+         */
+        public com.google.protobuf.ByteString getPasswordBytes() {
+            return ByteString.copyFromUtf8(password_);
+        }
+
+        /**
+         * string password = 8;
+         */
+        public Builder setPassword(
+                String value) {
+            Objects.requireNonNull(value, "Password can not be null");
+
+            password_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string password = 8;
+         */
+        public Builder clearPassword() {
+
+            password_ = getDefaultInstance().getPassword();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string password = 8;
+         */
+        public Builder setPasswordBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "PasswordBytes can not be null");
+
+            checkByteStringIsUtf8(value);
+
+            password_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String language_ = "";
+
+        /**
+         * string language = 9;
+         */
+        public String getLanguage() {
+            return language_;
+        }
+
+        /**
+         * string language = 9;
+         */
+        public com.google.protobuf.ByteString
+        getLanguageBytes() {
+            return ByteString.copyFromUtf8(language_);
+        }
+
+        /**
+         * string language = 9;
+         */
+        public Builder setLanguage(
+                String value) {
+            Objects.requireNonNull(value, "Language can not be null");
+
+            language_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string language = 9;
+         */
+        public Builder clearLanguage() {
+
+            language_ = getDefaultInstance().getLanguage();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string language = 9;
+         */
+        public Builder setLanguageBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "LanguageBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            language_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String protocolType_ = "";
+
+        /**
+         * string protocolType = 10;
+         */
+        public String getProtocolType() {
+            return protocolType_;
+        }
+
+        /**
+         * string protocolType = 10;
+         */
+        public com.google.protobuf.ByteString
+        getProtocolTypeBytes() {
+            return ByteString.copyFromUtf8(protocolType_);
+        }
+
+        /**
+         * string protocolType = 10;
+         */
+        public Builder setProtocolType(
+                String value) {
+            Objects.requireNonNull(value, "ProtocolType can not be null");
+
+            protocolType_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string protocolType = 10;
+         */
+        public Builder clearProtocolType() {
+
+            protocolType_ = getDefaultInstance().getProtocolType();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string protocolType = 10;
+         */
+        public Builder setProtocolTypeBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ProtocolTypeBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            protocolType_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String protocolVersion_ = "";
+
+        /**
+         * string protocolVersion = 11;
+         */
+        public String getProtocolVersion() {
+            return protocolVersion_;
+        }
+
+        /**
+         * string protocolVersion = 11;
+         */
+        public com.google.protobuf.ByteString
+        getProtocolVersionBytes() {
+            return ByteString.copyFromUtf8(protocolVersion_);
+        }
+
+        /**
+         * string protocolVersion = 11;
+         */
+        public Builder setProtocolVersion(
+                String value) {
+            Objects.requireNonNull(value, "ProtocolVersion can not be null");
+
+            protocolVersion_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string protocolVersion = 11;
+         */
+        public Builder clearProtocolVersion() {
+
+            protocolVersion_ = getDefaultInstance().getProtocolVersion();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string protocolVersion = 11;
+         */
+        public Builder setProtocolVersionBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ProtocolVersionBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            protocolVersion_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String protocolDesc_ = "";
+
+        /**
+         * string protocolDesc = 12;
+         */
+        public String getProtocolDesc() {
+            return protocolDesc_;
+        }
+
+        /**
+         * string protocolDesc = 12;
+         */
+        public com.google.protobuf.ByteString getProtocolDescBytes() {
+            return ByteString.copyFromUtf8(protocolDesc_);
+        }
+
+        /**
+         * string protocolDesc = 12;
+         */
+        public Builder setProtocolDesc(
+                String value) {
+            Objects.requireNonNull(value, "ProtocolDesc can not be null");
+
+            protocolDesc_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string protocolDesc = 12;
+         */
+        public Builder clearProtocolDesc() {
+
+            protocolDesc_ = getDefaultInstance().getProtocolDesc();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string protocolDesc = 12;
+         */
+        public Builder setProtocolDescBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ProtocolDescBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            protocolDesc_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        public final Builder setUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.setUnknownFieldsProto3(unknownFields);
+        }
+
+        public final Builder mergeUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.mergeUnknownFields(unknownFields);
+        }
+
+
+        // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.RequestHeader)
+    }
+
+    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.RequestHeader)
+    private static final RequestHeader DEFAULT_INSTANCE;
+
+    static {
+        DEFAULT_INSTANCE = new RequestHeader();
+    }
+
+    public static RequestHeader getDefaultInstance() {
+        return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser
+            PARSER = new com.google.protobuf.AbstractParser() {
+        public RequestHeader parsePartialFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return new RequestHeader(input, extensionRegistry);
+        }
+    };
+
+    public static com.google.protobuf.Parser parser() {
+        return PARSER;
+    }
+
+    @Override
+    public com.google.protobuf.Parser getParserForType() {
+        return PARSER;
+    }
+
+    public RequestHeader getDefaultInstanceForType() {
+        return DEFAULT_INSTANCE;
+    }
 
 }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Response.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Response.java
index c8a1f79dec..e5d810663d 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Response.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Response.java
@@ -20,769 +20,682 @@
 
 package org.apache.eventmesh.common.protocol.grpc.protos;
 
+import java.util.Objects;
+
+import com.google.protobuf.ByteString;
+
 /**
  * Protobuf type {@code eventmesh.common.protocol.grpc.Response}
  */
 @SuppressWarnings({"all"})
-public  final class Response extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Response)
-    ResponseOrBuilder {
-private static final long serialVersionUID = 0L;
-  // Use Response.newBuilder() to construct.
-  private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-    super(builder);
-  }
-  private Response() {
-    respCode_ = "";
-    respMsg_ = "";
-    respTime_ = "";
-  }
-
-  @Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
-    return this.unknownFields;
-  }
-  private Response(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new NullPointerException();
-    }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          default: {
-            if (!parseUnknownFieldProto3(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
+public final class Response extends com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.Response)
+        ResponseOrBuilder {
+    private static final long serialVersionUID = -6326489945644944331L;
+
+    // Use Response.newBuilder() to construct.
+    private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        super(builder);
+    }
+
+    private Response() {
+        respCode_ = "";
+        respMsg_ = "";
+        respTime_ = "";
+    }
+
+    @Override
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+        return this.unknownFields;
+    }
+
+    private Response(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        this();
+        Objects.requireNonNull(input,"CodedInputStream can not be null");
+        Objects.requireNonNull(extensionRegistry,"ExtensionRegistryLite can not be null");
+
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+            boolean done = false;
+            while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                    case 0:
+                        done = true;
+                        break;
+                    default: {
+                        if (!parseUnknownFieldProto3(
+                                input, unknownFields, extensionRegistry, tag)) {
+                            done = true;
+                        }
+                        break;
+                    }
+                    case 10: {
+                        respCode_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 18: {
+                        respMsg_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 26: {
+                        respTime_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                }
             }
-            break;
-          }
-          case 10: {
-            String s = input.readStringRequireUtf8();
-
-            respCode_ = s;
-            break;
-          }
-          case 18: {
-            String s = input.readStringRequireUtf8();
-
-            respMsg_ = s;
-            break;
-          }
-          case 26: {
-            String s = input.readStringRequireUtf8();
-
-            respTime_ = s;
-            break;
-          }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
-  }
-
-  protected FieldAccessorTable
-      internalGetFieldAccessorTable() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_fieldAccessorTable
-        .ensureFieldAccessorsInitialized(
-            Response.class, Builder.class);
-  }
-
-  public static final int RESPCODE_FIELD_NUMBER = 1;
-  private volatile Object respCode_;
-  /**
-   * string respCode = 1;
-   */
-  public String getRespCode() {
-    Object ref = respCode_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      respCode_ = s;
-      return s;
-    }
-  }
-  /**
-   * string respCode = 1;
-   */
-  public com.google.protobuf.ByteString
-      getRespCodeBytes() {
-    Object ref = respCode_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      respCode_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int RESPMSG_FIELD_NUMBER = 2;
-  private volatile Object respMsg_;
-  /**
-   * string respMsg = 2;
-   */
-  public String getRespMsg() {
-    Object ref = respMsg_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      respMsg_ = s;
-      return s;
-    }
-  }
-  /**
-   * string respMsg = 2;
-   */
-  public com.google.protobuf.ByteString
-      getRespMsgBytes() {
-    Object ref = respMsg_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      respMsg_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int RESPTIME_FIELD_NUMBER = 3;
-  private volatile Object respTime_;
-  /**
-   * string respTime = 3;
-   */
-  public String getRespTime() {
-    Object ref = respTime_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      respTime_ = s;
-      return s;
-    }
-  }
-  /**
-   * string respTime = 3;
-   */
-  public com.google.protobuf.ByteString
-      getRespTimeBytes() {
-    Object ref = respTime_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      respTime_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  private byte memoizedIsInitialized = -1;
-  public final boolean isInitialized() {
-    byte isInitialized = memoizedIsInitialized;
-    if (isInitialized == 1) return true;
-    if (isInitialized == 0) return false;
-
-    memoizedIsInitialized = 1;
-    return true;
-  }
-
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
-    if (!getRespCodeBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, respCode_);
-    }
-    if (!getRespMsgBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, respMsg_);
-    }
-    if (!getRespTimeBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, respTime_);
-    }
-    unknownFields.writeTo(output);
-  }
-
-  public int getSerializedSize() {
-    int size = memoizedSize;
-    if (size != -1) return size;
-
-    size = 0;
-    if (!getRespCodeBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, respCode_);
-    }
-    if (!getRespMsgBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, respMsg_);
-    }
-    if (!getRespTimeBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, respTime_);
-    }
-    size += unknownFields.getSerializedSize();
-    memoizedSize = size;
-    return size;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == this) {
-     return true;
-    }
-    if (!(obj instanceof Response)) {
-      return super.equals(obj);
-    }
-    Response other = (Response) obj;
-
-    boolean result = true;
-    result = result && getRespCode()
-        .equals(other.getRespCode());
-    result = result && getRespMsg()
-        .equals(other.getRespMsg());
-    result = result && getRespTime()
-        .equals(other.getRespTime());
-    result = result && unknownFields.equals(other.unknownFields);
-    return result;
-  }
-
-  @Override
-  public int hashCode() {
-    if (memoizedHashCode != 0) {
-      return memoizedHashCode;
-    }
-    int hash = 41;
-    hash = (19 * hash) + getDescriptor().hashCode();
-    hash = (37 * hash) + RESPCODE_FIELD_NUMBER;
-    hash = (53 * hash) + getRespCode().hashCode();
-    hash = (37 * hash) + RESPMSG_FIELD_NUMBER;
-    hash = (53 * hash) + getRespMsg().hashCode();
-    hash = (37 * hash) + RESPTIME_FIELD_NUMBER;
-    hash = (53 * hash) + getRespTime().hashCode();
-    hash = (29 * hash) + unknownFields.hashCode();
-    memoizedHashCode = hash;
-    return hash;
-  }
-
-  public static Response parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static Response parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static Response parseFrom(
-      com.google.protobuf.ByteString data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static Response parseFrom(
-      com.google.protobuf.ByteString data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static Response parseFrom(byte[] data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static Response parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static Response parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static Response parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static Response parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
-  }
-  public static Response parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static Response parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static Response parseFrom(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-
-  public Builder newBuilderForType() { return newBuilder(); }
-  public static Builder newBuilder() {
-    return DEFAULT_INSTANCE.toBuilder();
-  }
-  public static Builder newBuilder(Response prototype) {
-    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-  }
-  public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
-  }
-
-  @Override
-  protected Builder newBuilderForType(
-      BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.Response}
-   */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
-      // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Response)
-      ResponseOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
-    }
-
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              Response.class, Builder.class);
-    }
-
-    // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Response.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
-
-    private Builder(
-        BuilderParent parent) {
-      super(parent);
-      maybeForceBuilderInitialization();
-    }
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
-    }
-    public Builder clear() {
-      super.clear();
-      respCode_ = "";
-
-      respMsg_ = "";
-
-      respTime_ = "";
-
-      return this;
-    }
-
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(
+                    e).setUnfinishedMessage(this);
+        } finally {
+            this.unknownFields = unknownFields.build();
+            makeExtensionsImmutable();
+        }
     }
 
-    public Response getDefaultInstanceForType() {
-      return Response.getDefaultInstance();
-    }
-
-    public Response build() {
-      Response result = buildPartial();
-      if (!result.isInitialized()) {
-        throw newUninitializedMessageException(result);
-      }
-      return result;
-    }
-
-    public Response buildPartial() {
-      Response result = new Response(this);
-      result.respCode_ = respCode_;
-      result.respMsg_ = respMsg_;
-      result.respTime_ = respTime_;
-      onBuilt();
-      return result;
-    }
-
-    public Builder clone() {
-      return (Builder) super.clone();
-    }
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.setField(field, value);
-    }
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return (Builder) super.clearField(field);
-    }
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return (Builder) super.clearOneof(oneof);
-    }
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, Object value) {
-      return (Builder) super.setRepeatedField(field, index, value);
-    }
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.addRepeatedField(field, value);
-    }
-    public Builder mergeFrom(com.google.protobuf.Message other) {
-      if (other instanceof Response) {
-        return mergeFrom((Response)other);
-      } else {
-        super.mergeFrom(other);
-        return this;
-      }
-    }
-
-    public Builder mergeFrom(Response other) {
-      if (other == Response.getDefaultInstance()) return this;
-      if (!other.getRespCode().isEmpty()) {
-        respCode_ = other.respCode_;
-        onChanged();
-      }
-      if (!other.getRespMsg().isEmpty()) {
-        respMsg_ = other.respMsg_;
-        onChanged();
-      }
-      if (!other.getRespTime().isEmpty()) {
-        respTime_ = other.respTime_;
-        onChanged();
-      }
-      this.mergeUnknownFields(other.unknownFields);
-      onChanged();
-      return this;
+    public static final com.google.protobuf.Descriptors.Descriptor
+    getDescriptor() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
     }
 
-    public final boolean isInitialized() {
-      return true;
+    protected FieldAccessorTable
+    internalGetFieldAccessorTable() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_fieldAccessorTable
+                .ensureFieldAccessorsInitialized(
+                        Response.class, Builder.class);
     }
 
-    public Builder mergeFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      Response parsedMessage = null;
-      try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (Response) e.getUnfinishedMessage();
-        throw e.unwrapIOException();
-      } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
-      return this;
-    }
+    public static final int RESPCODE_FIELD_NUMBER = 1;
+    private volatile String respCode_;
 
-    private Object respCode_ = "";
     /**
      * string respCode = 1;
      */
     public String getRespCode() {
-      Object ref = respCode_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        respCode_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string respCode = 1;
-     */
-    public com.google.protobuf.ByteString
-        getRespCodeBytes() {
-      Object ref = respCode_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        respCode_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string respCode = 1;
-     */
-    public Builder setRespCode(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      respCode_ = value;
-      onChanged();
-      return this;
+        return respCode_;
     }
+
     /**
      * string respCode = 1;
      */
-    public Builder clearRespCode() {
-      
-      respCode_ = getDefaultInstance().getRespCode();
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getRespCodeBytes() {
+        return ByteString.copyFromUtf8(respCode_);
     }
-    /**
-     * string respCode = 1;
-     */
-    public Builder setRespCodeBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      respCode_ = value;
-      onChanged();
-      return this;
-    }
-
-    private Object respMsg_ = "";
+
+    public static final int RESPMSG_FIELD_NUMBER = 2;
+    private volatile String respMsg_;
+
     /**
      * string respMsg = 2;
      */
     public String getRespMsg() {
-      Object ref = respMsg_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        respMsg_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string respMsg = 2;
-     */
-    public com.google.protobuf.ByteString
-        getRespMsgBytes() {
-      Object ref = respMsg_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        respMsg_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string respMsg = 2;
-     */
-    public Builder setRespMsg(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      respMsg_ = value;
-      onChanged();
-      return this;
+        return respMsg_;
     }
+
     /**
      * string respMsg = 2;
      */
-    public Builder clearRespMsg() {
-      
-      respMsg_ = getDefaultInstance().getRespMsg();
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString getRespMsgBytes() {
+        return ByteString.copyFromUtf8(respMsg_);
     }
-    /**
-     * string respMsg = 2;
-     */
-    public Builder setRespMsgBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      respMsg_ = value;
-      onChanged();
-      return this;
-    }
-
-    private Object respTime_ = "";
+
+    public static final int RESPTIME_FIELD_NUMBER = 3;
+    private volatile String respTime_;
+
     /**
      * string respTime = 3;
      */
     public String getRespTime() {
-      Object ref = respTime_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        respTime_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        return respTime_;
     }
+
     /**
      * string respTime = 3;
      */
-    public com.google.protobuf.ByteString
-        getRespTimeBytes() {
-      Object ref = respTime_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        respTime_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+    public com.google.protobuf.ByteString getRespTimeBytes() {
+        return ByteString.copyFromUtf8(respTime_);
     }
-    /**
-     * string respTime = 3;
-     */
-    public Builder setRespTime(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      respTime_ = value;
-      onChanged();
-      return this;
+
+    private byte memoizedIsInitialized = -1;
+
+    public final boolean isInitialized() {
+        if (memoizedIsInitialized == 1) return true;
+        if (memoizedIsInitialized == 0) return false;
+
+        memoizedIsInitialized = 1;
+        return true;
     }
-    /**
-     * string respTime = 3;
-     */
-    public Builder clearRespTime() {
-      
-      respTime_ = getDefaultInstance().getRespTime();
-      onChanged();
-      return this;
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+            throws java.io.IOException {
+        if (!getRespCodeBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, respCode_);
+        }
+        if (!getRespMsgBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, respMsg_);
+        }
+        if (!getRespTimeBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, respTime_);
+        }
+        unknownFields.writeTo(output);
+    }
+
+    public int getSerializedSize() {
+        int size = memoizedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (!getRespCodeBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, respCode_);
+        }
+        if (!getRespMsgBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, respMsg_);
+        }
+        if (!getRespTimeBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, respTime_);
+        }
+        size += unknownFields.getSerializedSize();
+        memoizedSize = size;
+        return size;
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof Response)) {
+            return super.equals(obj);
+        }
+        Response other = (Response) obj;
+
+        return getRespCode().equals(other.getRespCode())
+                && getRespMsg().equals(other.getRespMsg())
+                && getRespTime().equals(other.getRespTime())
+                && unknownFields.equals(other.unknownFields);
+    }
+
+    @Override
+    public int hashCode() {
+        if (memoizedHashCode != 0) {
+            return memoizedHashCode;
+        }
+        int hash = 41;
+        hash = (19 * hash) + getDescriptor().hashCode();
+        hash = (37 * hash) + RESPCODE_FIELD_NUMBER;
+        hash = (53 * hash) + getRespCode().hashCode();
+        hash = (37 * hash) + RESPMSG_FIELD_NUMBER;
+        hash = (53 * hash) + getRespMsg().hashCode();
+        hash = (37 * hash) + RESPTIME_FIELD_NUMBER;
+        hash = (53 * hash) + getRespTime().hashCode();
+        hash = (29 * hash) + unknownFields.hashCode();
+        memoizedHashCode = hash;
+        return hash;
+    }
+
+    public static Response parseFrom(
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+    }
+
+    public static Response parseFrom(
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+    }
+
+    public static Response parseFrom(
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+    }
+
+    public static Response parseFrom(
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+    }
+
+    public static Response parseFrom(byte[] data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+    }
+
+    public static Response parseFrom(
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+    }
+
+    public static Response parseFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
+    }
+
+    public static Response parseFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public static Response parseDelimitedFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input);
+    }
+
+    public static Response parseDelimitedFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public static Response parseFrom(
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
+    }
+
+    public static Response parseFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public Builder newBuilderForType() {
+        return newBuilder();
+    }
+
+    public static Builder newBuilder() {
+        return DEFAULT_INSTANCE.toBuilder();
+    }
+
+    public static Builder newBuilder(Response prototype) {
+        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+
+    public Builder toBuilder() {
+        return this == DEFAULT_INSTANCE
+                ? new Builder() : new Builder().mergeFrom(this);
     }
+
+    @Override
+    protected Builder newBuilderForType(BuilderParent parent) {
+        return new Builder(parent);
+    }
+
     /**
-     * string respTime = 3;
+     * Protobuf type {@code eventmesh.common.protocol.grpc.Response}
      */
-    public Builder setRespTimeBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      respTime_ = value;
-      onChanged();
-      return this;
-    }
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFieldsProto3(unknownFields);
-    }
-
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
-    }
-
-
-    // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Response)
-  }
-
-  // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Response)
-  private static final Response DEFAULT_INSTANCE;
-  static {
-    DEFAULT_INSTANCE = new Response();
-  }
-
-  public static Response getDefaultInstance() {
-    return DEFAULT_INSTANCE;
-  }
-
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
-    public Response parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new Response(input, extensionRegistry);
-    }
-  };
-
-  public static com.google.protobuf.Parser parser() {
-    return PARSER;
-  }
-
-  @Override
-  public com.google.protobuf.Parser getParserForType() {
-    return PARSER;
-  }
-
-  public Response getDefaultInstanceForType() {
-    return DEFAULT_INSTANCE;
-  }
+    public static final class Builder extends
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.Response)
+            ResponseOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
+        }
+
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            Response.class, Builder.class);
+        }
+
+        // Construct using org.apache.eventmesh.common.protocol.grpc.protos.Response.newBuilder()
+        private Builder() {
+            maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+                BuilderParent parent) {
+            super(parent);
+            maybeForceBuilderInitialization();
+        }
+
+        private void maybeForceBuilderInitialization() {
+            if (com.google.protobuf.GeneratedMessageV3
+                    .alwaysUseFieldBuilders) {
+            }
+        }
+
+        public Builder clear() {
+            super.clear();
+            respCode_ = "";
+
+            respMsg_ = "";
+
+            respTime_ = "";
+
+            return this;
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+        getDescriptorForType() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_Response_descriptor;
+        }
+
+        public Response getDefaultInstanceForType() {
+            return Response.getDefaultInstance();
+        }
+
+        public Response build() {
+            Response result = buildPartial();
+            if (!result.isInitialized()) {
+                throw newUninitializedMessageException(result);
+            }
+            return result;
+        }
+
+        public Response buildPartial() {
+            Response result = new Response(this);
+            result.respCode_ = respCode_;
+            result.respMsg_ = respMsg_;
+            result.respTime_ = respTime_;
+            onBuilt();
+            return result;
+        }
+
+        public Builder clone() {
+            return (Builder) super.clone();
+        }
+
+        public Builder setField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.setField(field, value);
+        }
+
+        public Builder clearField(
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
+            return (Builder) super.clearField(field);
+        }
+
+        public Builder clearOneof(
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+            return (Builder) super.clearOneof(oneof);
+        }
+
+        public Builder setRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
+            return (Builder) super.setRepeatedField(field, index, value);
+        }
+
+        public Builder addRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.addRepeatedField(field, value);
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+            if (other instanceof Response) {
+                return mergeFrom((Response) other);
+            } else {
+                super.mergeFrom(other);
+                return this;
+            }
+        }
+
+        public Builder mergeFrom(Response other) {
+            if (other == Response.getDefaultInstance()) return this;
+            if (!other.getRespCode().isEmpty()) {
+                respCode_ = other.respCode_;
+                onChanged();
+            }
+            if (!other.getRespMsg().isEmpty()) {
+                respMsg_ = other.respMsg_;
+                onChanged();
+            }
+            if (!other.getRespTime().isEmpty()) {
+                respTime_ = other.respTime_;
+                onChanged();
+            }
+            this.mergeUnknownFields(other.unknownFields);
+            onChanged();
+            return this;
+        }
+
+        public final boolean isInitialized() {
+            return true;
+        }
+
+        public Builder mergeFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            Response parsedMessage = null;
+            try {
+                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                parsedMessage = (Response) e.getUnfinishedMessage();
+                throw e.unwrapIOException();
+            } finally {
+                if (parsedMessage != null) {
+                    mergeFrom(parsedMessage);
+                }
+            }
+            return this;
+        }
+
+        private String respCode_ = "";
+
+        /**
+         * string respCode = 1;
+         */
+        public String getRespCode() {
+            return respCode_;
+        }
+
+        /**
+         * string respCode = 1;
+         */
+        public com.google.protobuf.ByteString
+        getRespCodeBytes() {
+            return ByteString.copyFromUtf8(respCode_);
+        }
+
+        /**
+         * string respCode = 1;
+         */
+        public Builder setRespCode(String value) {
+            Objects.requireNonNull(value,"RespCode can not be null");
+
+            respCode_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string respCode = 1;
+         */
+        public Builder clearRespCode() {
+            respCode_ = getDefaultInstance().getRespCode();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string respCode = 1;
+         */
+        public Builder setRespCodeBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value,"RespCodeBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            respCode_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String respMsg_ = "";
+
+        /**
+         * string respMsg = 2;
+         */
+        public String getRespMsg() {
+            return respMsg_;
+        }
+
+        /**
+         * string respMsg = 2;
+         */
+        public com.google.protobuf.ByteString getRespMsgBytes() {
+            return ByteString.copyFromUtf8(respMsg_);
+        }
+
+        /**
+         * string respMsg = 2;
+         */
+        public Builder setRespMsg(String value) {
+            Objects.requireNonNull(value,"RespMsg can not be null");
+
+            respMsg_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string respMsg = 2;
+         */
+        public Builder clearRespMsg() {
+
+            respMsg_ = getDefaultInstance().getRespMsg();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string respMsg = 2;
+         */
+        public Builder setRespMsgBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value,"RespMsgBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            respMsg_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        private String respTime_ = "";
+
+        /**
+         * string respTime = 3;
+         */
+        public String getRespTime() {
+            return respTime_;
+        }
+
+        /**
+         * string respTime = 3;
+         */
+        public com.google.protobuf.ByteString getRespTimeBytes() {
+            return ByteString.copyFromUtf8(respTime_);
+        }
+
+        /**
+         * string respTime = 3;
+         */
+        public Builder setRespTime(
+                String value) {
+            Objects.requireNonNull(value,"RespTime can not be null");
+
+            respTime_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string respTime = 3;
+         */
+        public Builder clearRespTime() {
+
+            respTime_ = getDefaultInstance().getRespTime();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string respTime = 3;
+         */
+        public Builder setRespTimeBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value,"RespTimeBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            respTime_ = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        public final Builder setUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.setUnknownFieldsProto3(unknownFields);
+        }
+
+        public final Builder mergeUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.mergeUnknownFields(unknownFields);
+        }
+
+
+        // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.Response)
+    }
+
+    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.Response)
+    private static final Response DEFAULT_INSTANCE;
+
+    static {
+        DEFAULT_INSTANCE = new Response();
+    }
+
+    public static Response getDefaultInstance() {
+        return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser
+            PARSER = new com.google.protobuf.AbstractParser() {
+        public Response parsePartialFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws com.google.protobuf.InvalidProtocolBufferException {
+            return new Response(input, extensionRegistry);
+        }
+    };
+
+    public static com.google.protobuf.Parser parser() {
+        return PARSER;
+    }
+
+    @Override
+    public com.google.protobuf.Parser getParserForType() {
+        return PARSER;
+    }
+
+    public Response getDefaultInstanceForType() {
+        return DEFAULT_INSTANCE;
+    }
 
 }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/SimpleMessage.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/SimpleMessage.java
index 5ca4c70f12..70d7518a01 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/SimpleMessage.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/SimpleMessage.java
@@ -20,1735 +20,1783 @@
 
 package org.apache.eventmesh.common.protocol.grpc.protos;
 
+import java.util.Objects;
+
 /**
  * Protobuf type {@code eventmesh.common.protocol.grpc.SimpleMessage}
  */
 @SuppressWarnings({"all"})
-public  final class SimpleMessage extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.SimpleMessage)
-    SimpleMessageOrBuilder {
-private static final long serialVersionUID = 0L;
-  // Use SimpleMessage.newBuilder() to construct.
-  private SimpleMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-    super(builder);
-  }
-  private SimpleMessage() {
-    producerGroup_ = "";
-    topic_ = "";
-    content_ = "";
-    ttl_ = "";
-    uniqueId_ = "";
-    seqNum_ = "";
-    tag_ = "";
-  }
-
-  @Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
-    return this.unknownFields;
-  }
-  private SimpleMessage(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new NullPointerException();
-    }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          default: {
-            if (!parseUnknownFieldProto3(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
-            }
-            break;
-          }
-          case 10: {
-            RequestHeader.Builder subBuilder = null;
-            if (header_ != null) {
-              subBuilder = header_.toBuilder();
-            }
-            header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
-            if (subBuilder != null) {
-              subBuilder.mergeFrom(header_);
-              header_ = subBuilder.buildPartial();
-            }
-
-            break;
-          }
-          case 18: {
-            String s = input.readStringRequireUtf8();
-
-            producerGroup_ = s;
-            break;
-          }
-          case 26: {
-            String s = input.readStringRequireUtf8();
-
-            topic_ = s;
-            break;
-          }
-          case 34: {
-            String s = input.readStringRequireUtf8();
-
-            content_ = s;
-            break;
-          }
-          case 42: {
-            String s = input.readStringRequireUtf8();
-
-            ttl_ = s;
-            break;
-          }
-          case 50: {
-            String s = input.readStringRequireUtf8();
-
-            uniqueId_ = s;
-            break;
-          }
-          case 58: {
-            String s = input.readStringRequireUtf8();
-
-            seqNum_ = s;
-            break;
-          }
-          case 66: {
-            String s = input.readStringRequireUtf8();
-
-            tag_ = s;
-            break;
-          }
-          case 74: {
-            if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
-              properties_ = com.google.protobuf.MapField.newMapField(
-                  PropertiesDefaultEntryHolder.defaultEntry);
-              mutable_bitField0_ |= 0x00000100;
+public final class SimpleMessage extends
+        com.google.protobuf.GeneratedMessageV3 implements
+        // @@protoc_insertion_point(message_implements:eventmesh.common.protocol.grpc.SimpleMessage)
+        SimpleMessageOrBuilder {
+    private static final long serialVersionUID = -6684279788270319330L;
+
+    // Use SimpleMessage.newBuilder() to construct.
+    private SimpleMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        super(builder);
+    }
+
+    private SimpleMessage() {
+        producerGroup_ = "";
+        topic_ = "";
+        content_ = "";
+        ttl_ = "";
+        uniqueId_ = "";
+        seqNum_ = "";
+        tag_ = "";
+    }
+
+    @Override
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+        return this.unknownFields;
+    }
+
+    private SimpleMessage(com.google.protobuf.CodedInputStream input,
+                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        this();
+        if (extensionRegistry == null) {
+            throw new NullPointerException();
+        }
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+            boolean done = false;
+            while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                    case 0:
+                        done = true;
+                        break;
+                    default: {
+                        if (!parseUnknownFieldProto3(
+                                input, unknownFields, extensionRegistry, tag)) {
+                            done = true;
+                        }
+                        break;
+                    }
+                    case 10: {
+                        RequestHeader.Builder subBuilder = null;
+                        if (header_ != null) {
+                            subBuilder = header_.toBuilder();
+                        }
+                        header_ = input.readMessage(RequestHeader.parser(), extensionRegistry);
+                        if (subBuilder != null) {
+                            subBuilder.mergeFrom(header_);
+                            header_ = subBuilder.buildPartial();
+                        }
+
+                        break;
+                    }
+                    case 18: {
+                        producerGroup_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 26: {
+                        topic_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 34: {
+                        content_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 42: {
+                        ttl_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 50: {
+                        uniqueId_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 58: {
+                        seqNum_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 66: {
+                        tag_ = input.readStringRequireUtf8();
+                        break;
+                    }
+                    case 74: {
+                        if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
+                            properties_ = com.google.protobuf.MapField.newMapField(
+                                    PropertiesDefaultEntryHolder.defaultEntry);
+                            mutable_bitField0_ |= 0x00000100;
+                        }
+                        com.google.protobuf.MapEntry
+                                properties__ = input.readMessage(
+                                PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+                        properties_.getMutableMap().put(
+                                properties__.getKey(), properties__.getValue());
+                        break;
+                    }
+                }
             }
-            com.google.protobuf.MapEntry
-            properties__ = input.readMessage(
-                PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
-            properties_.getMutableMap().put(
-                properties__.getKey(), properties__.getValue());
-            break;
-          }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_descriptor;
-  }
-
-  @SuppressWarnings({"rawtypes"})
-  protected com.google.protobuf.MapField internalGetMapField(
-      int number) {
-    switch (number) {
-      case 9:
-        return internalGetProperties();
-      default:
-        throw new RuntimeException(
-            "Invalid map field number: " + number);
-    }
-  }
-  protected FieldAccessorTable
-      internalGetFieldAccessorTable() {
-    return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_fieldAccessorTable
-        .ensureFieldAccessorsInitialized(
-            SimpleMessage.class, Builder.class);
-  }
-
-  private int bitField0_;
-  public static final int HEADER_FIELD_NUMBER = 1;
-  private RequestHeader header_;
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public boolean hasHeader() {
-    return header_ != null;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public RequestHeader getHeader() {
-    return header_ == null ? RequestHeader.getDefaultInstance() : header_;
-  }
-  /**
-   * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-   */
-  public RequestHeaderOrBuilder getHeaderOrBuilder() {
-    return getHeader();
-  }
-
-  public static final int PRODUCERGROUP_FIELD_NUMBER = 2;
-  private volatile Object producerGroup_;
-  /**
-   * string producerGroup = 2;
-   */
-  public String getProducerGroup() {
-    Object ref = producerGroup_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      producerGroup_ = s;
-      return s;
-    }
-  }
-  /**
-   * string producerGroup = 2;
-   */
-  public com.google.protobuf.ByteString
-      getProducerGroupBytes() {
-    Object ref = producerGroup_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      producerGroup_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int TOPIC_FIELD_NUMBER = 3;
-  private volatile Object topic_;
-  /**
-   * string topic = 3;
-   */
-  public String getTopic() {
-    Object ref = topic_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      topic_ = s;
-      return s;
-    }
-  }
-  /**
-   * string topic = 3;
-   */
-  public com.google.protobuf.ByteString
-      getTopicBytes() {
-    Object ref = topic_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      topic_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int CONTENT_FIELD_NUMBER = 4;
-  private volatile Object content_;
-  /**
-   * string content = 4;
-   */
-  public String getContent() {
-    Object ref = content_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      content_ = s;
-      return s;
-    }
-  }
-  /**
-   * string content = 4;
-   */
-  public com.google.protobuf.ByteString
-      getContentBytes() {
-    Object ref = content_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      content_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int TTL_FIELD_NUMBER = 5;
-  private volatile Object ttl_;
-  /**
-   * string ttl = 5;
-   */
-  public String getTtl() {
-    Object ref = ttl_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      ttl_ = s;
-      return s;
-    }
-  }
-  /**
-   * string ttl = 5;
-   */
-  public com.google.protobuf.ByteString
-      getTtlBytes() {
-    Object ref = ttl_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      ttl_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int UNIQUEID_FIELD_NUMBER = 6;
-  private volatile Object uniqueId_;
-  /**
-   * string uniqueId = 6;
-   */
-  public String getUniqueId() {
-    Object ref = uniqueId_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      uniqueId_ = s;
-      return s;
-    }
-  }
-  /**
-   * string uniqueId = 6;
-   */
-  public com.google.protobuf.ByteString
-      getUniqueIdBytes() {
-    Object ref = uniqueId_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      uniqueId_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int SEQNUM_FIELD_NUMBER = 7;
-  private volatile Object seqNum_;
-  /**
-   * string seqNum = 7;
-   */
-  public String getSeqNum() {
-    Object ref = seqNum_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      seqNum_ = s;
-      return s;
-    }
-  }
-  /**
-   * string seqNum = 7;
-   */
-  public com.google.protobuf.ByteString
-      getSeqNumBytes() {
-    Object ref = seqNum_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      seqNum_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int TAG_FIELD_NUMBER = 8;
-  private volatile Object tag_;
-  /**
-   * string tag = 8;
-   */
-  public String getTag() {
-    Object ref = tag_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      tag_ = s;
-      return s;
-    }
-  }
-  /**
-   * string tag = 8;
-   */
-  public com.google.protobuf.ByteString
-      getTagBytes() {
-    Object ref = tag_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      tag_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  public static final int PROPERTIES_FIELD_NUMBER = 9;
-  private static final class PropertiesDefaultEntryHolder {
-    static final com.google.protobuf.MapEntry<
-        String, String> defaultEntry =
-            com.google.protobuf.MapEntry
-            .newDefaultInstance(
-                EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_PropertiesEntry_descriptor,
-                com.google.protobuf.WireFormat.FieldType.STRING,
-                "",
-                com.google.protobuf.WireFormat.FieldType.STRING,
-                "");
-  }
-  private com.google.protobuf.MapField<
-      String, String> properties_;
-  private com.google.protobuf.MapField
-  internalGetProperties() {
-    if (properties_ == null) {
-      return com.google.protobuf.MapField.emptyMapField(
-          PropertiesDefaultEntryHolder.defaultEntry);
-    }
-    return properties_;
-  }
-
-  public int getPropertiesCount() {
-    return internalGetProperties().getMap().size();
-  }
-  /**
-   * map<string, string> properties = 9;
-   */
-
-  public boolean containsProperties(
-      String key) {
-    if (key == null) { throw new NullPointerException(); }
-    return internalGetProperties().getMap().containsKey(key);
-  }
-  /**
-   * Use {@link #getPropertiesMap()} instead.
-   */
-  @Deprecated
-  public java.util.Map getProperties() {
-    return getPropertiesMap();
-  }
-  /**
-   * map<string, string> properties = 9;
-   */
-
-  public java.util.Map getPropertiesMap() {
-    return internalGetProperties().getMap();
-  }
-  /**
-   * map<string, string> properties = 9;
-   */
-
-  public String getPropertiesOrDefault(
-      String key,
-      String defaultValue) {
-    if (key == null) { throw new NullPointerException(); }
-    java.util.Map map =
-        internalGetProperties().getMap();
-    return map.containsKey(key) ? map.get(key) : defaultValue;
-  }
-  /**
-   * map<string, string> properties = 9;
-   */
-
-  public String getPropertiesOrThrow(
-      String key) {
-    if (key == null) { throw new NullPointerException(); }
-    java.util.Map map =
-        internalGetProperties().getMap();
-    if (!map.containsKey(key)) {
-      throw new IllegalArgumentException();
-    }
-    return map.get(key);
-  }
-
-  private byte memoizedIsInitialized = -1;
-  public final boolean isInitialized() {
-    byte isInitialized = memoizedIsInitialized;
-    if (isInitialized == 1) return true;
-    if (isInitialized == 0) return false;
-
-    memoizedIsInitialized = 1;
-    return true;
-  }
-
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
-    if (header_ != null) {
-      output.writeMessage(1, getHeader());
-    }
-    if (!getProducerGroupBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerGroup_);
-    }
-    if (!getTopicBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
-    }
-    if (!getContentBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_);
-    }
-    if (!getTtlBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ttl_);
-    }
-    if (!getUniqueIdBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uniqueId_);
-    }
-    if (!getSeqNumBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, seqNum_);
-    }
-    if (!getTagBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tag_);
-    }
-    com.google.protobuf.GeneratedMessageV3
-      .serializeStringMapTo(
-        output,
-        internalGetProperties(),
-        PropertiesDefaultEntryHolder.defaultEntry,
-        9);
-    unknownFields.writeTo(output);
-  }
-
-  public int getSerializedSize() {
-    int size = memoizedSize;
-    if (size != -1) return size;
-
-    size = 0;
-    if (header_ != null) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(1, getHeader());
-    }
-    if (!getProducerGroupBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerGroup_);
-    }
-    if (!getTopicBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
-    }
-    if (!getContentBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_);
-    }
-    if (!getTtlBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, ttl_);
-    }
-    if (!getUniqueIdBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uniqueId_);
-    }
-    if (!getSeqNumBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, seqNum_);
-    }
-    if (!getTagBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, tag_);
-    }
-    for (java.util.Map.Entry entry
-         : internalGetProperties().getMap().entrySet()) {
-      com.google.protobuf.MapEntry
-      properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
-          .setKey(entry.getKey())
-          .setValue(entry.getValue())
-          .build();
-      size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(9, properties__);
-    }
-    size += unknownFields.getSerializedSize();
-    memoizedSize = size;
-    return size;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == this) {
-     return true;
-    }
-    if (!(obj instanceof SimpleMessage)) {
-      return super.equals(obj);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(
+                    e).setUnfinishedMessage(this);
+        } finally {
+            this.unknownFields = unknownFields.build();
+            makeExtensionsImmutable();
+        }
     }
-    SimpleMessage other = (SimpleMessage) obj;
 
-    boolean result = true;
-    result = result && (hasHeader() == other.hasHeader());
-    if (hasHeader()) {
-      result = result && getHeader()
-          .equals(other.getHeader());
-    }
-    result = result && getProducerGroup()
-        .equals(other.getProducerGroup());
-    result = result && getTopic()
-        .equals(other.getTopic());
-    result = result && getContent()
-        .equals(other.getContent());
-    result = result && getTtl()
-        .equals(other.getTtl());
-    result = result && getUniqueId()
-        .equals(other.getUniqueId());
-    result = result && getSeqNum()
-        .equals(other.getSeqNum());
-    result = result && getTag()
-        .equals(other.getTag());
-    result = result && internalGetProperties().equals(
-        other.internalGetProperties());
-    result = result && unknownFields.equals(other.unknownFields);
-    return result;
-  }
-
-  @Override
-  public int hashCode() {
-    if (memoizedHashCode != 0) {
-      return memoizedHashCode;
-    }
-    int hash = 41;
-    hash = (19 * hash) + getDescriptor().hashCode();
-    if (hasHeader()) {
-      hash = (37 * hash) + HEADER_FIELD_NUMBER;
-      hash = (53 * hash) + getHeader().hashCode();
-    }
-    hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
-    hash = (53 * hash) + getProducerGroup().hashCode();
-    hash = (37 * hash) + TOPIC_FIELD_NUMBER;
-    hash = (53 * hash) + getTopic().hashCode();
-    hash = (37 * hash) + CONTENT_FIELD_NUMBER;
-    hash = (53 * hash) + getContent().hashCode();
-    hash = (37 * hash) + TTL_FIELD_NUMBER;
-    hash = (53 * hash) + getTtl().hashCode();
-    hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
-    hash = (53 * hash) + getUniqueId().hashCode();
-    hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
-    hash = (53 * hash) + getSeqNum().hashCode();
-    hash = (37 * hash) + TAG_FIELD_NUMBER;
-    hash = (53 * hash) + getTag().hashCode();
-    if (!internalGetProperties().getMap().isEmpty()) {
-      hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
-      hash = (53 * hash) + internalGetProperties().hashCode();
-    }
-    hash = (29 * hash) + unknownFields.hashCode();
-    memoizedHashCode = hash;
-    return hash;
-  }
-
-  public static SimpleMessage parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static SimpleMessage parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static SimpleMessage parseFrom(
-      com.google.protobuf.ByteString data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static SimpleMessage parseFrom(
-      com.google.protobuf.ByteString data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static SimpleMessage parseFrom(byte[] data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static SimpleMessage parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static SimpleMessage parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static SimpleMessage parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static SimpleMessage parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
-  }
-  public static SimpleMessage parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static SimpleMessage parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static SimpleMessage parseFrom(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-
-  public Builder newBuilderForType() { return newBuilder(); }
-  public static Builder newBuilder() {
-    return DEFAULT_INSTANCE.toBuilder();
-  }
-  public static Builder newBuilder(SimpleMessage prototype) {
-    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-  }
-  public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
-  }
-
-  @Override
-  protected Builder newBuilderForType(
-      BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
-  }
-  /**
-   * Protobuf type {@code eventmesh.common.protocol.grpc.SimpleMessage}
-   */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
-      // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.SimpleMessage)
-      SimpleMessageOrBuilder {
     public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_descriptor;
+    getDescriptor() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_descriptor;
     }
 
     @SuppressWarnings({"rawtypes"})
-    protected com.google.protobuf.MapField internalGetMapField(
-        int number) {
-      switch (number) {
-        case 9:
-          return internalGetProperties();
-        default:
-          throw new RuntimeException(
-              "Invalid map field number: " + number);
-      }
-    }
-    @SuppressWarnings({"rawtypes"})
-    protected com.google.protobuf.MapField internalGetMutableMapField(
-        int number) {
-      switch (number) {
-        case 9:
-          return internalGetMutableProperties();
-        default:
-          throw new RuntimeException(
-              "Invalid map field number: " + number);
-      }
-    }
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              SimpleMessage.class, Builder.class);
-    }
-
-    // Construct using org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
-
-    private Builder(
-        BuilderParent parent) {
-      super(parent);
-      maybeForceBuilderInitialization();
-    }
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
-    }
-    public Builder clear() {
-      super.clear();
-      if (headerBuilder_ == null) {
-        header_ = null;
-      } else {
-        header_ = null;
-        headerBuilder_ = null;
-      }
-      producerGroup_ = "";
-
-      topic_ = "";
-
-      content_ = "";
-
-      ttl_ = "";
-
-      uniqueId_ = "";
-
-      seqNum_ = "";
-
-      tag_ = "";
-
-      internalGetMutableProperties().clear();
-      return this;
-    }
-
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_descriptor;
-    }
-
-    public SimpleMessage getDefaultInstanceForType() {
-      return SimpleMessage.getDefaultInstance();
-    }
-
-    public SimpleMessage build() {
-      SimpleMessage result = buildPartial();
-      if (!result.isInitialized()) {
-        throw newUninitializedMessageException(result);
-      }
-      return result;
-    }
-
-    public SimpleMessage buildPartial() {
-      SimpleMessage result = new SimpleMessage(this);
-      int from_bitField0_ = bitField0_;
-      int to_bitField0_ = 0;
-      if (headerBuilder_ == null) {
-        result.header_ = header_;
-      } else {
-        result.header_ = headerBuilder_.build();
-      }
-      result.producerGroup_ = producerGroup_;
-      result.topic_ = topic_;
-      result.content_ = content_;
-      result.ttl_ = ttl_;
-      result.uniqueId_ = uniqueId_;
-      result.seqNum_ = seqNum_;
-      result.tag_ = tag_;
-      result.properties_ = internalGetProperties();
-      result.properties_.makeImmutable();
-      result.bitField0_ = to_bitField0_;
-      onBuilt();
-      return result;
-    }
-
-    public Builder clone() {
-      return (Builder) super.clone();
-    }
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.setField(field, value);
-    }
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return (Builder) super.clearField(field);
-    }
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return (Builder) super.clearOneof(oneof);
-    }
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, Object value) {
-      return (Builder) super.setRepeatedField(field, index, value);
-    }
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return (Builder) super.addRepeatedField(field, value);
-    }
-    public Builder mergeFrom(com.google.protobuf.Message other) {
-      if (other instanceof SimpleMessage) {
-        return mergeFrom((SimpleMessage)other);
-      } else {
-        super.mergeFrom(other);
-        return this;
-      }
-    }
-
-    public Builder mergeFrom(SimpleMessage other) {
-      if (other == SimpleMessage.getDefaultInstance()) return this;
-      if (other.hasHeader()) {
-        mergeHeader(other.getHeader());
-      }
-      if (!other.getProducerGroup().isEmpty()) {
-        producerGroup_ = other.producerGroup_;
-        onChanged();
-      }
-      if (!other.getTopic().isEmpty()) {
-        topic_ = other.topic_;
-        onChanged();
-      }
-      if (!other.getContent().isEmpty()) {
-        content_ = other.content_;
-        onChanged();
-      }
-      if (!other.getTtl().isEmpty()) {
-        ttl_ = other.ttl_;
-        onChanged();
-      }
-      if (!other.getUniqueId().isEmpty()) {
-        uniqueId_ = other.uniqueId_;
-        onChanged();
-      }
-      if (!other.getSeqNum().isEmpty()) {
-        seqNum_ = other.seqNum_;
-        onChanged();
-      }
-      if (!other.getTag().isEmpty()) {
-        tag_ = other.tag_;
-        onChanged();
-      }
-      internalGetMutableProperties().mergeFrom(
-          other.internalGetProperties());
-      this.mergeUnknownFields(other.unknownFields);
-      onChanged();
-      return this;
+    protected com.google.protobuf.MapField internalGetMapField(int number) {
+        switch (number) {
+            case 9:
+                return internalGetProperties();
+            default:
+                throw new RuntimeException(
+                        "Invalid map field number: " + number);
+        }
     }
 
-    public final boolean isInitialized() {
-      return true;
+    protected FieldAccessorTable internalGetFieldAccessorTable() {
+        return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_fieldAccessorTable
+                .ensureFieldAccessorsInitialized(
+                        SimpleMessage.class, Builder.class);
     }
 
-    public Builder mergeFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      SimpleMessage parsedMessage = null;
-      try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (SimpleMessage) e.getUnfinishedMessage();
-        throw e.unwrapIOException();
-      } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
-      return this;
-    }
     private int bitField0_;
+    public static final int HEADER_FIELD_NUMBER = 1;
+    private RequestHeader header_;
 
-    private RequestHeader header_ = null;
-    private com.google.protobuf.SingleFieldBuilderV3<
-        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
     public boolean hasHeader() {
-      return headerBuilder_ != null || header_ != null;
+        return header_ != null;
     }
+
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
     public RequestHeader getHeader() {
-      if (headerBuilder_ == null) {
         return header_ == null ? RequestHeader.getDefaultInstance() : header_;
-      } else {
-        return headerBuilder_.getMessage();
-      }
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder setHeader(RequestHeader value) {
-      if (headerBuilder_ == null) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        header_ = value;
-        onChanged();
-      } else {
-        headerBuilder_.setMessage(value);
-      }
-
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder setHeader(
-        RequestHeader.Builder builderForValue) {
-      if (headerBuilder_ == null) {
-        header_ = builderForValue.build();
-        onChanged();
-      } else {
-        headerBuilder_.setMessage(builderForValue.build());
-      }
-
-      return this;
     }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder mergeHeader(RequestHeader value) {
-      if (headerBuilder_ == null) {
-        if (header_ != null) {
-          header_ =
-            RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
-        } else {
-          header_ = value;
-        }
-        onChanged();
-      } else {
-        headerBuilder_.mergeFrom(value);
-      }
 
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public Builder clearHeader() {
-      if (headerBuilder_ == null) {
-        header_ = null;
-        onChanged();
-      } else {
-        header_ = null;
-        headerBuilder_ = null;
-      }
-
-      return this;
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    public RequestHeader.Builder getHeaderBuilder() {
-      
-      onChanged();
-      return getHeaderFieldBuilder().getBuilder();
-    }
     /**
      * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
      */
     public RequestHeaderOrBuilder getHeaderOrBuilder() {
-      if (headerBuilder_ != null) {
-        return headerBuilder_.getMessageOrBuilder();
-      } else {
-        return header_ == null ?
-            RequestHeader.getDefaultInstance() : header_;
-      }
-    }
-    /**
-     * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
-     */
-    private com.google.protobuf.SingleFieldBuilderV3<
-        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
-        getHeaderFieldBuilder() {
-      if (headerBuilder_ == null) {
-        headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-            RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
-                getHeader(),
-                getParentForChildren(),
-                isClean());
-        header_ = null;
-      }
-      return headerBuilder_;
+        return getHeader();
     }
 
-    private Object producerGroup_ = "";
+    public static final int PRODUCERGROUP_FIELD_NUMBER = 2;
+    private volatile Object producerGroup_;
+
     /**
      * string producerGroup = 2;
      */
     public String getProducerGroup() {
-      Object ref = producerGroup_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        producerGroup_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        Object ref = producerGroup_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            producerGroup_ = s;
+            return s;
+        }
     }
+
     /**
      * string producerGroup = 2;
      */
     public com.google.protobuf.ByteString
-        getProducerGroupBytes() {
-      Object ref = producerGroup_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        producerGroup_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string producerGroup = 2;
-     */
-    public Builder setProducerGroup(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      producerGroup_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string producerGroup = 2;
-     */
-    public Builder clearProducerGroup() {
-      
-      producerGroup_ = getDefaultInstance().getProducerGroup();
-      onChanged();
-      return this;
-    }
-    /**
-     * string producerGroup = 2;
-     */
-    public Builder setProducerGroupBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      producerGroup_ = value;
-      onChanged();
-      return this;
+    getProducerGroupBytes() {
+        Object ref = producerGroup_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            producerGroup_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
 
-    private Object topic_ = "";
+    public static final int TOPIC_FIELD_NUMBER = 3;
+    private volatile Object topic_;
+
     /**
      * string topic = 3;
      */
     public String getTopic() {
-      Object ref = topic_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        topic_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        Object ref = topic_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            topic_ = s;
+            return s;
+        }
     }
+
     /**
      * string topic = 3;
      */
     public com.google.protobuf.ByteString
-        getTopicBytes() {
-      Object ref = topic_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        topic_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string topic = 3;
-     */
-    public Builder setTopic(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      topic_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string topic = 3;
-     */
-    public Builder clearTopic() {
-      
-      topic_ = getDefaultInstance().getTopic();
-      onChanged();
-      return this;
-    }
-    /**
-     * string topic = 3;
-     */
-    public Builder setTopicBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      topic_ = value;
-      onChanged();
-      return this;
+    getTopicBytes() {
+        Object ref = topic_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            topic_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
 
-    private Object content_ = "";
+    public static final int CONTENT_FIELD_NUMBER = 4;
+    private volatile Object content_;
+
     /**
      * string content = 4;
      */
     public String getContent() {
-      Object ref = content_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        content_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        Object ref = content_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            content_ = s;
+            return s;
+        }
     }
+
     /**
      * string content = 4;
      */
     public com.google.protobuf.ByteString
-        getContentBytes() {
-      Object ref = content_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        content_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string content = 4;
-     */
-    public Builder setContent(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      content_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string content = 4;
-     */
-    public Builder clearContent() {
-      
-      content_ = getDefaultInstance().getContent();
-      onChanged();
-      return this;
-    }
-    /**
-     * string content = 4;
-     */
-    public Builder setContentBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      content_ = value;
-      onChanged();
-      return this;
+    getContentBytes() {
+        Object ref = content_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            content_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
 
-    private Object ttl_ = "";
+    public static final int TTL_FIELD_NUMBER = 5;
+    private volatile Object ttl_;
+
     /**
      * string ttl = 5;
      */
     public String getTtl() {
-      Object ref = ttl_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        ttl_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        Object ref = ttl_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            ttl_ = s;
+            return s;
+        }
     }
+
     /**
      * string ttl = 5;
      */
     public com.google.protobuf.ByteString
-        getTtlBytes() {
-      Object ref = ttl_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        ttl_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string ttl = 5;
-     */
-    public Builder setTtl(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      ttl_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string ttl = 5;
-     */
-    public Builder clearTtl() {
-      
-      ttl_ = getDefaultInstance().getTtl();
-      onChanged();
-      return this;
-    }
-    /**
-     * string ttl = 5;
-     */
-    public Builder setTtlBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      ttl_ = value;
-      onChanged();
-      return this;
+    getTtlBytes() {
+        Object ref = ttl_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            ttl_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
 
-    private Object uniqueId_ = "";
+    public static final int UNIQUEID_FIELD_NUMBER = 6;
+    private volatile Object uniqueId_;
+
     /**
      * string uniqueId = 6;
      */
     public String getUniqueId() {
-      Object ref = uniqueId_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        uniqueId_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        Object ref = uniqueId_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            uniqueId_ = s;
+            return s;
+        }
     }
+
     /**
      * string uniqueId = 6;
      */
     public com.google.protobuf.ByteString
-        getUniqueIdBytes() {
-      Object ref = uniqueId_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        uniqueId_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string uniqueId = 6;
-     */
-    public Builder setUniqueId(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      uniqueId_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string uniqueId = 6;
-     */
-    public Builder clearUniqueId() {
-      
-      uniqueId_ = getDefaultInstance().getUniqueId();
-      onChanged();
-      return this;
-    }
-    /**
-     * string uniqueId = 6;
-     */
-    public Builder setUniqueIdBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      uniqueId_ = value;
-      onChanged();
-      return this;
+    getUniqueIdBytes() {
+        Object ref = uniqueId_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            uniqueId_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
 
-    private Object seqNum_ = "";
+    public static final int SEQNUM_FIELD_NUMBER = 7;
+    private volatile Object seqNum_;
+
     /**
      * string seqNum = 7;
      */
     public String getSeqNum() {
-      Object ref = seqNum_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        seqNum_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+        Object ref = seqNum_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            seqNum_ = s;
+            return s;
+        }
     }
+
     /**
      * string seqNum = 7;
      */
     public com.google.protobuf.ByteString
-        getSeqNumBytes() {
-      Object ref = seqNum_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        seqNum_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+    getSeqNumBytes() {
+        Object ref = seqNum_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            seqNum_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
+
+    public static final int TAG_FIELD_NUMBER = 8;
+    private volatile Object tag_;
+
     /**
-     * string seqNum = 7;
+     * string tag = 8;
      */
-    public Builder setSeqNum(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      seqNum_ = value;
-      onChanged();
-      return this;
+    public String getTag() {
+        Object ref = tag_;
+        if (ref instanceof String) {
+            return (String) ref;
+        } else {
+            com.google.protobuf.ByteString bs =
+                    (com.google.protobuf.ByteString) ref;
+            String s = bs.toStringUtf8();
+            tag_ = s;
+            return s;
+        }
     }
+
     /**
-     * string seqNum = 7;
+     * string tag = 8;
      */
-    public Builder clearSeqNum() {
-      
-      seqNum_ = getDefaultInstance().getSeqNum();
-      onChanged();
-      return this;
-    }
-    /**
-     * string seqNum = 7;
-     */
-    public Builder setSeqNumBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      seqNum_ = value;
-      onChanged();
-      return this;
+    public com.google.protobuf.ByteString
+    getTagBytes() {
+        Object ref = tag_;
+        if (ref instanceof String) {
+            com.google.protobuf.ByteString b =
+                    com.google.protobuf.ByteString.copyFromUtf8(
+                            (String) ref);
+            tag_ = b;
+            return b;
+        } else {
+            return (com.google.protobuf.ByteString) ref;
+        }
     }
 
-    private Object tag_ = "";
-    /**
-     * string tag = 8;
-     */
-    public String getTag() {
-      Object ref = tag_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        tag_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
-    }
-    /**
-     * string tag = 8;
-     */
-    public com.google.protobuf.ByteString
-        getTagBytes() {
-      Object ref = tag_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        tag_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-    /**
-     * string tag = 8;
-     */
-    public Builder setTag(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      tag_ = value;
-      onChanged();
-      return this;
-    }
-    /**
-     * string tag = 8;
-     */
-    public Builder clearTag() {
-      
-      tag_ = getDefaultInstance().getTag();
-      onChanged();
-      return this;
-    }
-    /**
-     * string tag = 8;
-     */
-    public Builder setTagBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      tag_ = value;
-      onChanged();
-      return this;
+    public static final int PROPERTIES_FIELD_NUMBER = 9;
+
+    private static final class PropertiesDefaultEntryHolder {
+        static final com.google.protobuf.MapEntry<
+                String, String> defaultEntry =
+                com.google.protobuf.MapEntry
+                        .newDefaultInstance(
+                                EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_PropertiesEntry_descriptor,
+                                com.google.protobuf.WireFormat.FieldType.STRING,
+                                "",
+                                com.google.protobuf.WireFormat.FieldType.STRING,
+                                "");
     }
 
     private com.google.protobuf.MapField<
-        String, String> properties_;
+            String, String> properties_;
+
     private com.google.protobuf.MapField
     internalGetProperties() {
-      if (properties_ == null) {
-        return com.google.protobuf.MapField.emptyMapField(
-            PropertiesDefaultEntryHolder.defaultEntry);
-      }
-      return properties_;
-    }
-    private com.google.protobuf.MapField
-    internalGetMutableProperties() {
-      onChanged();;
-      if (properties_ == null) {
-        properties_ = com.google.protobuf.MapField.newMapField(
-            PropertiesDefaultEntryHolder.defaultEntry);
-      }
-      if (!properties_.isMutable()) {
-        properties_ = properties_.copy();
-      }
-      return properties_;
+        if (properties_ == null) {
+            return com.google.protobuf.MapField.emptyMapField(
+                    PropertiesDefaultEntryHolder.defaultEntry);
+        }
+        return properties_;
     }
 
     public int getPropertiesCount() {
-      return internalGetProperties().getMap().size();
+        return internalGetProperties().getMap().size();
     }
+
     /**
      * map<string, string> properties = 9;
      */
 
-    public boolean containsProperties(
-        String key) {
-      if (key == null) { throw new NullPointerException(); }
-      return internalGetProperties().getMap().containsKey(key);
+    public boolean containsProperties(String key) {
+        Objects.requireNonNull(key, "key can not be null");
+        return internalGetProperties().getMap().containsKey(key);
     }
+
     /**
      * Use {@link #getPropertiesMap()} instead.
      */
     @Deprecated
     public java.util.Map getProperties() {
-      return getPropertiesMap();
+        return getPropertiesMap();
     }
+
     /**
      * map<string, string> properties = 9;
      */
 
     public java.util.Map getPropertiesMap() {
-      return internalGetProperties().getMap();
+        return internalGetProperties().getMap();
     }
+
     /**
      * map<string, string> properties = 9;
      */
 
     public String getPropertiesOrDefault(
-        String key,
-        String defaultValue) {
-      if (key == null) { throw new NullPointerException(); }
-      java.util.Map map =
-          internalGetProperties().getMap();
-      return map.containsKey(key) ? map.get(key) : defaultValue;
+            String key,
+            String defaultValue) {
+        Objects.requireNonNull(key, "key can not be null");
+
+        java.util.Map map =
+                internalGetProperties().getMap();
+        String value = map.get(key);
+        if (value == null) return defaultValue;
+        return value;
     }
+
     /**
      * map<string, string> properties = 9;
      */
 
     public String getPropertiesOrThrow(
-        String key) {
-      if (key == null) { throw new NullPointerException(); }
-      java.util.Map map =
-          internalGetProperties().getMap();
-      if (!map.containsKey(key)) {
-        throw new IllegalArgumentException();
-      }
-      return map.get(key);
+            String key) {
+        Objects.requireNonNull(key, "key can not be null");
+
+        java.util.Map map = internalGetProperties().getMap();
+
+        if (!map.containsKey(key)) {
+            throw new IllegalArgumentException();
+        }
+        return map.get(key);
     }
 
-    public Builder clearProperties() {
-      internalGetMutableProperties().getMutableMap()
-          .clear();
-      return this;
+    private byte memoizedIsInitialized = -1;
+
+    public final boolean isInitialized() {
+        if (memoizedIsInitialized == 1) return true;
+        if (memoizedIsInitialized == 0) return false;
+
+        memoizedIsInitialized = 1;
+        return true;
     }
-    /**
-     * map<string, string> properties = 9;
-     */
 
-    public Builder removeProperties(
-        String key) {
-      if (key == null) { throw new NullPointerException(); }
-      internalGetMutableProperties().getMutableMap()
-          .remove(key);
-      return this;
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+            throws java.io.IOException {
+        if (header_ != null) {
+            output.writeMessage(1, getHeader());
+        }
+        if (!getProducerGroupBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerGroup_);
+        }
+        if (!getTopicBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, topic_);
+        }
+        if (!getContentBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_);
+        }
+        if (!getTtlBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ttl_);
+        }
+        if (!getUniqueIdBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uniqueId_);
+        }
+        if (!getSeqNumBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 7, seqNum_);
+        }
+        if (!getTagBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tag_);
+        }
+        com.google.protobuf.GeneratedMessageV3
+                .serializeStringMapTo(
+                        output,
+                        internalGetProperties(),
+                        PropertiesDefaultEntryHolder.defaultEntry,
+                        9);
+        unknownFields.writeTo(output);
     }
-    /**
-     * Use alternate mutation accessors instead.
-     */
-    @Deprecated
-    public java.util.Map
-    getMutableProperties() {
-      return internalGetMutableProperties().getMutableMap();
+
+    public int getSerializedSize() {
+        int size = memoizedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (header_ != null) {
+            size += com.google.protobuf.CodedOutputStream
+                    .computeMessageSize(1, getHeader());
+        }
+        if (!getProducerGroupBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerGroup_);
+        }
+        if (!getTopicBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, topic_);
+        }
+        if (!getContentBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_);
+        }
+        if (!getTtlBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, ttl_);
+        }
+        if (!getUniqueIdBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uniqueId_);
+        }
+        if (!getSeqNumBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, seqNum_);
+        }
+        if (!getTagBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, tag_);
+        }
+        for (java.util.Map.Entry entry
+                : internalGetProperties().getMap().entrySet()) {
+            com.google.protobuf.MapEntry
+                    properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
+                    .setKey(entry.getKey())
+                    .setValue(entry.getValue())
+                    .build();
+            size += com.google.protobuf.CodedOutputStream
+                    .computeMessageSize(9, properties__);
+        }
+        size += unknownFields.getSerializedSize();
+        memoizedSize = size;
+        return size;
     }
-    /**
-     * map<string, string> properties = 9;
-     */
-    public Builder putProperties(
-        String key,
-        String value) {
-      if (key == null) { throw new NullPointerException(); }
-      if (value == null) { throw new NullPointerException(); }
-      internalGetMutableProperties().getMutableMap()
-          .put(key, value);
-      return this;
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == this) {
+            return true;
+        }
+
+        if (!(obj instanceof SimpleMessage)) {
+            return super.equals(obj);
+        }
+
+        SimpleMessage other = (SimpleMessage) obj;
+        return (hasHeader() ? other.hasHeader() && getHeader().equals(other.getHeader()) : !other.hasHeader())
+                && getProducerGroup().equals(other.getProducerGroup())
+                && getTopic().equals(other.getTopic())
+                && getContent().equals(other.getContent())
+                && getTtl().equals(other.getTtl())
+                && getUniqueId().equals(other.getUniqueId())
+                && getSeqNum().equals(other.getSeqNum())
+                && getTag().equals(other.getTag())
+                && internalGetProperties().equals(other.internalGetProperties())
+                && unknownFields.equals(other.unknownFields);
+    }
+
+    @Override
+    public int hashCode() {
+        if (memoizedHashCode != 0) {
+            return memoizedHashCode;
+        }
+        int hash = 41;
+        hash = (19 * hash) + getDescriptor().hashCode();
+        if (hasHeader()) {
+            hash = (37 * hash) + HEADER_FIELD_NUMBER;
+            hash = (53 * hash) + getHeader().hashCode();
+        }
+        hash = (37 * hash) + PRODUCERGROUP_FIELD_NUMBER;
+        hash = (53 * hash) + getProducerGroup().hashCode();
+        hash = (37 * hash) + TOPIC_FIELD_NUMBER;
+        hash = (53 * hash) + getTopic().hashCode();
+        hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+        hash = (53 * hash) + getContent().hashCode();
+        hash = (37 * hash) + TTL_FIELD_NUMBER;
+        hash = (53 * hash) + getTtl().hashCode();
+        hash = (37 * hash) + UNIQUEID_FIELD_NUMBER;
+        hash = (53 * hash) + getUniqueId().hashCode();
+        hash = (37 * hash) + SEQNUM_FIELD_NUMBER;
+        hash = (53 * hash) + getSeqNum().hashCode();
+        hash = (37 * hash) + TAG_FIELD_NUMBER;
+        hash = (53 * hash) + getTag().hashCode();
+        if (!internalGetProperties().getMap().isEmpty()) {
+            hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
+            hash = (53 * hash) + internalGetProperties().hashCode();
+        }
+        hash = (29 * hash) + unknownFields.hashCode();
+        memoizedHashCode = hash;
+        return hash;
+    }
+
+    public static SimpleMessage parseFrom(
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+    }
+
+    public static SimpleMessage parseFrom(
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+    }
+
+    public static SimpleMessage parseFrom(
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+    }
+
+    public static SimpleMessage parseFrom(
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+    }
+
+    public static SimpleMessage parseFrom(byte[] data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+    }
+
+    public static SimpleMessage parseFrom(
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * map<string, string> properties = 9;
-     */
 
-    public Builder putAllProperties(
-        java.util.Map values) {
-      internalGetMutableProperties().getMutableMap()
-          .putAll(values);
-      return this;
+    public static SimpleMessage parseFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFieldsProto3(unknownFields);
+
+    public static SimpleMessage parseFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public static SimpleMessage parseDelimitedFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input);
+    }
+
+    public static SimpleMessage parseDelimitedFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public static SimpleMessage parseFrom(
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
+    }
+
+    public static SimpleMessage parseFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public Builder newBuilderForType() {
+        return newBuilder();
+    }
+
+    public static Builder newBuilder() {
+        return DEFAULT_INSTANCE.toBuilder();
+    }
+
+    public static Builder newBuilder(SimpleMessage prototype) {
+        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
     }
 
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
+    public Builder toBuilder() {
+        return this == DEFAULT_INSTANCE
+                ? new Builder() : new Builder().mergeFrom(this);
     }
 
+    @Override
+    protected Builder newBuilderForType(
+            BuilderParent parent) {
+        return new Builder(parent);
+    }
+
+    /**
+     * Protobuf type {@code eventmesh.common.protocol.grpc.SimpleMessage}
+     */
+    public static final class Builder extends
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            // @@protoc_insertion_point(builder_implements:eventmesh.common.protocol.grpc.SimpleMessage)
+            SimpleMessageOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_descriptor;
+        }
+
+        @SuppressWarnings({"rawtypes"})
+        protected com.google.protobuf.MapField internalGetMapField(
+                int number) {
+            switch (number) {
+                case 9:
+                    return internalGetProperties();
+                default:
+                    throw new RuntimeException(
+                            "Invalid map field number: " + number);
+            }
+        }
+
+        @SuppressWarnings({"rawtypes"})
+        protected com.google.protobuf.MapField internalGetMutableMapField(
+                int number) {
+            switch (number) {
+                case 9:
+                    return internalGetMutableProperties();
+                default:
+                    throw new RuntimeException(
+                            "Invalid map field number: " + number);
+            }
+        }
+
+        protected FieldAccessorTable
+        internalGetFieldAccessorTable() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            SimpleMessage.class, Builder.class);
+        }
+
+        // Construct using org.apache.eventmesh.common.protocol.grpc.protos.SimpleMessage.newBuilder()
+        private Builder() {
+            maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+                BuilderParent parent) {
+            super(parent);
+            maybeForceBuilderInitialization();
+        }
+
+        private void maybeForceBuilderInitialization() {
+            if (com.google.protobuf.GeneratedMessageV3
+                    .alwaysUseFieldBuilders) {
+            }
+        }
+
+        public Builder clear() {
+            super.clear();
+            if (headerBuilder_ == null) {
+                header_ = null;
+            } else {
+                header_ = null;
+                headerBuilder_ = null;
+            }
+            producerGroup_ = "";
+
+            topic_ = "";
+
+            content_ = "";
+
+            ttl_ = "";
+
+            uniqueId_ = "";
+
+            seqNum_ = "";
+
+            tag_ = "";
+
+            internalGetMutableProperties().clear();
+            return this;
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+        getDescriptorForType() {
+            return EventmeshGrpc.internal_static_eventmesh_common_protocol_grpc_SimpleMessage_descriptor;
+        }
+
+        public SimpleMessage getDefaultInstanceForType() {
+            return SimpleMessage.getDefaultInstance();
+        }
+
+        public SimpleMessage build() {
+            SimpleMessage result = buildPartial();
+            if (!result.isInitialized()) {
+                throw newUninitializedMessageException(result);
+            }
+            return result;
+        }
+
+        public SimpleMessage buildPartial() {
+            SimpleMessage result = new SimpleMessage(this);
+            int from_bitField0_ = bitField0_;
+            int to_bitField0_ = 0;
+            if (headerBuilder_ == null) {
+                result.header_ = header_;
+            } else {
+                result.header_ = headerBuilder_.build();
+            }
+            result.producerGroup_ = producerGroup_;
+            result.topic_ = topic_;
+            result.content_ = content_;
+            result.ttl_ = ttl_;
+            result.uniqueId_ = uniqueId_;
+            result.seqNum_ = seqNum_;
+            result.tag_ = tag_;
+            result.properties_ = internalGetProperties();
+            result.properties_.makeImmutable();
+            result.bitField0_ = to_bitField0_;
+            onBuilt();
+            return result;
+        }
+
+        public Builder clone() {
+            return (Builder) super.clone();
+        }
+
+        public Builder setField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.setField(field, value);
+        }
+
+        public Builder clearField(
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
+            return (Builder) super.clearField(field);
+        }
+
+        public Builder clearOneof(
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+            return (Builder) super.clearOneof(oneof);
+        }
+
+        public Builder setRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
+            return (Builder) super.setRepeatedField(field, index, value);
+        }
+
+        public Builder addRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return (Builder) super.addRepeatedField(field, value);
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+            if (other instanceof SimpleMessage) {
+                return mergeFrom((SimpleMessage) other);
+            } else {
+                super.mergeFrom(other);
+                return this;
+            }
+        }
+
+        public Builder mergeFrom(SimpleMessage other) {
+            if (other == SimpleMessage.getDefaultInstance()) return this;
+            if (other.hasHeader()) {
+                mergeHeader(other.getHeader());
+            }
+            if (!other.getProducerGroup().isEmpty()) {
+                producerGroup_ = other.producerGroup_;
+                onChanged();
+            }
+            if (!other.getTopic().isEmpty()) {
+                topic_ = other.topic_;
+                onChanged();
+            }
+            if (!other.getContent().isEmpty()) {
+                content_ = other.content_;
+                onChanged();
+            }
+            if (!other.getTtl().isEmpty()) {
+                ttl_ = other.ttl_;
+                onChanged();
+            }
+            if (!other.getUniqueId().isEmpty()) {
+                uniqueId_ = other.uniqueId_;
+                onChanged();
+            }
+            if (!other.getSeqNum().isEmpty()) {
+                seqNum_ = other.seqNum_;
+                onChanged();
+            }
+            if (!other.getTag().isEmpty()) {
+                tag_ = other.tag_;
+                onChanged();
+            }
+            internalGetMutableProperties().mergeFrom(
+                    other.internalGetProperties());
+            this.mergeUnknownFields(other.unknownFields);
+            onChanged();
+            return this;
+        }
+
+        public final boolean isInitialized() {
+            return true;
+        }
+
+        public Builder mergeFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            SimpleMessage parsedMessage = null;
+            try {
+                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                parsedMessage = (SimpleMessage) e.getUnfinishedMessage();
+                throw e.unwrapIOException();
+            } finally {
+                if (parsedMessage != null) {
+                    mergeFrom(parsedMessage);
+                }
+            }
+            return this;
+        }
+
+        private int bitField0_;
+
+        private RequestHeader header_ = null;
+        private com.google.protobuf.SingleFieldBuilderV3<
+                RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder> headerBuilder_;
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public boolean hasHeader() {
+            return headerBuilder_ != null || header_ != null;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeader getHeader() {
+            if (headerBuilder_ == null) {
+                return header_ == null ? RequestHeader.getDefaultInstance() : header_;
+            } else {
+                return headerBuilder_.getMessage();
+            }
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder setHeader(RequestHeader value) {
+            if (headerBuilder_ == null) {
+                Objects.requireNonNull(value, "RequestHeader can not be null");
+                header_ = value;
+                onChanged();
+            } else {
+                headerBuilder_.setMessage(value);
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder setHeader(
+                RequestHeader.Builder builderForValue) {
+            if (headerBuilder_ == null) {
+                header_ = builderForValue.build();
+                onChanged();
+            } else {
+                headerBuilder_.setMessage(builderForValue.build());
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder mergeHeader(RequestHeader value) {
+            if (headerBuilder_ == null) {
+                if (header_ != null) {
+                    header_ = RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+                } else {
+                    header_ = value;
+                }
+                onChanged();
+            } else {
+                headerBuilder_.mergeFrom(value);
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public Builder clearHeader() {
+            if (headerBuilder_ == null) {
+                header_ = null;
+                onChanged();
+            } else {
+                header_ = null;
+                headerBuilder_ = null;
+            }
+
+            return this;
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeader.Builder getHeaderBuilder() {
+            onChanged();
+            return getHeaderFieldBuilder().getBuilder();
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        public RequestHeaderOrBuilder getHeaderOrBuilder() {
+            if (headerBuilder_ != null) {
+                return headerBuilder_.getMessageOrBuilder();
+            } else {
+                return header_ == null ?
+                        RequestHeader.getDefaultInstance() : header_;
+            }
+        }
+
+        /**
+         * .eventmesh.common.protocol.grpc.RequestHeader header = 1;
+         */
+        private com.google.protobuf.SingleFieldBuilderV3<
+                RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>
+        getHeaderFieldBuilder() {
+            if (headerBuilder_ == null) {
+                headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+                        RequestHeader, RequestHeader.Builder, RequestHeaderOrBuilder>(
+                        getHeader(),
+                        getParentForChildren(),
+                        isClean());
+                header_ = null;
+            }
+            return headerBuilder_;
+        }
+
+        private Object producerGroup_ = "";
+
+        /**
+         * string producerGroup = 2;
+         */
+        public String getProducerGroup() {
+            Object ref = producerGroup_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                producerGroup_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public com.google.protobuf.ByteString
+        getProducerGroupBytes() {
+            Object ref = producerGroup_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                producerGroup_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public Builder setProducerGroup(
+                String value) {
+            Objects.requireNonNull(value, "ProducerGroup can not be null");
+
+            producerGroup_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public Builder clearProducerGroup() {
+
+            producerGroup_ = getDefaultInstance().getProducerGroup();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string producerGroup = 2;
+         */
+        public Builder setProducerGroupBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ProducerGroupBytes can not be null");
+
+            checkByteStringIsUtf8(value);
+
+            producerGroup_ = value;
+            onChanged();
+            return this;
+        }
+
+        private Object topic_ = "";
+
+        /**
+         * string topic = 3;
+         */
+        public String getTopic() {
+            Object ref = topic_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                topic_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public com.google.protobuf.ByteString
+        getTopicBytes() {
+            Object ref = topic_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                topic_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public Builder setTopic(String value) {
+            Objects.requireNonNull(value, "Topic can not be null");
+
+            topic_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public Builder clearTopic() {
+
+            topic_ = getDefaultInstance().getTopic();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string topic = 3;
+         */
+        public Builder setTopicBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "TopicBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            topic_ = value;
+            onChanged();
+            return this;
+        }
+
+        private Object content_ = "";
+
+        /**
+         * string content = 4;
+         */
+        public String getContent() {
+            Object ref = content_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                content_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string content = 4;
+         */
+        public com.google.protobuf.ByteString
+        getContentBytes() {
+            Object ref = content_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                content_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string content = 4;
+         */
+        public Builder setContent(String value) {
+            Objects.requireNonNull(value, "Content can not be null");
+
+            content_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string content = 4;
+         */
+        public Builder clearContent() {
+
+            content_ = getDefaultInstance().getContent();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string content = 4;
+         */
+        public Builder setContentBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ContentBytes can not be null");
+
+            checkByteStringIsUtf8(value);
+
+            content_ = value;
+            onChanged();
+            return this;
+        }
+
+        private Object ttl_ = "";
+
+        /**
+         * string ttl = 5;
+         */
+        public String getTtl() {
+            Object ref = ttl_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                ttl_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string ttl = 5;
+         */
+        public com.google.protobuf.ByteString
+        getTtlBytes() {
+            Object ref = ttl_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                ttl_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string ttl = 5;
+         */
+        public Builder setTtl(String value) {
+            Objects.requireNonNull(value, "Ttl can not be null");
+
+            ttl_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string ttl = 5;
+         */
+        public Builder clearTtl() {
+            ttl_ = getDefaultInstance().getTtl();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string ttl = 5;
+         */
+        public Builder setTtlBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "TtlBytes can not be null");
+
+            checkByteStringIsUtf8(value);
+
+            ttl_ = value;
+            onChanged();
+            return this;
+        }
+
+        private Object uniqueId_ = "";
+
+        /**
+         * string uniqueId = 6;
+         */
+        public String getUniqueId() {
+            Object ref = uniqueId_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                uniqueId_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string uniqueId = 6;
+         */
+        public com.google.protobuf.ByteString
+        getUniqueIdBytes() {
+            Object ref = uniqueId_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                uniqueId_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string uniqueId = 6;
+         */
+        public Builder setUniqueId(String value) {
+            Objects.requireNonNull(value, "UniqueId can not be null");
+
+            uniqueId_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string uniqueId = 6;
+         */
+        public Builder clearUniqueId() {
+
+            uniqueId_ = getDefaultInstance().getUniqueId();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string uniqueId = 6;
+         */
+        public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "UniqueIdBytes can not be null");
+
+            checkByteStringIsUtf8(value);
+
+            uniqueId_ = value;
+            onChanged();
+            return this;
+        }
+
+        private Object seqNum_ = "";
+
+        /**
+         * string seqNum = 7;
+         */
+        public String getSeqNum() {
+            Object ref = seqNum_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                seqNum_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string seqNum = 7;
+         */
+        public com.google.protobuf.ByteString
+        getSeqNumBytes() {
+            Object ref = seqNum_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                seqNum_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string seqNum = 7;
+         */
+        public Builder setSeqNum(String value) {
+            Objects.requireNonNull(value, "SeqNum can not be null");
+
+            seqNum_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string seqNum = 7;
+         */
+        public Builder clearSeqNum() {
+            seqNum_ = getDefaultInstance().getSeqNum();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string seqNum = 7;
+         */
+        public Builder setSeqNumBytes(com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "SeqNumBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            seqNum_ = value;
+            onChanged();
+            return this;
+        }
+
+        private Object tag_ = "";
+
+        /**
+         * string tag = 8;
+         */
+        public String getTag() {
+            Object ref = tag_;
+            if (!(ref instanceof String)) {
+                com.google.protobuf.ByteString bs =
+                        (com.google.protobuf.ByteString) ref;
+                String s = bs.toStringUtf8();
+                tag_ = s;
+                return s;
+            } else {
+                return (String) ref;
+            }
+        }
+
+        /**
+         * string tag = 8;
+         */
+        public com.google.protobuf.ByteString getTagBytes() {
+            Object ref = tag_;
+            if (ref instanceof String) {
+                com.google.protobuf.ByteString b =
+                        com.google.protobuf.ByteString.copyFromUtf8(
+                                (String) ref);
+                tag_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        /**
+         * string tag = 8;
+         */
+        public Builder setTag(String value) {
+            Objects.requireNonNull(value, "tag can not be null");
+
+            tag_ = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string tag = 8;
+         */
+        public Builder clearTag() {
+            tag_ = getDefaultInstance().getTag();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string tag = 8;
+         */
+        public Builder setTagBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "TagBytes can not be null");
+            checkByteStringIsUtf8(value);
+
+            tag_ = value;
+            onChanged();
+            return this;
+        }
+
+        private com.google.protobuf.MapField<
+                String, String> properties_;
 
-    // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.SimpleMessage)
-  }
+        private com.google.protobuf.MapField
+        internalGetProperties() {
+            if (properties_ == null) {
+                return com.google.protobuf.MapField.emptyMapField(
+                        PropertiesDefaultEntryHolder.defaultEntry);
+            }
+            return properties_;
+        }
 
-  // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.SimpleMessage)
-  private static final SimpleMessage DEFAULT_INSTANCE;
-  static {
-    DEFAULT_INSTANCE = new SimpleMessage();
-  }
+        private com.google.protobuf.MapField
+        internalGetMutableProperties() {
+            onChanged();
+            ;
+            if (properties_ == null) {
+                properties_ = com.google.protobuf.MapField.newMapField(
+                        PropertiesDefaultEntryHolder.defaultEntry);
+            }
+            if (!properties_.isMutable()) {
+                properties_ = properties_.copy();
+            }
+            return properties_;
+        }
 
-  public static SimpleMessage getDefaultInstance() {
-    return DEFAULT_INSTANCE;
-  }
+        public int getPropertiesCount() {
+            return internalGetProperties().getMap().size();
+        }
 
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
-    public SimpleMessage parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new SimpleMessage(input, extensionRegistry);
+        /**
+         * map<string, string> properties = 9;
+         */
+
+        public boolean containsProperties(
+                String key) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            return internalGetProperties().getMap().containsKey(key);
+        }
+
+        /**
+         * Use {@link #getPropertiesMap()} instead.
+         */
+        @Deprecated
+        public java.util.Map getProperties() {
+            return getPropertiesMap();
+        }
+
+        /**
+         * map<string, string> properties = 9;
+         */
+
+        public java.util.Map getPropertiesMap() {
+            return internalGetProperties().getMap();
+        }
+
+        /**
+         * map<string, string> properties = 9;
+         */
+
+        public String getPropertiesOrDefault(
+                String key,
+                String defaultValue) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            java.util.Map map =
+                    internalGetProperties().getMap();
+            String value = map.get(key);
+            if (value == null) return defaultValue;
+            return value;
+        }
+
+        /**
+         * map<string, string> properties = 9;
+         */
+
+        public String getPropertiesOrThrow(String key) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            java.util.Map map =
+                    internalGetProperties().getMap();
+            if (!map.containsKey(key)) {
+                throw new IllegalArgumentException();
+            }
+            return map.get(key);
+        }
+
+        public Builder clearProperties() {
+            internalGetMutableProperties().getMutableMap().clear();
+            return this;
+        }
+
+        /**
+         * map<string, string> properties = 9;
+         */
+
+        public Builder removeProperties(String key) {
+            Objects.requireNonNull(key, "key can not be null");
+
+            internalGetMutableProperties().getMutableMap().remove(key);
+            return this;
+        }
+
+        /**
+         * Use alternate mutation accessors instead.
+         */
+        @Deprecated
+        public java.util.Map getMutableProperties() {
+            return internalGetMutableProperties().getMutableMap();
+        }
+
+        /**
+         * map<string, string> properties = 9;
+         */
+        public Builder putProperties(
+                String key,
+                String value) {
+            if (key == null) {
+                throw new NullPointerException();
+            }
+            if (value == null) {
+                throw new NullPointerException();
+            }
+            internalGetMutableProperties().getMutableMap()
+                    .put(key, value);
+            return this;
+        }
+
+        /**
+         * map<string, string> properties = 9;
+         */
+
+        public Builder putAllProperties(java.util.Map values) {
+            internalGetMutableProperties().getMutableMap().putAll(values);
+            return this;
+        }
+
+        public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.setUnknownFieldsProto3(unknownFields);
+        }
+
+        public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.mergeUnknownFields(unknownFields);
+        }
+
+
+        // @@protoc_insertion_point(builder_scope:eventmesh.common.protocol.grpc.SimpleMessage)
     }
-  };
 
-  public static com.google.protobuf.Parser parser() {
-    return PARSER;
-  }
+    // @@protoc_insertion_point(class_scope:eventmesh.common.protocol.grpc.SimpleMessage)
+    private static final SimpleMessage DEFAULT_INSTANCE;
+
+    static {
+        DEFAULT_INSTANCE = new SimpleMessage();
+    }
 
-  @Override
-  public com.google.protobuf.Parser getParserForType() {
-    return PARSER;
-  }
+    public static SimpleMessage getDefaultInstance() {
+        return DEFAULT_INSTANCE;
+    }
 
-  public SimpleMessage getDefaultInstanceForType() {
-    return DEFAULT_INSTANCE;
-  }
+    private static final com.google.protobuf.Parser PARSER =
+            new com.google.protobuf.AbstractParser() {
+                public SimpleMessage parsePartialFrom(
+                        com.google.protobuf.CodedInputStream input,
+                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                        throws com.google.protobuf.InvalidProtocolBufferException {
+                    return new SimpleMessage(input, extensionRegistry);
+                }
+            };
 
-}
+    public static com.google.protobuf.Parser parser() {
+        return PARSER;
+    }
+
+    @Override
+    public com.google.protobuf.Parser getParserForType() {
+        return PARSER;
+    }
+
+    public SimpleMessage getDefaultInstanceForType() {
+        return DEFAULT_INSTANCE;
+    }
 
+}
\ No newline at end of file
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Subscription.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Subscription.java
index 9fd70864c6..7b33ff72b4 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Subscription.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/protos/Subscription.java
@@ -589,8 +589,7 @@ public boolean equals(final Object obj) {
           .equals(other.getTopic());
       result = result && mode_ == other.mode_;
       result = result && type_ == other.type_;
-      result = result && unknownFields.equals(other.unknownFields);
-      return result;
+      return result && unknownFields.equals(other.unknownFields);
     }
 
     @Override
@@ -696,8 +695,7 @@ public Builder toBuilder() {
     @Override
     protected Builder newBuilderForType(
         BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
+      return new Builder(parent);
     }
     /**
      * Protobuf type {@code eventmesh.common.protocol.grpc.Subscription.SubscriptionItem}
@@ -1598,7 +1596,9 @@ public String getPropertiesOrDefault(
       if (key == null) { throw new NullPointerException(); }
       java.util.Map map =
           internalGetProperties().getMap();
-      return map.containsKey(key) ? map.get(key) : defaultValue;
+      String value = map.get(key);
+      if(value == null) return defaultValue;
+      return value;
     }
     /**
      * map<string, string> properties = 8;
@@ -1725,8 +1725,7 @@ public boolean equals(final Object obj) {
           .equals(other.getTag());
       result = result && internalGetProperties().equals(
           other.internalGetProperties());
-      result = result && unknownFields.equals(other.unknownFields);
-      return result;
+      return result && unknownFields.equals(other.unknownFields);
     }
 
     @Override
@@ -1844,8 +1843,7 @@ public Builder toBuilder() {
     @Override
     protected Builder newBuilderForType(
         BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
+      return new Builder(parent);
     }
     /**
      * Protobuf type {@code eventmesh.common.protocol.grpc.Subscription.Reply}
@@ -2595,7 +2593,9 @@ public String getPropertiesOrDefault(
         if (key == null) { throw new NullPointerException(); }
         java.util.Map map =
             internalGetProperties().getMap();
-        return map.containsKey(key) ? map.get(key) : defaultValue;
+        String value = map.get(key);
+        if(value == null) return defaultValue;
+        return value;
       }
       /**
        * map<string, string> properties = 8;
@@ -2871,8 +2871,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
     if (!getConsumerGroupBytes().isEmpty()) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consumerGroup_);
     }
-    for (int i = 0; i < subscriptionItems_.size(); i++) {
-      output.writeMessage(3, subscriptionItems_.get(i));
+    for (Subscription.SubscriptionItem item : subscriptionItems_) {
+      output.writeMessage(3, item);
     }
     if (!getUrlBytes().isEmpty()) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, url_);
@@ -2895,9 +2895,9 @@ public int getSerializedSize() {
     if (!getConsumerGroupBytes().isEmpty()) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consumerGroup_);
     }
-    for (int i = 0; i < subscriptionItems_.size(); i++) {
+    for (Subscription.SubscriptionItem item : subscriptionItems_) {
       size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(3, subscriptionItems_.get(i));
+        .computeMessageSize(3, item);
     }
     if (!getUrlBytes().isEmpty()) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, url_);
@@ -2938,8 +2938,7 @@ public boolean equals(final Object obj) {
       result = result && getReply()
           .equals(other.getReply());
     }
-    result = result && unknownFields.equals(other.unknownFields);
-    return result;
+    return result && unknownFields.equals(other.unknownFields);
   }
 
   @Override
@@ -3055,8 +3054,7 @@ public Builder toBuilder() {
   @Override
   protected Builder newBuilderForType(
       BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
+    return new Builder(parent);
   }
   /**
    * Protobuf type {@code eventmesh.common.protocol.grpc.Subscription}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java
index 11ad66aa18..94b3c4ac65 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java
@@ -28,6 +28,7 @@
 
 import org.apache.commons.lang3.StringUtils;
 
+import java.util.Objects;
 import java.util.Optional;
 import java.util.concurrent.atomic.AtomicLong;
 
@@ -39,8 +40,13 @@
 import io.netty.handler.codec.http.HttpResponseStatus;
 import io.netty.handler.codec.http.HttpVersion;
 
+import lombok.Data;
+
+@Data
 public class HttpCommand implements ProtocolTransportObject {
 
+    private static final long serialVersionUID = -8763824685105888009L;
+
     private static final AtomicLong requestId = new AtomicLong(0);
 
     private long opaque;
@@ -108,94 +114,22 @@ public HttpCommand createHttpCommandResponse(EventMeshRetCode eventMeshRetCode)
         return response;
     }
 
-    public long getReqTime() {
-        return reqTime;
-    }
-
-    public void setReqTime(long reqTime) {
-        this.reqTime = reqTime;
-    }
-
-    public long getResTime() {
-        return resTime;
-    }
-
-    public void setResTime(long resTime) {
-        this.resTime = resTime;
-    }
-
-    public long getOpaque() {
-        return opaque;
-    }
-
-    public void setOpaque(long opaque) {
-        this.opaque = opaque;
-    }
-
-    public CmdType getCmdType() {
-        return cmdType;
-    }
-
-    public void setCmdType(CmdType cmdType) {
-        this.cmdType = cmdType;
-    }
-
-    public String getHttpMethod() {
-        return httpMethod;
-    }
-
-    public void setHttpMethod(String httpMethod) {
-        this.httpMethod = httpMethod;
-    }
-
-    public String getHttpVersion() {
-        return httpVersion;
-    }
-
-    public void setHttpVersion(String httpVersion) {
-        this.httpVersion = httpVersion;
-    }
-
-    public String getRequestCode() {
-        return requestCode;
-    }
-
-    public void setRequestCode(String requestCode) {
-        this.requestCode = requestCode;
-    }
-
-    public Header getHeader() {
-        return header;
-    }
-
-    public void setHeader(Header header) {
-        this.header = header;
-    }
-
-    public Body getBody() {
-        return body;
-    }
-
-    public void setBody(Body body) {
-        this.body = body;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("body=").append(body)
-                .append("}");
+            .append("body=").append(body)
+            .append("}");
 
         return sb.toString();
     }
@@ -203,17 +137,17 @@ public String toString() {
     public String abstractDesc() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("bodySize=").append(body.toString().length()).append("}");
+            .append("bodySize=").append(body.toString().length()).append("}");
 
         return sb.toString();
     }
@@ -233,7 +167,7 @@ public DefaultFullHttpResponse httpResponse() throws Exception {
             return null;
         }
         DefaultFullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
-                Unpooled.wrappedBuffer(JsonUtils.serialize(this.getBody()).getBytes(Constants.DEFAULT_CHARSET)));
+            Unpooled.wrappedBuffer(Objects.requireNonNull(JsonUtils.toJSONString(this.getBody())).getBytes(Constants.DEFAULT_CHARSET)));
         HttpHeaders headers = response.headers();
         headers.add(HttpHeaderNames.CONTENT_TYPE, "text/plain; charset=" + Constants.DEFAULT_CHARSET);
         headers.add(HttpHeaderNames.CONTENT_LENGTH, response.content().readableBytes());
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpEventWrapper.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpEventWrapper.java
index 81a98b579d..2779bb73d8 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpEventWrapper.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpEventWrapper.java
@@ -29,9 +29,9 @@
 import org.apache.commons.lang3.StringUtils;
 
 import java.net.URI;
-import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.UUID;
 
@@ -46,6 +46,7 @@
 
 public class HttpEventWrapper implements ProtocolTransportObject {
 
+    public static final long serialVersionUID = -8547334421415366981L;
 
     private Map headerMap = new HashMap<>();
 
@@ -83,7 +84,7 @@ public HttpEventWrapper createHttpResponse(Map responseHeaderMap
         HttpEventWrapper response = new HttpEventWrapper(this.httpMethod, this.httpVersion, this.requestURI);
         response.setReqTime(this.reqTime);
         response.setHeaderMap(responseHeaderMap);
-        response.setBody(JsonUtils.serialize(responseBodyMap).getBytes(StandardCharsets.UTF_8));
+        response.setBody(Objects.requireNonNull(JsonUtils.toJSONString(responseBodyMap)).getBytes(Constants.DEFAULT_CHARSET));
         response.setResTime(System.currentTimeMillis());
         return response;
     }
@@ -100,7 +101,7 @@ public HttpEventWrapper createHttpResponse(EventMeshRetCode eventMeshRetCode) {
         Map responseBodyMap = new HashMap<>();
         responseBodyMap.put("retCode", eventMeshRetCode.getRetCode());
         responseBodyMap.put("retMessage", eventMeshRetCode.getErrMsg());
-        response.setBody(JsonUtils.serialize(responseBodyMap).getBytes(StandardCharsets.UTF_8));
+        response.setBody(Objects.requireNonNull(JsonUtils.toJSONString(responseBodyMap)).getBytes(Constants.DEFAULT_CHARSET));
         response.setResTime(System.currentTimeMillis());
         return response;
     }
@@ -162,16 +163,25 @@ public void setSysHeaderMap(Map sysHeaderMap) {
     }
 
     public byte[] getBody() {
-        return body;
+        int len = body.length;
+        byte[] b = new byte[len];
+        System.arraycopy(body, 0, b, 0, len);
+        return b;
     }
 
-    public void setBody(byte[] body) {
-        this.body = body;
+    public void setBody(byte[] newBody) {
+        if (newBody == null || newBody.length == 0) {
+            return;
+        }
+
+        int len = newBody.length;
+        this.body = new byte[len];
+        System.arraycopy(newBody, 0, this.body, 0, len);
     }
 
     public DefaultFullHttpResponse httpResponse() throws Exception {
         DefaultFullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
-                Unpooled.wrappedBuffer(this.body));
+            Unpooled.wrappedBuffer(this.body));
         HttpHeaders headers = response.headers();
         headers.add(HttpHeaderNames.CONTENT_TYPE, "text/plain; charset=" + Constants.DEFAULT_CHARSET);
         headers.add(HttpHeaderNames.CONTENT_LENGTH, response.content().readableBytes());
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/WebhookProtocolTransportObject.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/WebhookProtocolTransportObject.java
index f47d7851b3..5763e29f23 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/WebhookProtocolTransportObject.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/WebhookProtocolTransportObject.java
@@ -27,8 +27,8 @@
 @Builder
 public class WebhookProtocolTransportObject implements ProtocolTransportObject {
 
-    private static final long serialVersionUID = -7247618154228090320L;
-
+    private static final long serialVersionUID = 7821703624838598761L;
+    
     private String cloudEventId;
 
     private String eventType;
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/BaseRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/BaseRequestBody.java
index a8d77c8e8f..423872bdf2 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/BaseRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/BaseRequestBody.java
@@ -28,7 +28,6 @@ public static BaseRequestBody buildBody(Map bodyParam) {
 
     @Override
     public Map toMap() {
-        Map map = new HashMap();
-        return map;
+        return new HashMap();
     }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java
index a26ed2d1dd..ecd552064d 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java
@@ -28,6 +28,13 @@
 
 import com.fasterxml.jackson.core.type.TypeReference;
 
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ToString
 public class HeartbeatRequestBody extends Body {
 
     public static final String CLIENTTYPE = "clientType";
@@ -40,36 +47,12 @@ public class HeartbeatRequestBody extends Body {
 
     private List heartbeatEntities;
 
-    public String getClientType() {
-        return clientType;
-    }
-
-    public void setClientType(String clientType) {
-        this.clientType = clientType;
-    }
-
-    public List getHeartbeatEntities() {
-        return heartbeatEntities;
-    }
-
-    public void setHeartbeatEntities(List heartbeatEntities) {
-        this.heartbeatEntities = heartbeatEntities;
-    }
-
-    public String getConsumerGroup() {
-        return consumerGroup;
-    }
-
-    public void setConsumerGroup(String consumerGroup) {
-        this.consumerGroup = consumerGroup;
-    }
-
     public static HeartbeatRequestBody buildBody(Map bodyParam) {
         HeartbeatRequestBody body = new HeartbeatRequestBody();
         body.setClientType(MapUtils.getString(bodyParam, CLIENTTYPE));
         body.setConsumerGroup(MapUtils.getString(bodyParam, CONSUMERGROUP));
         body.setHeartbeatEntities(JsonUtils
-                .deserialize(MapUtils.getString(bodyParam, HEARTBEATENTITIES),
+                .parseTypeReferenceObject(MapUtils.getString(bodyParam, HEARTBEATENTITIES),
                         new TypeReference>() {
                         }));
         return body;
@@ -80,34 +63,15 @@ public Map toMap() {
         Map map = new HashMap<>();
         map.put(CLIENTTYPE, clientType);
         map.put(CONSUMERGROUP, consumerGroup);
-        map.put(HEARTBEATENTITIES, JsonUtils.serialize(heartbeatEntities));
+        map.put(HEARTBEATENTITIES, JsonUtils.toJSONString(heartbeatEntities));
         return map;
     }
 
+    @ToString
     public static class HeartbeatEntity {
         public String topic;
         public String serviceId;
         public String url;
         public String instanceId;
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            sb.append("heartbeatEntity={")
-                    .append("topic=").append(topic).append(",")
-                    .append("serviceId=").append(serviceId).append(",")
-                    .append("instanceId=").append(instanceId).append(",")
-                    .append("url=").append(url).append("}");
-            return sb.toString();
-        }
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("heartbeatRequestBody={")
-                .append("consumerGroup=").append(consumerGroup).append(",")
-                .append("clientType=").append(clientType).append("}");
-        return sb.toString();
     }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatResponseBody.java
index c9151dc658..9c47cde970 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatResponseBody.java
@@ -61,7 +61,7 @@ public void setResTime(long resTime) {
         this.resTime = resTime;
     }
 
-    public static HeartbeatResponseBody buildBody(Integer retCode, String retMsg) throws Exception {
+    public static HeartbeatResponseBody buildBody(Integer retCode, String retMsg)  {
         HeartbeatResponseBody heartbeatResponseBody = new HeartbeatResponseBody();
         heartbeatResponseBody.setRetMsg(retMsg);
         heartbeatResponseBody.setResTime(System.currentTimeMillis());
@@ -75,7 +75,7 @@ public String toString() {
         sb.append("heartbeatResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegRequestBody.java
index affffdce09..bc0b63425a 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegRequestBody.java
@@ -71,7 +71,7 @@ public static RegRequestBody buildBody(Map bodyParam) {
         RegRequestBody body = new RegRequestBody();
         body.setClientType(MapUtils.getString(bodyParam, CLIENTTYPE));
         body.setEndPoint(MapUtils.getString(bodyParam, ENDPOINT));
-        body.setTopics(JsonUtils.deserialize(MapUtils.getString(bodyParam, TOPICS),
+        body.setTopics(JsonUtils.parseTypeReferenceObject(MapUtils.getString(bodyParam, TOPICS),
                 new TypeReference>() {
                 }));
         return body;
@@ -82,7 +82,7 @@ public Map toMap() {
         Map map = new HashMap<>();
         map.put(CLIENTTYPE, clientType);
         map.put(ENDPOINT, endPoint);
-        map.put(TOPICS, JsonUtils.serialize(topics));
+        map.put(TOPICS, JsonUtils.toJSONString(topics));
         return map;
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegResponseBody.java
index aeb3288538..f4694ec418 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/RegResponseBody.java
@@ -55,7 +55,7 @@ public void setResTime(long resTime) {
         this.resTime = resTime;
     }
 
-    public static RegResponseBody buildBody(Integer retCode, String retMsg) throws Exception {
+    public static RegResponseBody buildBody(Integer retCode, String retMsg) {
         RegResponseBody regResponseBody = new RegResponseBody();
         regResponseBody.setRetMsg(retMsg);
         regResponseBody.setResTime(System.currentTimeMillis());
@@ -69,7 +69,7 @@ public String toString() {
         sb.append("regResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeRequestBody.java
index df413c1c33..ef0b7765af 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeRequestBody.java
@@ -70,7 +70,7 @@ public void setUrl(String url) {
     public static SubscribeRequestBody buildBody(Map bodyParam) {
         SubscribeRequestBody body = new SubscribeRequestBody();
         body.setUrl(MapUtils.getString(bodyParam, URL));
-        body.setTopics(JsonUtils.deserialize(MapUtils.getString(bodyParam, TOPIC),
+        body.setTopics(JsonUtils.parseTypeReferenceObject(MapUtils.getString(bodyParam, TOPIC),
                 new TypeReference>() {
                 }));
         body.setConsumerGroup(MapUtils.getString(bodyParam, CONSUMERGROUP));
@@ -81,7 +81,7 @@ public static SubscribeRequestBody buildBody(Map bodyParam) {
     public Map toMap() {
         Map map = new HashMap();
         map.put(URL, url);
-        map.put(TOPIC, JsonUtils.serialize(topics));
+        map.put(TOPIC, JsonUtils.toJSONString(topics));
         map.put(CONSUMERGROUP, consumerGroup);
         return map;
     }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeResponseBody.java
index 0b2f6cb3ab..6ab24b538c 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/SubscribeResponseBody.java
@@ -55,7 +55,7 @@ public void setResTime(long resTime) {
         this.resTime = resTime;
     }
 
-    public static SubscribeResponseBody buildBody(Integer retCode, String retMsg) throws Exception {
+    public static SubscribeResponseBody buildBody(Integer retCode, String retMsg) {
         SubscribeResponseBody regResponseBody = new SubscribeResponseBody();
         regResponseBody.setRetMsg(retMsg);
         regResponseBody.setResTime(System.currentTimeMillis());
@@ -67,9 +67,9 @@ public static SubscribeResponseBody buildBody(Integer retCode, String retMsg) th
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("regResponseBody={")
-                .append("retCode=").append(retCode).append(",")
-                .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+            .append("retCode=").append(retCode).append(",")
+            .append("retMsg=").append(retMsg).append(",")
+            .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegRequestBody.java
index 6fa82bda7c..4ba7d9d0cd 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegRequestBody.java
@@ -57,7 +57,7 @@ public void setClientType(String clientType) {
     public static UnRegRequestBody buildBody(Map bodyParam) {
         UnRegRequestBody body = new UnRegRequestBody();
         body.setClientType(MapUtils.getString(bodyParam, CLIENTTYPE));
-        body.setTopics(JsonUtils.deserialize(MapUtils.getString(bodyParam, TOPICS),
+        body.setTopics(JsonUtils.parseTypeReferenceObject(MapUtils.getString(bodyParam, TOPICS),
                 new TypeReference>() {
                 }));
         return body;
@@ -67,7 +67,7 @@ public static UnRegRequestBody buildBody(Map bodyParam) {
     public Map toMap() {
         Map map = new HashMap<>();
         map.put(CLIENTTYPE, clientType);
-        map.put(TOPICS, JsonUtils.serialize(topics));
+        map.put(TOPICS, JsonUtils.toJSONString(topics));
         return map;
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegResponseBody.java
index 975cb35a54..6ab4122bae 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnRegResponseBody.java
@@ -55,7 +55,7 @@ public void setResTime(long resTime) {
         this.resTime = resTime;
     }
 
-    public static UnRegResponseBody buildBody(Integer retCode, String retMsg) throws Exception {
+    public static UnRegResponseBody buildBody(Integer retCode, String retMsg) {
         UnRegResponseBody regResponseBody = new UnRegResponseBody();
         regResponseBody.setRetMsg(retMsg);
         regResponseBody.setResTime(System.currentTimeMillis());
@@ -69,7 +69,7 @@ public String toString() {
         sb.append("regResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeRequestBody.java
index ca9db6210e..5118ab2c58 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeRequestBody.java
@@ -70,7 +70,7 @@ public static UnSubscribeRequestBody buildBody(Map bodyParam) {
         UnSubscribeRequestBody body = new UnSubscribeRequestBody();
         body.setUrl(MapUtils.getString(bodyParam, URL));
         body.setTopics(JsonUtils
-                .deserialize(MapUtils.getString(bodyParam, TOPIC), new TypeReference>() {
+                .parseTypeReferenceObject(MapUtils.getString(bodyParam, TOPIC), new TypeReference>() {
                 }));
         body.setConsumerGroup(MapUtils.getString(bodyParam, CONSUMERGROUP));
         return body;
@@ -80,7 +80,7 @@ public static UnSubscribeRequestBody buildBody(Map bodyParam) {
     public Map toMap() {
         Map map = new HashMap<>();
         map.put(URL, url);
-        map.put(TOPIC, JsonUtils.serialize(topics));
+        map.put(TOPIC, JsonUtils.toJSONString(topics));
         map.put(CONSUMERGROUP, consumerGroup);
         return map;
     }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeResponseBody.java
index d1eeb77db5..bee0b5936a 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/UnSubscribeResponseBody.java
@@ -56,7 +56,7 @@ public void setResTime(long resTime) {
         this.resTime = resTime;
     }
 
-    public static UnSubscribeResponseBody buildBody(Integer retCode, String retMsg) throws Exception {
+    public static UnSubscribeResponseBody buildBody(Integer retCode, String retMsg) {
         UnSubscribeResponseBody regResponseBody = new UnSubscribeResponseBody();
         regResponseBody.setRetMsg(retMsg);
         regResponseBody.setResTime(System.currentTimeMillis());
@@ -70,7 +70,7 @@ public String toString() {
         sb.append("regResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageRequestBody.java
index 4a8feeb818..1aabd1d617 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageRequestBody.java
@@ -47,7 +47,7 @@ public class PushMessageRequestBody extends Body {
 
     private String uniqueId;
 
-    private HashMap extFields;
+    private Map extFields;
 
     public String getTopic() {
         return topic;
@@ -89,11 +89,11 @@ public void setContent(String content) {
         this.content = content;
     }
 
-    public HashMap getExtFields() {
+    public Map getExtFields() {
         return extFields;
     }
 
-    public void setExtFields(HashMap extFields) {
+    public void setExtFields(Map extFields) {
         this.extFields = extFields;
     }
 
@@ -108,7 +108,7 @@ public static PushMessageRequestBody buildBody(final Map bodyPar
 
         if (StringUtils.isNotBlank(extFields)) {
             pushMessageRequestBody.setExtFields(
-                    JsonUtils.deserialize(extFields, new TypeReference>() {
+                    JsonUtils.parseTypeReferenceObject(extFields, new TypeReference>() {
                     }));
         }
         return pushMessageRequestBody;
@@ -122,7 +122,7 @@ public Map toMap() {
         map.put(CONTENT, content);
         map.put(BIZSEQNO, bizSeqNo);
         map.put(UNIQUEID, uniqueId);
-        map.put(EXTFIELDS, JsonUtils.serialize(extFields));
+        map.put(EXTFIELDS, JsonUtils.toJSONString(extFields));
 
         return map;
     }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageResponseBody.java
index 01000b0d0f..56a2010092 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/PushMessageResponseBody.java
@@ -72,7 +72,7 @@ public String toString() {
         sb.append("pushMessageResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageRequestBody.java
index 0814204e4c..7860e5365b 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageRequestBody.java
@@ -45,7 +45,7 @@ public class ReplyMessageRequestBody extends Body {
 
     private String origTopic;
 
-    private HashMap extFields;
+    private Map extFields;
 
     private String producerGroup;
 
@@ -81,11 +81,11 @@ public void setContent(String content) {
         this.content = content;
     }
 
-    public HashMap getExtFields() {
+    public Map getExtFields() {
         return extFields;
     }
 
-    public void setExtFields(HashMap extFields) {
+    public void setExtFields(Map extFields) {
         this.extFields = extFields;
     }
 
@@ -106,7 +106,7 @@ public static ReplyMessageRequestBody buildBody(Map bodyParam) {
         String extFields = MapUtils.getString(bodyParam, EXTFIELDS);
         if (StringUtils.isNotBlank(extFields)) {
             body.setExtFields(
-                    JsonUtils.deserialize(extFields, new TypeReference>() {
+                    JsonUtils.parseTypeReferenceObject(extFields, new TypeReference>() {
                     }));
         }
         body.setProducerGroup(MapUtils.getString(bodyParam, PRODUCERGROUP));
@@ -133,7 +133,7 @@ public Map toMap() {
         map.put(ORIGTOPIC, origTopic);
         map.put(UNIQUEID, uniqueId);
         map.put(CONTENT, content);
-        map.put(EXTFIELDS, JsonUtils.serialize(extFields));
+        map.put(EXTFIELDS, JsonUtils.toJSONString(extFields));
         map.put(PRODUCERGROUP, producerGroup);
         return map;
     }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageResponseBody.java
index 342f151c0a..efadbb9fc4 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/ReplyMessageResponseBody.java
@@ -75,7 +75,7 @@ public String toString() {
         sb.append("replyMessageResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchRequestBody.java
index da77955333..53f0cfdcc2 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchRequestBody.java
@@ -86,7 +86,7 @@ public String toString() {
                 .append("batchId=").append(batchId).append(",")
                 .append("size=").append(size).append(",")
                 .append("producerGroup=").append(producerGroup).append(",")
-                .append("contents=").append(JsonUtils.serialize(contents)).append("}");
+                .append("contents=").append(JsonUtils.toJSONString(contents)).append("}");
         return sb.toString();
     }
 
@@ -122,7 +122,7 @@ public static SendMessageBatchRequestBody buildBody(final Map bo
         body.setBatchId(batchId);
         if (StringUtils.isNotBlank(contents)) {
             body.setContents(
-                    JsonUtils.deserialize(contents, new TypeReference>() {
+                    JsonUtils.parseTypeReferenceObject(contents, new TypeReference>() {
                     }));
         }
         body.setSize(size);
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchResponseBody.java
index f504473673..934f54f6ac 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchResponseBody.java
@@ -75,7 +75,7 @@ public String toString() {
         sb.append("sendMessageBatchResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchV2ResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchV2ResponseBody.java
index 26cc08202c..9fe63e6c53 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchV2ResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageBatchV2ResponseBody.java
@@ -75,7 +75,7 @@ public String toString() {
         sb.append("sendMessageBatchV2ResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageRequestBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageRequestBody.java
index e14d230a56..a17e045c7a 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageRequestBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageRequestBody.java
@@ -51,7 +51,7 @@ public class SendMessageRequestBody extends Body {
 
     private String tag;
 
-    private HashMap extFields;
+    private Map extFields;
 
     private String producerGroup;
 
@@ -87,11 +87,11 @@ public void setContent(String content) {
         this.content = content;
     }
 
-    public HashMap getExtFields() {
+    public Map getExtFields() {
         return extFields;
     }
 
-    public void setExtFields(HashMap extFields) {
+    public void setExtFields(Map extFields) {
         this.extFields = extFields;
     }
 
@@ -130,7 +130,7 @@ public static SendMessageRequestBody buildBody(Map bodyParam) {
         String extFields = MapUtils.getString(bodyParam, EXTFIELDS);
         if (StringUtils.isNotBlank(extFields)) {
             body.setExtFields(
-                    JsonUtils.deserialize(extFields, new TypeReference>() {
+                    JsonUtils.parseTypeReferenceObject(extFields, new TypeReference>() {
                     }));
         }
         body.setProducerGroup(MapUtils.getString(bodyParam, PRODUCERGROUP));
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageResponseBody.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageResponseBody.java
index e4e9eaa120..0c5cc86fe9 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageResponseBody.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/message/SendMessageResponseBody.java
@@ -75,7 +75,7 @@ public String toString() {
         sb.append("sendMessageResponseBody={")
                 .append("retCode=").append(retCode).append(",")
                 .append("retMsg=").append(retMsg).append(",")
-                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT)).append("}");
+                .append("resTime=").append(DateFormatUtils.format(resTime, Constants.DATE_FORMAT_INCLUDE_MILLISECONDS)).append("}");
         return sb.toString();
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientRetCode.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientRetCode.java
index ceaf05cef2..86f7250a1e 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientRetCode.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientRetCode.java
@@ -57,23 +57,16 @@ public static ClientRetCode get(Integer clientRetCode) {
         return ret;
     }
 
-    private Integer retCode;
+    private final Integer retCode;
 
-    private String errMsg;
+    private final String errMsg;
 
     public Integer getRetCode() {
         return retCode;
     }
 
-    public void setRetCode(Integer retCode) {
-        this.retCode = retCode;
-    }
-
     public String getErrMsg() {
         return errMsg;
     }
 
-    public void setErrMsg(String errMsg) {
-        this.errMsg = errMsg;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientType.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientType.java
index c935da6cc4..6cee40077b 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientType.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ClientType.java
@@ -23,9 +23,9 @@ public enum ClientType {
 
     SUB(2, "Client for subscribing");
 
-    private Integer type;
+    private final Integer type;
 
-    private String desc;
+    private final String desc;
 
     ClientType(Integer type, String desc) {
         this.type = type;
@@ -57,15 +57,8 @@ public Integer getType() {
         return type;
     }
 
-    public void setType(Integer type) {
-        this.type = type;
-    }
-
     public String getDesc() {
         return desc;
     }
 
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/EventMeshRetCode.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/EventMeshRetCode.java
index 831eaaca6a..bc551a2b46 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/EventMeshRetCode.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/EventMeshRetCode.java
@@ -43,9 +43,9 @@ public enum EventMeshRetCode {
     EVENTMESH_ACL_ERR(22, "eventMesh acl err"),
     EVENTMESH_HTTP_MES_SEND_OVER_LIMIT_ERR(23, "eventMesh http msg send over the limit, ");
 
-    private Integer retCode;
+    private final Integer retCode;
 
-    private String errMsg;
+    private final String errMsg;
 
     EventMeshRetCode(Integer retCode, String errMsg) {
         this.retCode = retCode;
@@ -56,15 +56,8 @@ public Integer getRetCode() {
         return retCode;
     }
 
-    public void setRetCode(Integer retCode) {
-        this.retCode = retCode;
-    }
-
     public String getErrMsg() {
         return errMsg;
     }
 
-    public void setErrMsg(String errMsg) {
-        this.errMsg = errMsg;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ProtocolVersion.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ProtocolVersion.java
index acfd655246..23b3decb38 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ProtocolVersion.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/ProtocolVersion.java
@@ -22,7 +22,7 @@ public enum ProtocolVersion {
     V1("1.0"),
     V2("2.0");
 
-    private String version;
+    private final String version;
 
     ProtocolVersion(String version) {
         this.version = version;
@@ -42,10 +42,6 @@ public String getVersion() {
         return version;
     }
 
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
     public static boolean contains(String version) {
         boolean flag = false;
         for (ProtocolVersion itr : ProtocolVersion.values()) {
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestCode.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestCode.java
index 32e1b7fbcc..1d6e351bb7 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestCode.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestCode.java
@@ -47,9 +47,9 @@ public enum RequestCode {
 
     ADMIN_SHUTDOWN(601, "ADMIN SHUTDOWN");
 
-    private Integer requestCode;
+    private final Integer requestCode;
 
-    private String desc;
+    private final String desc;
 
     RequestCode(Integer requestCode, String desc) {
         this.requestCode = requestCode;
@@ -82,15 +82,8 @@ public Integer getRequestCode() {
         return requestCode;
     }
 
-    public void setRequestCode(Integer requestCode) {
-        this.requestCode = requestCode;
-    }
-
     public String getDesc() {
         return desc;
     }
 
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestURI.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestURI.java
index ff295c30a6..da5ebf58b3 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestURI.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/common/RequestURI.java
@@ -34,9 +34,9 @@ public enum RequestURI {
     UNSUBSCRIBE_REMOTE("/eventmesh/unsubscribe/remote", "SUBSCRIBE REMOTE");
 
 
-    private String requestURI;
+    private final String requestURI;
 
-    private String desc;
+    private final String desc;
 
     RequestURI(String requestURI, String desc) {
         this.requestURI = requestURI;
@@ -69,15 +69,8 @@ public String getRequestURI() {
         return requestURI;
     }
 
-    public void setRequestURI(String requestURI) {
-        this.requestURI = requestURI;
-    }
-
     public String getDesc() {
         return desc;
     }
 
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/client/HeartbeatRequestHeader.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/client/HeartbeatRequestHeader.java
index 85fceb6945..22f202a546 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/client/HeartbeatRequestHeader.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/client/HeartbeatRequestHeader.java
@@ -54,7 +54,7 @@ public class HeartbeatRequestHeader extends Header {
     //IP of the requester
     private String ip;
 
-    private String producerGroup;
+    //private String producerGroup;
 
     //USERNAME of the requester
     private String username = "username";
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/message/SendMessageBatchV2ResponseHeader.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/message/SendMessageBatchV2ResponseHeader.java
index a188c9713c..e8d56f1514 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/message/SendMessageBatchV2ResponseHeader.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/header/message/SendMessageBatchV2ResponseHeader.java
@@ -19,6 +19,7 @@
 
 import org.apache.eventmesh.common.protocol.http.common.ProtocolKey;
 import org.apache.eventmesh.common.protocol.http.header.Header;
+import org.apache.eventmesh.common.utils.IPUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -81,14 +82,13 @@ public void setEventMeshIdc(String eventMeshIdc) {
     }
 
     public static SendMessageBatchV2ResponseHeader buildHeader(Integer requestCode, String eventMeshCluster,
-                                                               String eventMeshIp, String eventMeshEnv,
-                                                               String eventMeshIDC) {
+                                                               String eventMeshEnv, String eventMeshIDC) {
         SendMessageBatchV2ResponseHeader header = new SendMessageBatchV2ResponseHeader();
         header.setCode(requestCode);
         header.setEventMeshCluster(eventMeshCluster);
         header.setEventMeshEnv(eventMeshEnv);
         header.setEventMeshIdc(eventMeshIDC);
-        header.setEventMeshIp(eventMeshIp);
+        header.setEventMeshIp(IPUtils.getLocalAddress());
         return header;
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Command.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Command.java
index 6381f29413..5e980a1b46 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Command.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Command.java
@@ -90,7 +90,7 @@ public enum Command {
         this.value = (byte) value;
     }
 
-    public byte value() {
+    public byte getValue() {
         return this.value;
     }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/OPStatus.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/OPStatus.java
index 4ecfd04dbc..b92803b3f5 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/OPStatus.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/OPStatus.java
@@ -29,23 +29,16 @@ public enum OPStatus {
         this.desc = desc;
     }
 
-    private Integer code;
+    private final Integer code;
 
-    private String desc;
+    private final String desc;
 
     public Integer getCode() {
         return code;
     }
 
-    public void setCode(Integer code) {
-        this.code = code;
-    }
-
     public String getDesc() {
         return desc;
     }
 
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Package.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Package.java
index 43c5d1a100..a0c3d9d89f 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Package.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/Package.java
@@ -20,21 +20,40 @@
 
 import org.apache.eventmesh.common.protocol.ProtocolTransportObject;
 
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
 public class Package implements ProtocolTransportObject {
 
-    private Header header;
+    private static final long serialVersionUID = 3353018029137072737L;
+    private transient Header header;
     private Object body;
 
+    public Header getHeader() {
+        return header;
+    }
+
+    public Object getBody() {
+        return body;
+    }
+
+
+    public void setHeader(Header header) {
+        this.header = header;
+    }
+
+    public void setBody(Object body) {
+        this.body = body;
+    }
+
+    public Package() {
+
+    }
+    
     public Package(Header header) {
         this.header = header;
     }
 
+    public Package(Header header, Object body) {
+        this.header = header;
+        this.body = body;
+    }
+
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/codec/Codec.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/codec/Codec.java
index 296d6c50ae..e3a2c6c307 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/codec/Codec.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/codec/Codec.java
@@ -29,21 +29,16 @@
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 
-import java.nio.charset.Charset;
 import java.util.Arrays;
 import java.util.List;
-import java.util.TimeZone;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.MessageToByteEncoder;
 import io.netty.handler.codec.ReplayingDecoder;
 
-import com.fasterxml.jackson.annotation.JsonInclude;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
 import com.google.common.base.Preconditions;
 
 import lombok.extern.slf4j.Slf4j;
@@ -56,22 +51,6 @@ public class Codec {
     private static final byte[] CONSTANT_MAGIC_FLAG = serializeBytes("EventMesh");
     private static final byte[] VERSION = serializeBytes("0000");
 
-    // todo: move to constants
-    public static final String CLOUD_EVENTS_PROTOCOL_NAME = "cloudevents";
-    public static final String EM_MESSAGE_PROTOCOL_NAME = "eventmeshmessage";
-    public static final String OPEN_MESSAGE_PROTOCOL_NAME = "openmessage";
-
-    // todo: use json util
-    private static ObjectMapper OBJECT_MAPPER;
-
-    static {
-        OBJECT_MAPPER = new ObjectMapper();
-        OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
-        OBJECT_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
-        OBJECT_MAPPER.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
-        OBJECT_MAPPER.setTimeZone(TimeZone.getDefault());
-    }
-
     public static class Encoder extends MessageToByteEncoder {
         @Override
         public void encode(ChannelHandlerContext ctx, Package pkg, ByteBuf out) throws Exception {
@@ -79,16 +58,16 @@ public void encode(ChannelHandlerContext ctx, Package pkg, ByteBuf out) throws E
             final Header header = pkg.getHeader();
             Preconditions.checkNotNull(header, "TcpPackage header cannot be null", header);
             if (log.isDebugEnabled()) {
-                log.debug("Encoder pkg={}", JsonUtils.serialize(pkg));
+                log.debug("Encoder pkg={}", JsonUtils.toJSONString(pkg));
             }
 
-            final byte[] headerData = serializeBytes(OBJECT_MAPPER.writeValueAsString(header));
+            final byte[] headerData = JsonUtils.toJSONBytes(header);
             final byte[] bodyData;
 
-            if (StringUtils.equals(CLOUD_EVENTS_PROTOCOL_NAME, header.getStringProperty(Constants.PROTOCOL_TYPE))) {
+            if (StringUtils.equals(Constants.CLOUD_EVENTS_PROTOCOL_NAME, header.getStringProperty(Constants.PROTOCOL_TYPE))) {
                 bodyData = (byte[]) pkg.getBody();
             } else {
-                bodyData = serializeBytes(OBJECT_MAPPER.writeValueAsString(pkg.getBody()));
+                bodyData = JsonUtils.toJSONBytes(pkg.getBody());
             }
 
             int headerLength = ArrayUtils.getLength(headerData);
@@ -134,7 +113,7 @@ public void decode(ChannelHandlerContext ctx, ByteBuf in, List out) thro
                 Package pkg = new Package(header, body);
                 out.add(pkg);
             } catch (Exception e) {
-                log.error("decode error| receive: {}.", deserializeBytes(in.array()));
+                log.error(String.format("decode error| receive: %s.", deserializeBytes(in.array())), e);
                 throw e;
             }
         }
@@ -160,7 +139,7 @@ private Header parseHeader(ByteBuf in, int headerLength) throws JsonProcessingEx
             if (log.isDebugEnabled()) {
                 log.debug("Decode headerJson={}", deserializeBytes(headerData));
             }
-            return OBJECT_MAPPER.readValue(deserializeBytes(headerData), Header.class);
+            return JsonUtils.parseObject(headerData, Header.class);
         }
 
         private Object parseBody(ByteBuf in, Header header, int bodyLength) throws JsonProcessingException {
@@ -177,8 +156,7 @@ private Object parseBody(ByteBuf in, Header header, int bodyLength) throws JsonP
 
         private void validateFlag(byte[] flagBytes, byte[] versionBytes, ChannelHandlerContext ctx) {
             if (!Arrays.equals(flagBytes, CONSTANT_MAGIC_FLAG) || !Arrays.equals(versionBytes, VERSION)) {
-                String errorMsg = String.format(
-                        "invalid magic flag or version|flag=%s|version=%s|remoteAddress=%s",
+                String errorMsg = String.format("invalid magic flag or version|flag=%s|version=%s|remoteAddress=%s",
                         deserializeBytes(flagBytes), deserializeBytes(versionBytes), ctx.channel().remoteAddress());
                 throw new IllegalArgumentException(errorMsg);
             }
@@ -190,10 +168,10 @@ private static Object deserializeBody(String bodyJsonString, Header header) thro
         switch (command) {
             case HELLO_REQUEST:
             case RECOMMEND_REQUEST:
-                return OBJECT_MAPPER.readValue(bodyJsonString, UserAgent.class);
+                return JsonUtils.parseObject(bodyJsonString, UserAgent.class);
             case SUBSCRIBE_REQUEST:
             case UNSUBSCRIBE_REQUEST:
-                return OBJECT_MAPPER.readValue(bodyJsonString, Subscription.class);
+                return JsonUtils.parseObject(bodyJsonString, Subscription.class);
             case REQUEST_TO_SERVER:
             case RESPONSE_TO_SERVER:
             case ASYNC_MESSAGE_TO_SERVER:
@@ -210,9 +188,11 @@ private static Object deserializeBody(String bodyJsonString, Header header) thro
                 // just a string.
                 return bodyJsonString;
             case REDIRECT_TO_CLIENT:
-                return OBJECT_MAPPER.readValue(bodyJsonString, RedirectInfo.class);
+                return JsonUtils.parseObject(bodyJsonString, RedirectInfo.class);
             default:
-                log.warn("Invalidate TCP command: {}", command);
+                if (log.isWarnEnabled()) {
+                    log.warn("Invalidate TCP command: {}", command);
+                }
                 return null;
         }
     }
@@ -235,10 +215,8 @@ private static String deserializeBytes(byte[] bytes) {
      */
     private static byte[] serializeBytes(String str) {
         if (str == null) {
-            return null;
+            return new byte[0];
         }
         return str.getBytes(Constants.DEFAULT_CHARSET);
     }
-
-
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java
index dd396e6420..3d25efdc43 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/EventmeshWorkflowGrpc.java
@@ -52,16 +52,17 @@ public static void registerAllExtensions(
   static {
     String[] descriptorData = {
       "\n\016workflow.proto\022\037eventmesh.workflow.api" +
-      ".protocol\"@\n\016ExecuteRequest\022\n\n\002id\030\001 \001(\t\022" +
-      "\023\n\013instance_id\030\002 \001(\t\022\r\n\005input\030\003 \001(\t\"&\n\017E" +
-      "xecuteResponse\022\023\n\013instance_id\030\001 \001(\t2z\n\010W" +
-      "orkflow\022n\n\007Execute\022/.eventmesh.workflow." +
-      "api.protocol.ExecuteRequest\0320.eventmesh." +
-      "workflow.api.protocol.ExecuteResponse\"\000B" +
-      "\226\001\n4org.apache.eventmesh.common.protocol" +
-      ".workflow.protosB\025EventmeshWorkflowGrpcP" +
-      "\001ZEgithub.com/apache/incubator-eventmesh" +
-      "/eventmesh-workflow-go/api/protob\006proto3"
+      ".protocol\"Z\n\016ExecuteRequest\022\n\n\002id\030\001 \001(\t\022" +
+      "\023\n\013instance_id\030\002 \001(\t\022\030\n\020task_instance_id" +
+      "\030\003 \001(\t\022\r\n\005input\030\004 \001(\t\"&\n\017ExecuteResponse" +
+      "\022\023\n\013instance_id\030\001 \001(\t2z\n\010Workflow\022n\n\007Exe" +
+      "cute\022/.eventmesh.workflow.api.protocol.E" +
+      "xecuteRequest\0320.eventmesh.workflow.api.p" +
+      "rotocol.ExecuteResponse\"\000B\226\001\n4org.apache" +
+      ".eventmesh.common.protocol.workflow.prot" +
+      "osB\025EventmeshWorkflowGrpcP\001ZEgithub.com/" +
+      "apache/incubator-eventmesh/eventmesh-wor" +
+      "kflow-go/api/protob\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -72,7 +73,7 @@ public static void registerAllExtensions(
     internal_static_eventmesh_workflow_api_protocol_ExecuteRequest_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_eventmesh_workflow_api_protocol_ExecuteRequest_descriptor,
-        new String[] { "Id", "InstanceId", "Input", });
+        new String[] { "Id", "InstanceId", "TaskInstanceId", "Input", });
     internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_fieldAccessorTable = new
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java
index b8b8f38e13..e6d6418830 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequest.java
@@ -36,6 +36,7 @@ private ExecuteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder
   private ExecuteRequest() {
     id_ = "";
     instanceId_ = "";
+    taskInstanceId_ = "";
     input_ = "";
   }
 
@@ -84,6 +85,12 @@ private ExecuteRequest(
           case 26: {
             String s = input.readStringRequireUtf8();
 
+            taskInstanceId_ = s;
+            break;
+          }
+          case 34: {
+            String s = input.readStringRequireUtf8();
+
             input_ = s;
             break;
           }
@@ -195,10 +202,48 @@ public String getInstanceId() {
     }
   }
 
-  public static final int INPUT_FIELD_NUMBER = 3;
+  public static final int TASK_INSTANCE_ID_FIELD_NUMBER = 3;
+  private volatile Object taskInstanceId_;
+  /**
+   * string task_instance_id = 3;
+   * @return The taskInstanceId.
+   */
+  @Override
+  public String getTaskInstanceId() {
+    Object ref = taskInstanceId_;
+    if (ref instanceof String) {
+      return (String) ref;
+    } else {
+      com.google.protobuf.ByteString bs = 
+          (com.google.protobuf.ByteString) ref;
+      String s = bs.toStringUtf8();
+      taskInstanceId_ = s;
+      return s;
+    }
+  }
+  /**
+   * string task_instance_id = 3;
+   * @return The bytes for taskInstanceId.
+   */
+  @Override
+  public com.google.protobuf.ByteString
+      getTaskInstanceIdBytes() {
+    Object ref = taskInstanceId_;
+    if (ref instanceof String) {
+      com.google.protobuf.ByteString b = 
+          com.google.protobuf.ByteString.copyFromUtf8(
+              (String) ref);
+      taskInstanceId_ = b;
+      return b;
+    } else {
+      return (com.google.protobuf.ByteString) ref;
+    }
+  }
+
+  public static final int INPUT_FIELD_NUMBER = 4;
   private volatile Object input_;
   /**
-   * string input = 3;
+   * string input = 4;
    * @return The input.
    */
   @Override
@@ -215,7 +260,7 @@ public String getInput() {
     }
   }
   /**
-   * string input = 3;
+   * string input = 4;
    * @return The bytes for input.
    */
   @Override
@@ -253,8 +298,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
     if (!getInstanceIdBytes().isEmpty()) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_);
     }
+    if (!getTaskInstanceIdBytes().isEmpty()) {
+      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, taskInstanceId_);
+    }
     if (!getInputBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, input_);
+      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, input_);
     }
     unknownFields.writeTo(output);
   }
@@ -271,8 +319,11 @@ public int getSerializedSize() {
     if (!getInstanceIdBytes().isEmpty()) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_);
     }
+    if (!getTaskInstanceIdBytes().isEmpty()) {
+      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, taskInstanceId_);
+    }
     if (!getInputBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, input_);
+      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, input_);
     }
     size += unknownFields.getSerializedSize();
     memoizedSize = size;
@@ -293,6 +344,8 @@ public boolean equals(final Object obj) {
         .equals(other.getId())) return false;
     if (!getInstanceId()
         .equals(other.getInstanceId())) return false;
+    if (!getTaskInstanceId()
+        .equals(other.getTaskInstanceId())) return false;
     if (!getInput()
         .equals(other.getInput())) return false;
     if (!unknownFields.equals(other.unknownFields)) return false;
@@ -310,6 +363,8 @@ public int hashCode() {
     hash = (53 * hash) + getId().hashCode();
     hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER;
     hash = (53 * hash) + getInstanceId().hashCode();
+    hash = (37 * hash) + TASK_INSTANCE_ID_FIELD_NUMBER;
+    hash = (53 * hash) + getTaskInstanceId().hashCode();
     hash = (37 * hash) + INPUT_FIELD_NUMBER;
     hash = (53 * hash) + getInput().hashCode();
     hash = (29 * hash) + unknownFields.hashCode();
@@ -404,8 +459,7 @@ public Builder toBuilder() {
   @Override
   protected Builder newBuilderForType(
       BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
+    return new Builder(parent);
   }
   /**
    * Protobuf type {@code eventmesh.workflow.api.protocol.ExecuteRequest}
@@ -449,6 +503,8 @@ public Builder clear() {
 
       instanceId_ = "";
 
+      taskInstanceId_ = "";
+
       input_ = "";
 
       return this;
@@ -479,6 +535,7 @@ public ExecuteRequest buildPartial() {
       ExecuteRequest result = new ExecuteRequest(this);
       result.id_ = id_;
       result.instanceId_ = instanceId_;
+      result.taskInstanceId_ = taskInstanceId_;
       result.input_ = input_;
       onBuilt();
       return result;
@@ -536,6 +593,10 @@ public Builder mergeFrom(ExecuteRequest other) {
         instanceId_ = other.instanceId_;
         onChanged();
       }
+      if (!other.getTaskInstanceId().isEmpty()) {
+        taskInstanceId_ = other.taskInstanceId_;
+        onChanged();
+      }
       if (!other.getInput().isEmpty()) {
         input_ = other.input_;
         onChanged();
@@ -721,9 +782,85 @@ public Builder setInstanceIdBytes(
       return this;
     }
 
+    private Object taskInstanceId_ = "";
+    /**
+     * string task_instance_id = 3;
+     * @return The taskInstanceId.
+     */
+    public String getTaskInstanceId() {
+      Object ref = taskInstanceId_;
+      if (!(ref instanceof String)) {
+        com.google.protobuf.ByteString bs =
+            (com.google.protobuf.ByteString) ref;
+        String s = bs.toStringUtf8();
+        taskInstanceId_ = s;
+        return s;
+      } else {
+        return (String) ref;
+      }
+    }
+    /**
+     * string task_instance_id = 3;
+     * @return The bytes for taskInstanceId.
+     */
+    public com.google.protobuf.ByteString
+        getTaskInstanceIdBytes() {
+      Object ref = taskInstanceId_;
+      if (ref instanceof String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (String) ref);
+        taskInstanceId_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+    /**
+     * string task_instance_id = 3;
+     * @param value The taskInstanceId to set.
+     * @return This builder for chaining.
+     */
+    public Builder setTaskInstanceId(
+        String value) {
+      if (value == null) {
+    throw new NullPointerException();
+  }
+  
+      taskInstanceId_ = value;
+      onChanged();
+      return this;
+    }
+    /**
+     * string task_instance_id = 3;
+     * @return This builder for chaining.
+     */
+    public Builder clearTaskInstanceId() {
+      
+      taskInstanceId_ = getDefaultInstance().getTaskInstanceId();
+      onChanged();
+      return this;
+    }
+    /**
+     * string task_instance_id = 3;
+     * @param value The bytes for taskInstanceId to set.
+     * @return This builder for chaining.
+     */
+    public Builder setTaskInstanceIdBytes(
+        com.google.protobuf.ByteString value) {
+      if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+      
+      taskInstanceId_ = value;
+      onChanged();
+      return this;
+    }
+
     private Object input_ = "";
     /**
-     * string input = 3;
+     * string input = 4;
      * @return The input.
      */
     public String getInput() {
@@ -739,7 +876,7 @@ public String getInput() {
       }
     }
     /**
-     * string input = 3;
+     * string input = 4;
      * @return The bytes for input.
      */
     public com.google.protobuf.ByteString
@@ -756,7 +893,7 @@ public String getInput() {
       }
     }
     /**
-     * string input = 3;
+     * string input = 4;
      * @param value The input to set.
      * @return This builder for chaining.
      */
@@ -771,7 +908,7 @@ public Builder setInput(
       return this;
     }
     /**
-     * string input = 3;
+     * string input = 4;
      * @return This builder for chaining.
      */
     public Builder clearInput() {
@@ -781,7 +918,7 @@ public Builder clearInput() {
       return this;
     }
     /**
-     * string input = 3;
+     * string input = 4;
      * @param value The bytes for input to set.
      * @return This builder for chaining.
      */
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java
index c882835b28..2a6c536268 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteRequestOrBuilder.java
@@ -50,12 +50,24 @@ public interface ExecuteRequestOrBuilder extends
       getInstanceIdBytes();
 
   /**
-   * string input = 3;
+   * string task_instance_id = 3;
+   * @return The taskInstanceId.
+   */
+  String getTaskInstanceId();
+  /**
+   * string task_instance_id = 3;
+   * @return The bytes for taskInstanceId.
+   */
+  com.google.protobuf.ByteString
+      getTaskInstanceIdBytes();
+
+  /**
+   * string input = 4;
    * @return The input.
    */
   String getInput();
   /**
-   * string input = 3;
+   * string input = 4;
    * @return The bytes for input.
    */
   com.google.protobuf.ByteString
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteResponse.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteResponse.java
index d3e5fd8bcc..c141b684d6 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteResponse.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/workflow/protos/ExecuteResponse.java
@@ -20,556 +20,557 @@
 
 package org.apache.eventmesh.common.protocol.workflow.protos;
 
+import java.util.Objects;
+
+import com.google.protobuf.ByteString;
+
 /**
  * Protobuf type {@code eventmesh.workflow.api.protocol.ExecuteResponse}
  */
 @SuppressWarnings({"all"})
-public final class ExecuteResponse extends
-    com.google.protobuf.GeneratedMessageV3 implements
-    // @@protoc_insertion_point(message_implements:eventmesh.workflow.api.protocol.ExecuteResponse)
-    ExecuteResponseOrBuilder {
-private static final long serialVersionUID = 0L;
-  // Use ExecuteResponse.newBuilder() to construct.
-  private ExecuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-    super(builder);
-  }
-  private ExecuteResponse() {
-    instanceId_ = "";
-  }
-
-  @Override
-  @SuppressWarnings({"unused"})
-  protected Object newInstance(
-      UnusedPrivateParameter unused) {
-    return new ExecuteResponse();
-  }
-
-  @Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
-    return this.unknownFields;
-  }
-  private ExecuteResponse(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new NullPointerException();
-    }
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          case 10: {
-            String s = input.readStringRequireUtf8();
-
-            instanceId_ = s;
-            break;
-          }
-          default: {
-            if (!parseUnknownField(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
-            }
-            break;
-          }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor;
-  }
-
-  @Override
-  protected FieldAccessorTable
-      internalGetFieldAccessorTable() {
-    return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_fieldAccessorTable
-        .ensureFieldAccessorsInitialized(
-            ExecuteResponse.class, Builder.class);
-  }
-
-  public static final int INSTANCE_ID_FIELD_NUMBER = 1;
-  private volatile Object instanceId_;
-  /**
-   * string instance_id = 1;
-   * @return The instanceId.
-   */
-  @Override
-  public String getInstanceId() {
-    Object ref = instanceId_;
-    if (ref instanceof String) {
-      return (String) ref;
-    } else {
-      com.google.protobuf.ByteString bs = 
-          (com.google.protobuf.ByteString) ref;
-      String s = bs.toStringUtf8();
-      instanceId_ = s;
-      return s;
-    }
-  }
-  /**
-   * string instance_id = 1;
-   * @return The bytes for instanceId.
-   */
-  @Override
-  public com.google.protobuf.ByteString
-      getInstanceIdBytes() {
-    Object ref = instanceId_;
-    if (ref instanceof String) {
-      com.google.protobuf.ByteString b = 
-          com.google.protobuf.ByteString.copyFromUtf8(
-              (String) ref);
-      instanceId_ = b;
-      return b;
-    } else {
-      return (com.google.protobuf.ByteString) ref;
-    }
-  }
-
-  private byte memoizedIsInitialized = -1;
-  @Override
-  public final boolean isInitialized() {
-    byte isInitialized = memoizedIsInitialized;
-    if (isInitialized == 1) return true;
-    if (isInitialized == 0) return false;
-
-    memoizedIsInitialized = 1;
-    return true;
-  }
-
-  @Override
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
-    if (!getInstanceIdBytes().isEmpty()) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_);
-    }
-    unknownFields.writeTo(output);
-  }
-
-  @Override
-  public int getSerializedSize() {
-    int size = memoizedSize;
-    if (size != -1) return size;
-
-    size = 0;
-    if (!getInstanceIdBytes().isEmpty()) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_);
-    }
-    size += unknownFields.getSerializedSize();
-    memoizedSize = size;
-    return size;
-  }
-
-  @Override
-  public boolean equals(final Object obj) {
-    if (obj == this) {
-     return true;
-    }
-    if (!(obj instanceof ExecuteResponse)) {
-      return super.equals(obj);
-    }
-    ExecuteResponse other = (ExecuteResponse) obj;
-
-    if (!getInstanceId()
-        .equals(other.getInstanceId())) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    if (memoizedHashCode != 0) {
-      return memoizedHashCode;
-    }
-    int hash = 41;
-    hash = (19 * hash) + getDescriptor().hashCode();
-    hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER;
-    hash = (53 * hash) + getInstanceId().hashCode();
-    hash = (29 * hash) + unknownFields.hashCode();
-    memoizedHashCode = hash;
-    return hash;
-  }
-
-  public static ExecuteResponse parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static ExecuteResponse parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static ExecuteResponse parseFrom(
-      com.google.protobuf.ByteString data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static ExecuteResponse parseFrom(
-      com.google.protobuf.ByteString data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static ExecuteResponse parseFrom(byte[] data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data);
-  }
-  public static ExecuteResponse parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    return PARSER.parseFrom(data, extensionRegistry);
-  }
-  public static ExecuteResponse parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static ExecuteResponse parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static ExecuteResponse parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
-  }
-  public static ExecuteResponse parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-  }
-  public static ExecuteResponse parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
-  }
-  public static ExecuteResponse parseFrom(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
-  }
-
-  @Override
-  public Builder newBuilderForType() { return newBuilder(); }
-  public static Builder newBuilder() {
-    return DEFAULT_INSTANCE.toBuilder();
-  }
-  public static Builder newBuilder(ExecuteResponse prototype) {
-    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-  }
-  @Override
-  public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
-  }
-
-  @Override
-  protected Builder newBuilderForType(
-      BuilderParent parent) {
-    Builder builder = new Builder(parent);
-    return builder;
-  }
-  /**
-   * Protobuf type {@code eventmesh.workflow.api.protocol.ExecuteResponse}
-   */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
-      // @@protoc_insertion_point(builder_implements:eventmesh.workflow.api.protocol.ExecuteResponse)
-      ExecuteResponseOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor;
-    }
+public final class ExecuteResponse extends com.google.protobuf.GeneratedMessageV3 implements ExecuteResponseOrBuilder {
 
-    @Override
-    protected FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              ExecuteResponse.class, Builder.class);
-    }
+    private static final long serialVersionUID = -6807939196493979674L;
 
-    // Construct using org.apache.eventmesh.common.protocol.workflow.protos.ExecuteResponse.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
+    public static final int INSTANCE_ID_FIELD_NUMBER = 1;
+    private volatile String instanceId;
+
+    private byte memoizedIsInitialized = -1;
+
+    // Use ExecuteResponse.newBuilder() to construct.
+    private ExecuteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        super(builder);
     }
 
-    private Builder(
-        BuilderParent parent) {
-      super(parent);
-      maybeForceBuilderInitialization();
+    private ExecuteResponse() {
+        instanceId = "";
     }
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
+
+    @Override
+    @SuppressWarnings({"unused"})
+    protected Object newInstance(UnusedPrivateParameter unused) {
+        return new ExecuteResponse();
     }
+
     @Override
-    public Builder clear() {
-      super.clear();
-      instanceId_ = "";
+    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+        return this.unknownFields;
+    }
+
+    private ExecuteResponse(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        this();
+        Objects.requireNonNull(extensionRegistry, "ExtensionRegistryLite can not be null");
+        Objects.requireNonNull(input, "CodedInputStream can not be null");
+
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+                com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+            boolean done = false;
+            while (!done) {
+                int tag = input.readTag();
+                switch (tag) {
+                    case 0:
+                        done = true;
+                        break;
+                    case 10: {
+                        instanceId = input.readStringRequireUtf8();
+                        break;
+                    }
+                    default: {
+                        if (!parseUnknownField(
+                                input, unknownFields, extensionRegistry, tag)) {
+                            done = true;
+                        }
+                        break;
+                    }
+                }
+            }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(
+                    e).setUnfinishedMessage(this);
+        } finally {
+            this.unknownFields = unknownFields.build();
+            makeExtensionsImmutable();
+        }
+    }
 
-      return this;
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+        return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor;
     }
 
     @Override
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor;
+    protected FieldAccessorTable internalGetFieldAccessorTable() {
+        return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_fieldAccessorTable
+                .ensureFieldAccessorsInitialized(ExecuteResponse.class, Builder.class);
     }
 
+
+    /**
+     * string instance_id = 1;
+     *
+     * @return The instanceId.
+     */
     @Override
-    public ExecuteResponse getDefaultInstanceForType() {
-      return ExecuteResponse.getDefaultInstance();
+    public String getInstanceId() {
+        return instanceId;
     }
 
+    /**
+     * string instance_id = 1;
+     *
+     * @return The bytes for instanceId.
+     */
     @Override
-    public ExecuteResponse build() {
-      ExecuteResponse result = buildPartial();
-      if (!result.isInitialized()) {
-        throw newUninitializedMessageException(result);
-      }
-      return result;
+    public com.google.protobuf.ByteString getInstanceIdBytes() {
+        return ByteString.copyFromUtf8(instanceId);
     }
 
+
     @Override
-    public ExecuteResponse buildPartial() {
-      ExecuteResponse result = new ExecuteResponse(this);
-      result.instanceId_ = instanceId_;
-      onBuilt();
-      return result;
+    public final boolean isInitialized() {
+        if (memoizedIsInitialized == 1) {
+            return true;
+        }
+
+        if (memoizedIsInitialized == 0) {
+            return false;
+        }
+
+        memoizedIsInitialized = 1;
+        return true;
     }
 
     @Override
-    public Builder clone() {
-      return super.clone();
+    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+        if (!getInstanceIdBytes().isEmpty()) {
+            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId);
+        }
+        unknownFields.writeTo(output);
     }
+
     @Override
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return super.setField(field, value);
+    public int getSerializedSize() {
+        int size = memoizedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (!getInstanceIdBytes().isEmpty()) {
+            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId);
+        }
+        size += unknownFields.getSerializedSize();
+        memoizedSize = size;
+        return size;
     }
+
     @Override
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return super.clearField(field);
+    public boolean equals(final Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof ExecuteResponse)) {
+            return super.equals(obj);
+        }
+        ExecuteResponse other = (ExecuteResponse) obj;
+
+        if (!getInstanceId()
+                .equals(other.getInstanceId())) return false;
+        if (!unknownFields.equals(other.unknownFields)) return false;
+        return true;
     }
+
     @Override
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return super.clearOneof(oneof);
+    public int hashCode() {
+        if (memoizedHashCode != 0) {
+            return memoizedHashCode;
+        }
+        int hash = 41;
+        hash = (19 * hash) + getDescriptor().hashCode();
+        hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER;
+        hash = (53 * hash) + getInstanceId().hashCode();
+        hash = (29 * hash) + unknownFields.hashCode();
+        memoizedHashCode = hash;
+        return hash;
     }
-    @Override
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, Object value) {
-      return super.setRepeatedField(field, index, value);
+
+    public static ExecuteResponse parseFrom(
+            java.nio.ByteBuffer data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    @Override
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        Object value) {
-      return super.addRepeatedField(field, value);
+
+    public static ExecuteResponse parseFrom(
+            java.nio.ByteBuffer data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    @Override
-    public Builder mergeFrom(com.google.protobuf.Message other) {
-      if (other instanceof ExecuteResponse) {
-        return mergeFrom((ExecuteResponse)other);
-      } else {
-        super.mergeFrom(other);
-        return this;
-      }
-    }
-
-    public Builder mergeFrom(ExecuteResponse other) {
-      if (other == ExecuteResponse.getDefaultInstance()) return this;
-      if (!other.getInstanceId().isEmpty()) {
-        instanceId_ = other.instanceId_;
-        onChanged();
-      }
-      this.mergeUnknownFields(other.unknownFields);
-      onChanged();
-      return this;
+
+    public static ExecuteResponse parseFrom(
+            com.google.protobuf.ByteString data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
 
-    @Override
-    public final boolean isInitialized() {
-      return true;
+    public static ExecuteResponse parseFrom(
+            com.google.protobuf.ByteString data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
 
-    @Override
-    public Builder mergeFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      ExecuteResponse parsedMessage = null;
-      try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (ExecuteResponse) e.getUnfinishedMessage();
-        throw e.unwrapIOException();
-      } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
-      return this;
-    }
-
-    private Object instanceId_ = "";
-    /**
-     * string instance_id = 1;
-     * @return The instanceId.
-     */
-    public String getInstanceId() {
-      Object ref = instanceId_;
-      if (!(ref instanceof String)) {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        instanceId_ = s;
-        return s;
-      } else {
-        return (String) ref;
-      }
+    public static ExecuteResponse parseFrom(byte[] data)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
     }
-    /**
-     * string instance_id = 1;
-     * @return The bytes for instanceId.
-     */
-    public com.google.protobuf.ByteString
-        getInstanceIdBytes() {
-      Object ref = instanceId_;
-      if (ref instanceof String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (String) ref);
-        instanceId_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+
+    public static ExecuteResponse parseFrom(
+            byte[] data,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
     }
-    /**
-     * string instance_id = 1;
-     * @param value The instanceId to set.
-     * @return This builder for chaining.
-     */
-    public Builder setInstanceId(
-        String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  
-      instanceId_ = value;
-      onChanged();
-      return this;
+
+    public static ExecuteResponse parseFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
     }
-    /**
-     * string instance_id = 1;
-     * @return This builder for chaining.
-     */
-    public Builder clearInstanceId() {
-      
-      instanceId_ = getDefaultInstance().getInstanceId();
-      onChanged();
-      return this;
+
+    public static ExecuteResponse parseFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    /**
-     * string instance_id = 1;
-     * @param value The bytes for instanceId to set.
-     * @return This builder for chaining.
-     */
-    public Builder setInstanceIdBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      
-      instanceId_ = value;
-      onChanged();
-      return this;
+
+    public static ExecuteResponse parseDelimitedFrom(java.io.InputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input);
     }
+
+    public static ExecuteResponse parseDelimitedFrom(
+            java.io.InputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public static ExecuteResponse parseFrom(
+            com.google.protobuf.CodedInputStream input)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input);
+    }
+
+    public static ExecuteResponse parseFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+        return com.google.protobuf.GeneratedMessageV3
+                .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
     @Override
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFields(unknownFields);
+    public Builder newBuilderForType() {
+        return newBuilder();
+    }
+
+    public static Builder newBuilder() {
+        return DEFAULT_INSTANCE.toBuilder();
+    }
+
+    public static Builder newBuilder(ExecuteResponse prototype) {
+        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+
+    @Override
+    public Builder toBuilder() {
+        return this == DEFAULT_INSTANCE
+                ? new Builder() : new Builder().mergeFrom(this);
     }
 
     @Override
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
+    protected Builder newBuilderForType(
+            BuilderParent parent) {
+        return new Builder(parent);
     }
 
+    /**
+     * Protobuf type {@code eventmesh.workflow.api.protocol.ExecuteResponse}
+     */
+    public static final class Builder extends
+            com.google.protobuf.GeneratedMessageV3.Builder implements
+            ExecuteResponseOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+            return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor;
+        }
+
+        @Override
+        protected FieldAccessorTable internalGetFieldAccessorTable() {
+            return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_fieldAccessorTable
+                    .ensureFieldAccessorsInitialized(
+                            ExecuteResponse.class, Builder.class);
+        }
+
+        // Construct using org.apache.eventmesh.common.protocol.workflow.protos.ExecuteResponse.newBuilder()
+        private Builder() {
+            maybeForceBuilderInitialization();
+        }
 
-    // @@protoc_insertion_point(builder_scope:eventmesh.workflow.api.protocol.ExecuteResponse)
-  }
+        private Builder(BuilderParent parent) {
+            super(parent);
+            maybeForceBuilderInitialization();
+        }
+
+        private void maybeForceBuilderInitialization() {
+            if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+            }
+        }
+
+        @Override
+        public Builder clear() {
+            super.clear();
+            instanceId = "";
+            return this;
+        }
+
+        @Override
+        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+            return EventmeshWorkflowGrpc.internal_static_eventmesh_workflow_api_protocol_ExecuteResponse_descriptor;
+        }
+
+        @Override
+        public ExecuteResponse getDefaultInstanceForType() {
+            return ExecuteResponse.getDefaultInstance();
+        }
 
-  // @@protoc_insertion_point(class_scope:eventmesh.workflow.api.protocol.ExecuteResponse)
-  private static final ExecuteResponse DEFAULT_INSTANCE;
-  static {
-    DEFAULT_INSTANCE = new ExecuteResponse();
-  }
+        @Override
+        public ExecuteResponse build() {
+            ExecuteResponse result = buildPartial();
+            if (!result.isInitialized()) {
+                throw newUninitializedMessageException(result);
+            }
+            return result;
+        }
+
+        @Override
+        public ExecuteResponse buildPartial() {
+            ExecuteResponse result = new ExecuteResponse(this);
+            result.instanceId = instanceId;
+            onBuilt();
+            return result;
+        }
+
+        @Override
+        public Builder clone() {
+            return super.clone();
+        }
+
+        @Override
+        public Builder setField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return super.setField(field, value);
+        }
+
+        @Override
+        public Builder clearField(
+                com.google.protobuf.Descriptors.FieldDescriptor field) {
+            return super.clearField(field);
+        }
+
+        @Override
+        public Builder clearOneof(
+                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+            return super.clearOneof(oneof);
+        }
+
+        @Override
+        public Builder setRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                int index, Object value) {
+            return super.setRepeatedField(field, index, value);
+        }
+
+        @Override
+        public Builder addRepeatedField(
+                com.google.protobuf.Descriptors.FieldDescriptor field,
+                Object value) {
+            return super.addRepeatedField(field, value);
+        }
+
+        @Override
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+            Objects.requireNonNull(other, "Message can not be null");
+
+            if (other instanceof ExecuteResponse) {
+                return mergeFrom((ExecuteResponse) other);
+            } else {
+                super.mergeFrom(other);
+                return this;
+            }
+        }
 
-  public static ExecuteResponse getDefaultInstance() {
-    return DEFAULT_INSTANCE;
-  }
+        public Builder mergeFrom(ExecuteResponse other) {
+            Objects.requireNonNull(other, "ExecuteResponse can not be null");
+
+            if (other == ExecuteResponse.getDefaultInstance()) return this;
+            if (!other.getInstanceId().isEmpty()) {
+                instanceId = other.instanceId;
+                onChanged();
+            }
+            this.mergeUnknownFields(other.unknownFields);
+            onChanged();
+            return this;
+        }
+
+        @Override
+        public final boolean isInitialized() {
+            return true;
+        }
+
+        @Override
+        public Builder mergeFrom(
+                com.google.protobuf.CodedInputStream input,
+                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                throws java.io.IOException {
+            Objects.requireNonNull(input, "CodedInputStream can not be null");
+            Objects.requireNonNull(extensionRegistry, "ExtensionRegistryLite can not be null");
+
+            ExecuteResponse parsedMessage = null;
+            try {
+                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                parsedMessage = (ExecuteResponse) e.getUnfinishedMessage();
+                throw e.unwrapIOException();
+            } finally {
+                if (parsedMessage != null) {
+                    mergeFrom(parsedMessage);
+                }
+            }
+
+            return this;
+        }
+
+        private String instanceId = "";
+
+        /**
+         * string instance_id = 1;
+         *
+         * @return The instanceId.
+         */
+        public String getInstanceId() {
+            return instanceId;
+        }
+
+        /**
+         * string instance_id = 1;
+         *
+         * @return The bytes for instanceId.
+         */
+        public com.google.protobuf.ByteString getInstanceIdBytes() {
+            return ByteString.copyFromUtf8(instanceId);
+        }
+
+        /**
+         * string instance_id = 1;
+         *
+         * @param value The instanceId to set.
+         * @return This builder for chaining.
+         */
+        public Builder setInstanceId(
+                String value) {
+            Objects.requireNonNull(value, "InstanceId can not be null");
+            instanceId = value;
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string instance_id = 1;
+         *
+         * @return This builder for chaining.
+         */
+        public Builder clearInstanceId() {
+            instanceId = getDefaultInstance().getInstanceId();
+            onChanged();
+            return this;
+        }
+
+        /**
+         * string instance_id = 1;
+         *
+         * @param value The bytes for instanceId to set.
+         * @return This builder for chaining.
+         */
+        public Builder setInstanceIdBytes(
+                com.google.protobuf.ByteString value) {
+            Objects.requireNonNull(value, "ByteString can not be null");
+            checkByteStringIsUtf8(value);
+            instanceId = value.toStringUtf8();
+            onChanged();
+            return this;
+        }
+
+        @Override
+        public final Builder setUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.setUnknownFields(unknownFields);
+        }
+
+        @Override
+        public final Builder mergeUnknownFields(
+                final com.google.protobuf.UnknownFieldSet unknownFields) {
+            return super.mergeUnknownFields(unknownFields);
+        }
+
+
+        // @@protoc_insertion_point(builder_scope:eventmesh.workflow.api.protocol.ExecuteResponse)
+    }
+
+    // @@protoc_insertion_point(class_scope:eventmesh.workflow.api.protocol.ExecuteResponse)
+    private static final ExecuteResponse DEFAULT_INSTANCE;
+
+    static {
+        DEFAULT_INSTANCE = new ExecuteResponse();
+    }
+
+    public static ExecuteResponse getDefaultInstance() {
+        return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser PARSER =
+            new com.google.protobuf.AbstractParser() {
+                @Override
+                public ExecuteResponse parsePartialFrom(
+                        com.google.protobuf.CodedInputStream input,
+                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+                        throws com.google.protobuf.InvalidProtocolBufferException {
+                    return new ExecuteResponse(input, extensionRegistry);
+                }
+            };
+
+    public static com.google.protobuf.Parser parser() {
+        return PARSER;
+    }
 
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
     @Override
-    public ExecuteResponse parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new ExecuteResponse(input, extensionRegistry);
-    }
-  };
-
-  public static com.google.protobuf.Parser parser() {
-    return PARSER;
-  }
-
-  @Override
-  public com.google.protobuf.Parser getParserForType() {
-    return PARSER;
-  }
-
-  @Override
-  public ExecuteResponse getDefaultInstanceForType() {
-    return DEFAULT_INSTANCE;
-  }
+    public com.google.protobuf.Parser getParserForType() {
+        return PARSER;
+    }
+
+    @Override
+    public ExecuteResponse getDefaultInstanceForType() {
+        return DEFAULT_INSTANCE;
+    }
 
 }
 
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/AssertUtils.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/AssertUtils.java
new file mode 100644
index 0000000000..0ba8745923
--- /dev/null
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/AssertUtils.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.common.utils;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Objects;
+
+/**
+ * Assert
+ */
+public final class AssertUtils {
+
+    /**
+     * assert obj not null
+     *
+     * @param obj     obj
+     * @param message error message
+     */
+    public static void notNull(final Object obj, final String message) {
+        isTrue(Objects.nonNull(obj), message);
+    }
+
+    /**
+     * assert test is true
+     *
+     * @param test    test
+     * @param message error message
+     */
+    public static void isTrue(final Boolean test, final String message) {
+        if (!Boolean.TRUE.equals(test)) {
+            throw new IllegalArgumentException(message);
+        }
+    }
+
+    /**
+     * assert str is not black
+     * @param str str
+     * @param message message
+     */
+    public static void notBlack(final String str, final String message) {
+        isTrue(StringUtils.isNoneBlank(str), message);
+    }
+
+
+}
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ConfigurationContextUtil.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ConfigurationContextUtil.java
index 7478970d17..a7535f70ba 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ConfigurationContextUtil.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ConfigurationContextUtil.java
@@ -33,7 +33,6 @@ public class ConfigurationContextUtil {
     private static final ConcurrentHashMap CONFIGURATION_MAP = new ConcurrentHashMap<>();
 
     public static final String HTTP = "HTTP";
-
     public static final String TCP = "TCP";
     public static final String GRPC = "GRPC";
 
@@ -57,7 +56,7 @@ public static void putIfAbsent(String key, CommonConfiguration configuration) {
      * Get the configuration of the specified key mapping.
      *
      * @param key
-     * @return
+     * @return configuration of the specified key mapping
      */
     public static CommonConfiguration get(String key) {
         return CONFIGURATION_MAP.get(key);
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/IPUtils.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/IPUtils.java
index 2ee98daed0..4676d92cb9 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/IPUtils.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/IPUtils.java
@@ -28,24 +28,24 @@
 import java.net.URL;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import io.netty.channel.Channel;
 
+
+import lombok.extern.slf4j.Slf4j;
+
 import inet.ipaddr.HostName;
 import inet.ipaddr.IPAddress;
 import inet.ipaddr.IPAddressString;
 
+@Slf4j
 public class IPUtils {
 
-    private static final Logger logger = LoggerFactory.getLogger(IPUtils.class);
-
     public static String getLocalAddress() {
         // if the progress works under docker environment
         // return the host ip about this docker located from environment value
@@ -56,23 +56,18 @@ public static String getLocalAddress() {
 
         //priority of networkInterface when generating client ip
         String priority = System.getProperty("networkInterface.priority", "eth0 preferList = new ArrayList();
-        for (String eth : priority.split("<")) {
-            preferList.add(eth);
-        }
+        List list = Arrays.asList(priority.split("<"));
+        ArrayList preferList = new ArrayList<>(list);
         NetworkInterface preferNetworkInterface = null;
 
         try {
             Enumeration enumeration1 = NetworkInterface.getNetworkInterfaces();
             while (enumeration1.hasMoreElements()) {
                 final NetworkInterface networkInterface = enumeration1.nextElement();
-                if (!preferList.contains(networkInterface.getName())) {
-                    continue;
-                } else if (preferNetworkInterface == null) {
+                if (preferNetworkInterface == null) {
                     preferNetworkInterface = networkInterface;
                 } else if (preferList.indexOf(networkInterface.getName()) //get the networkInterface that has higher priority
-                        > preferList.indexOf(preferNetworkInterface.getName())) {
+                    > preferList.indexOf(preferNetworkInterface.getName())) {
                     preferNetworkInterface = networkInterface;
                 }
             }
@@ -96,11 +91,9 @@ public static String getLocalAddress() {
             // prefer ipv4
             if (!ipv4Result.isEmpty()) {
                 for (String ip : ipv4Result) {
-                    if (ip.startsWith("127.0") || ip.startsWith("192.168") || !isValidIPV4Address(ip)) {
-                        continue;
+                    if (isValidIPV4Address(ip) && !ip.startsWith("127.0") && !ip.startsWith("192.168")) {
+                        return ip;
                     }
-
-                    return ip;
                 }
 
                 return ipv4Result.get(ipv4Result.size() - 1);
@@ -110,12 +103,9 @@ public static String getLocalAddress() {
             //If failed to find,fall back to localhost
             final InetAddress localHost = InetAddress.getLocalHost();
             return normalizeHostAddress(localHost);
-        } catch (SocketException e) {
-            e.printStackTrace();
-        } catch (UnknownHostException e) {
-            e.printStackTrace();
+        } catch (SocketException | UnknownHostException e) {
+            log.error("socket or unknown host exception:", e);
         }
-
         return null;
     }
 
@@ -123,14 +113,14 @@ public static boolean isValidIPV4Address(String ip) {
 
         // Regex for digit from 0 to 255.
         String zeroTo255
-                = "(\\d{1,2}|(0|1)\\"
-                + "d{2}|2[0-4]\\d|25[0-5])";
+            = "(\\d{1,2}|(0|1)\\"
+            + "d{2}|2[0-4]\\d|25[0-5])";
 
         String regex
-                = zeroTo255 + "\\."
-                + zeroTo255 + "\\."
-                + zeroTo255 + "\\."
-                + zeroTo255;
+            = zeroTo255 + "\\."
+            + zeroTo255 + "\\."
+            + zeroTo255 + "\\."
+            + zeroTo255;
 
         // Compile the ReGex
         Pattern p = Pattern.compile(regex);
@@ -146,7 +136,7 @@ public static boolean isValidIPV4Address(String ip) {
         return m.matches();
     }
 
-    private static void getIpResult(ArrayList ipv4Result, ArrayList ipv6Result,
+    private static void getIpResult(List ipv4Result, List ipv6Result,
                                     Enumeration en) {
         while (en.hasMoreElements()) {
             final InetAddress address = en.nextElement();
@@ -214,7 +204,7 @@ public static boolean isValidIp(String url) {
                 return new IPAddressString(new URL(url).getHost()).isValid();
             }
         } catch (Exception e) {
-            logger.warn("Invalid URL format url={}", url, e);
+            log.warn("Invalid URL format url={}", url, e);
             return false;
         }
         return true;
@@ -229,7 +219,7 @@ public static IPAddress domain2Ip(String url) {
             String host = new URL(url).getHost();
             return new HostName(host).getAddress();
         } catch (MalformedURLException e) {
-            logger.error("Invalid URL format url={}", url, e);
+            log.error("Invalid URL format url={}", url, e);
             return null;
         }
     }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/JsonUtils.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/JsonUtils.java
index a9c3fc1154..58a0571ee8 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/JsonUtils.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/JsonUtils.java
@@ -17,10 +17,21 @@
 
 package org.apache.eventmesh.common.utils;
 
+
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.EventMeshDateFormat;
 import org.apache.eventmesh.common.exception.JsonException;
 
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.IOException;
+import java.util.Objects;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 
@@ -32,7 +43,11 @@ public class JsonUtils {
     private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
 
     static {
-        OBJECT_MAPPER.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
+        OBJECT_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+        OBJECT_MAPPER.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
+        OBJECT_MAPPER.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+        OBJECT_MAPPER.setDateFormat(new EventMeshDateFormat(Constants.DATE_FORMAT_DEFAULT));
+        OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
     }
 
     /**
@@ -41,7 +56,10 @@ public class JsonUtils {
      * @param obj obj
      * @return json string
      */
-    public static String serialize(Object obj) {
+    public static String toJSONString(Object obj) {
+        if (Objects.isNull(obj)) {
+            return null;
+        }
         try {
             return OBJECT_MAPPER.writeValueAsString(obj);
         } catch (JsonProcessingException e) {
@@ -49,35 +67,74 @@ public static String serialize(Object obj) {
         }
     }
 
+    public static byte[] toJSONBytes(Object obj) {
+        if (Objects.isNull(obj)) {
+            return null;
+        }
+        try {
+            return OBJECT_MAPPER.writeValueAsBytes(obj);
+        } catch (JsonProcessingException e) {
+            throw new JsonException("serialize to json error", e);
+        }
+    }
+
     /**
-     * Deserialize json string to object.
+     * parse json string to object.
      *
-     * @param str json string
-     * @param clz object class
-     * @param  object type
+     * @param text  json string
+     * @param clazz object class
+     * @param    object type
      * @return object
      */
-    public static  T deserialize(String str, Class clz) {
+    public static  T parseObject(String text, Class clazz) {
+        if (StringUtils.isEmpty(text)) {
+            return null;
+        }
         try {
-            return OBJECT_MAPPER.readValue(str, clz);
+            return OBJECT_MAPPER.readValue(text, clazz);
         } catch (JsonProcessingException e) {
             throw new JsonException("deserialize json string to object error", e);
         }
     }
 
+    public static  T parseObject(byte[] bytes, Class clazz) {
+        if (bytes == null || bytes.length == 0) {
+            return null;
+        }
+        try {
+            return OBJECT_MAPPER.readValue(bytes, clazz);
+        } catch (IOException e) {
+            throw new JsonException(String.format("parse bytes to %s error", clazz), e);
+        }
+    }
+
     /**
-     * Deserialize json string to object.
+     * parse json string to object.
      *
-     * @param str           json string
+     * @param text          json string
      * @param typeReference object type reference
      * @param            object type
      * @return object
      */
-    public static  T deserialize(String str, TypeReference typeReference) {
+    public static  T parseTypeReferenceObject(String text, TypeReference typeReference) {
+        if (StringUtils.isEmpty(text)) {
+            return null;
+        }
         try {
-            return OBJECT_MAPPER.readValue(str, typeReference);
+            return OBJECT_MAPPER.readValue(text, typeReference);
         } catch (JsonProcessingException e) {
-            throw new JsonException("deserialize json string to object error", e);
+            throw new JsonException("deserialize json string to typeReference error", e);
+        }
+    }
+
+    public static JsonNode getJsonNode(String text) {
+        if (StringUtils.isEmpty(text)) {
+            return null;
+        }
+        try {
+            return OBJECT_MAPPER.readTree(text);
+        } catch (JsonProcessingException e) {
+            throw new JsonException("deserialize json string to JsonNode error", e);
         }
     }
 }
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/NetUtils.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/NetUtils.java
similarity index 51%
rename from eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/NetUtils.java
rename to eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/NetUtils.java
index 3a1cc8787b..0aae29c4eb 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/NetUtils.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/NetUtils.java
@@ -15,8 +15,17 @@
  * limitations under the License.
  */
 
-package org.apache.eventmesh.runtime.util;
+package org.apache.eventmesh.common.utils;
 
+import static org.apache.eventmesh.common.Constants.SUCCESS_CODE;
+
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.enums.HttpMethod;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
 import java.net.InetSocketAddress;
 import java.net.URLDecoder;
@@ -25,34 +34,37 @@
 import java.util.List;
 import java.util.Map;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.sun.net.httpserver.HttpExchange;
 
-public class NetUtils {
+import lombok.extern.slf4j.Slf4j;
 
-    private static final Logger logger = LoggerFactory.getLogger(NetUtils.class);
+/**
+ * NetUtils
+ */
+@Slf4j
+public class NetUtils {
 
     /**
      * Transform the url form string to Map
      *
      * @param formData
-     * @return
+     * @return url parameters map
      */
     public static Map formData2Dic(String formData) {
-        Map result = new HashMap<>();
-        if (formData == null || formData.trim().length() == 0) {
-            return result;
+        if (StringUtils.isBlank(formData)) {
+            return new HashMap<>();
         }
-        final String[] items = formData.split("&");
+        final String[] items = formData.split(Constants.AND);
+        Map result = new HashMap<>(items.length);
         Arrays.stream(items).forEach(item -> {
-            final String[] keyAndVal = item.split("=");
+            final String[] keyAndVal = item.split(Constants.EQ);
             if (keyAndVal.length == 2) {
                 try {
-                    final String key = URLDecoder.decode(keyAndVal[0], "utf8");
-                    final String val = URLDecoder.decode(keyAndVal[1], "utf8");
+                    final String key = URLDecoder.decode(keyAndVal[0], Constants.DEFAULT_CHARSET.name());
+                    final String val = URLDecoder.decode(keyAndVal[1], Constants.DEFAULT_CHARSET.name());
                     result.put(key, val);
                 } catch (UnsupportedEncodingException e) {
-                    logger.warn("formData2Dic:param decode failed...", e);
+                    log.warn("formData2Dic:param decode failed...", e);
                 }
             }
         });
@@ -65,8 +77,30 @@ public static String addressToString(List clients) {
         }
         StringBuilder sb = new StringBuilder();
         for (InetSocketAddress addr : clients) {
-            sb.append(addr).append("|");
+            sb.append(addr).append(Constants.VERTICAL_LINE);
         }
         return sb.toString();
     }
+
+    public static String parsePostBody(HttpExchange exchange)
+        throws IOException {
+
+        if (!HttpMethod.POST.name().equalsIgnoreCase(exchange.getRequestMethod())
+            && !HttpMethod.PUT.name().equalsIgnoreCase(exchange.getRequestMethod())) {
+            return "";
+        }
+        StringBuilder body = new StringBuilder(1024);
+        try (InputStreamReader reader = new InputStreamReader(exchange.getRequestBody(), Constants.DEFAULT_CHARSET.name())) {
+            char[] buffer = new char[256];
+            int readIndex;
+            while ((readIndex = reader.read(buffer)) != -1) {
+                body.append(buffer, 0, readIndex);
+            }
+        }
+        return body.toString();
+    }
+
+    public static void sendSuccessResponseHeaders(HttpExchange httpExchange) throws IOException {
+        httpExchange.sendResponseHeaders(SUCCESS_CODE, 0);
+    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/PropertiesUtils.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/PropertiesUtils.java
index 23b566c107..a691b312c3 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/PropertiesUtils.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/PropertiesUtils.java
@@ -21,14 +21,26 @@
 
 import org.apache.commons.lang3.StringUtils;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.util.Properties;
 
+import com.google.common.base.Preconditions;
+
 public class PropertiesUtils {
 
-    public static Properties getPropertiesByPrefix(final Properties from, final Properties to, String prefix) {
+    public static Properties getPropertiesByPrefix(final Properties from, final String prefix) {
+
+        Properties to = new Properties();
         if (StringUtils.isBlank(prefix) || from == null) {
             return to;
         }
+
         from.forEach((key, value) -> {
                 String keyStr = String.valueOf(key);
                 if (StringUtils.startsWith(keyStr, prefix)) {
@@ -61,4 +73,35 @@ public static Properties getPropertiesByPrefix(final Properties from, final Prop
         );
         return to;
     }
+
+    /**
+     * Load properties from file when file is exist
+     *
+     * @param properties
+     * @param path
+     * @param cs
+     * @throws IOException Exception when loading properties, like illegal content, file permission denies
+     */
+    public static void loadPropertiesWhenFileExist(Properties properties, String path, Charset cs) throws IOException {
+        Preconditions.checkNotNull(properties, "Properties can not be null");
+        File file = new File(path);
+        if (!file.exists()) {
+            return;
+        }
+        try (BufferedReader reader = new BufferedReader(
+            new InputStreamReader(new FileInputStream(file), cs))) {
+            properties.load(reader);
+        }
+    }
+
+    /**
+     * Load properties from file when file is exist
+     *
+     * @param properties
+     * @param path
+     * @throws IOException Exception when loading properties, like illegal content, file permission denies
+     */
+    public static void loadPropertiesWhenFileExist(Properties properties, String path) throws IOException {
+        loadPropertiesWhenFileExist(properties, path, StandardCharsets.UTF_8);
+    }
 }
diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
index af69f08508..b68050e17a 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/utils/ThreadUtils.java
@@ -20,20 +20,48 @@
 import org.apache.logging.log4j.util.ProcessIdUtil;
 
 import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
 
 public class ThreadUtils {
 
     private static volatile long currentPID = -1;
 
-    public static void randomSleep(int min, int max) throws Exception {
+    public static void randomPause(long min, long max) {
+        randomPause(min, max, TimeUnit.MILLISECONDS);
+    }
+
+    public static void randomPause(long min, long max, TimeUnit timeUnit) {
         // nextInt is normally exclusive of the top value, so add 1 to make it inclusive
-        int random = ThreadLocalRandom.current().nextInt(min, max + 1);
-        Thread.sleep(random);
+        try {
+            long timeout = ThreadLocalRandom.current().nextLong(min, max + 1);
+            timeUnit.sleep(timeout);
+        } catch (InterruptedException ignore) {
+            //ignore
+        }
+    }
+
+    public static void randomPause(long max) {
+        randomPause(1, max);
+    }
 
+    @Deprecated
+    public static void sleep(long timeout) {
+        sleep(timeout, TimeUnit.MILLISECONDS);
     }
 
-    public static void randomSleep(int max) throws Exception {
-        randomSleep(1, max);
+    public static void sleep(long timeout, TimeUnit timeUnit) {
+        try {
+            sleepWithThrowException(timeout, timeUnit);
+        } catch (InterruptedException ignore) {
+            //ignore
+        }
+    }
+
+    public static void sleepWithThrowException(long timeout, TimeUnit timeUnit) throws InterruptedException {
+        if (null == timeUnit) {
+            return;
+        }
+        timeUnit.sleep(timeout);
     }
 
     /**
diff --git a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/util/EventMeshThreadFactoryImplTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/EventMeshThreadFactoryTest.java
similarity index 73%
rename from eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/util/EventMeshThreadFactoryImplTest.java
rename to eventmesh-common/src/test/java/org/apache/eventmesh/common/EventMeshThreadFactoryTest.java
index f9b4821852..944493260b 100644
--- a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/util/EventMeshThreadFactoryImplTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/EventMeshThreadFactoryTest.java
@@ -15,25 +15,29 @@
  * limitations under the License.
  */
 
-package org.apache.eventmesh.runtime.util;
+package org.apache.eventmesh.common;
 
 import org.junit.Assert;
 import org.junit.Test;
 
-public class EventMeshThreadFactoryImplTest {
+public class EventMeshThreadFactoryTest {
 
     @Test
     public void testGetThreadNamePrefix() {
         final String threadNamePrefix = "threadNamePrefix";
-        EventMeshThreadFactoryImpl factory = new EventMeshThreadFactoryImpl(threadNamePrefix, false);
+        EventMeshThreadFactory factory = new EventMeshThreadFactory(threadNamePrefix, false);
         Assert.assertEquals(threadNamePrefix, factory.getThreadNamePrefix());
     }
 
     @Test
     public void testNewThread() {
         final String threadNamePrefix = "threadNamePrefix";
-        EventMeshThreadFactoryImpl factory = new EventMeshThreadFactoryImpl(threadNamePrefix, true);
-        Thread t = factory.newThread(() -> {});
+        EventMeshThreadFactory factory = new EventMeshThreadFactory(threadNamePrefix, true);
+        Thread t = factory.newThread(() -> {
+
+        });
         Assert.assertNotNull(t);
+        Assert.assertEquals(threadNamePrefix + "-1", t.getName());
+        Assert.assertTrue(t.isDaemon());
     }
 }
\ No newline at end of file
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/CommonConfigurationTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/CommonConfigurationTest.java
index 68ee8659ca..755ac1d5e9 100644
--- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/CommonConfigurationTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/CommonConfigurationTest.java
@@ -17,7 +17,8 @@
 
 package org.apache.eventmesh.common.config;
 
-import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.junit.Assert;
 import org.junit.Before;
@@ -25,21 +26,52 @@
 
 public class CommonConfigurationTest {
 
-    private CommonConfiguration configuration;
+    public CommonConfiguration config;
 
     @Before
-    public void before() {
-        String file = ConfigurationWrapperTest.class.getResource("/configuration.properties").getFile();
-        File f = new File(file);
-        ConfigurationWrapper wraper = new ConfigurationWrapper(f.getParent(), f.getName(), false);
-        configuration = new CommonConfiguration(wraper);
+    public void beforeCommonConfigurationTest() throws Exception {
+        ConfigService configService = ConfigService.getInstance();
+        configService.setRootConfig("classPath://configuration.properties");
+
+        config = configService.buildConfigInstance(CommonConfiguration.class);
+
+        testGetCommonConfiguration();
     }
 
     @Test
-    public void testInit() {
-        configuration.init();
-        Assert.assertEquals("value1", configuration.eventMeshEnv);
-        Assert.assertEquals("value2", configuration.eventMeshIDC);
-        Assert.assertEquals("3", configuration.sysID);
+    public void testGetCommonConfiguration() {
+        Assert.assertEquals("env-succeed!!!", config.getEventMeshEnv());
+        Assert.assertEquals("idc-succeed!!!", config.getEventMeshIDC());
+        Assert.assertEquals("cluster-succeed!!!", config.getEventMeshCluster());
+        Assert.assertEquals("name-succeed!!!", config.getEventMeshName());
+        Assert.assertEquals("816", config.getSysID());
+        Assert.assertEquals("connector-succeed!!!", config.getEventMeshConnectorPluginType());
+        Assert.assertEquals("security-succeed!!!", config.getEventMeshSecurityPluginType());
+        Assert.assertEquals("registry-succeed!!!", config.getEventMeshRegistryPluginType());
+        Assert.assertEquals("trace-succeed!!!", config.getEventMeshTracePluginType());
+        Assert.assertEquals("hostIp-succeed!!!", config.getEventMeshServerIp());
+        Assert.assertEquals("username-succeed!!!", config.getEventMeshRegistryPluginUsername());
+        Assert.assertEquals("password-succeed!!!", config.getEventMeshRegistryPluginPassword());
+
+        Assert.assertEquals(Integer.valueOf(816), config.getEventMeshRegisterIntervalInMills());
+        Assert.assertEquals(Integer.valueOf(1816), config.getEventMeshFetchRegistryAddrInterval());
+
+        List list = new ArrayList<>();
+        list.add("metrics-succeed1!!!");
+        list.add("metrics-succeed2!!!");
+        list.add("metrics-succeed3!!!");
+        Assert.assertEquals(list, config.getEventMeshMetricsPluginType());
+
+        List list1 = new ArrayList<>();
+        list1.add("TCP");
+        list1.add("HTTP");
+        list1.add("GRPC");
+        Assert.assertEquals(list1, config.getEventMeshProvideServerProtocols());
+
+        Assert.assertTrue(config.isEventMeshServerSecurityEnable());
+        Assert.assertTrue(config.isEventMeshServerRegistryEnable());
+        Assert.assertTrue(config.isEventMeshServerTraceEnable());
+
+        Assert.assertEquals("eventmesh.idc-succeed!!!", config.getEventMeshWebhookOrigin());
     }
 }
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/ConfigServiceTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/ConfigServiceTest.java
new file mode 100644
index 0000000000..3900bef9b8
--- /dev/null
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/config/ConfigServiceTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.common.config;
+
+import static org.apache.eventmesh.common.config.ConfigService.CLASS_PATH_PREFIX;
+import static org.apache.eventmesh.common.config.ConfigService.FILE_PATH_PREFIX;
+
+import java.io.File;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ConfigServiceTest {
+
+    private final String configFileName = "configuration.properties";
+
+    @Test
+    public void getConfigByRootConfig() throws Exception {
+
+        ConfigService configService = ConfigService.getInstance();
+        configService.setRootConfig(CLASS_PATH_PREFIX + configFileName);
+
+        ConfigInfo configInfo = new ConfigInfo();
+        configInfo.setClazz(CommonConfiguration.class);
+        configInfo.setPrefix(CommonConfiguration.class.getAnnotation(Config.class).prefix());
+
+        CommonConfiguration config = configService.getConfig(configInfo);
+        assertCommonConfiguration(config);
+    }
+
+    @Test
+    public void getConfigByClassPath() throws Exception {
+        ConfigService configService = ConfigService.getInstance();
+
+        ConfigInfo configInfo = new ConfigInfo();
+        configInfo.setPath(CLASS_PATH_PREFIX + configFileName);
+        configInfo.setClazz(CommonConfiguration.class);
+        configInfo.setPrefix(CommonConfiguration.class.getAnnotation(Config.class).prefix());
+
+        CommonConfiguration config = configService.getConfig(configInfo);
+        assertCommonConfiguration(config);
+    }
+
+    @Test
+    public void getConfigByFilePath() throws Exception {
+        ConfigService configService = ConfigService.getInstance();
+        String rootPath = new File(this.getClass().getResource("/" + configFileName)
+                .getPath()).getParent();
+
+        ConfigInfo configInfo = new ConfigInfo();
+        configInfo.setPath(FILE_PATH_PREFIX + rootPath + "/" + configFileName);
+        configInfo.setClazz(CommonConfiguration.class);
+        configInfo.setPrefix(CommonConfiguration.class.getAnnotation(Config.class).prefix());
+
+        CommonConfiguration config = configService.getConfig(configInfo);
+        assertCommonConfiguration(config);
+    }
+
+    @Test
+    public void getConfigByConfigPath() throws Exception {
+        ConfigService configService = ConfigService.getInstance();
+        String configPath = new File(this.getClass().getResource("/" + configFileName)
+                .getPath()).getParent();
+
+        configService.setConfigPath(configPath);
+        ConfigInfo configInfo = new ConfigInfo();
+        configInfo.setPath("/" + configFileName);
+        configInfo.setClazz(CommonConfiguration.class);
+        configInfo.setPrefix(CommonConfiguration.class.getAnnotation(Config.class).prefix());
+
+        CommonConfiguration config = configService.getConfig(configInfo);
+        assertCommonConfiguration(config);
+    }
+
+    public void assertCommonConfiguration(CommonConfiguration config) {
+        Assert.assertEquals("env-succeed!!!", config.getEventMeshEnv());
+    }
+}
\ No newline at end of file
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/file/WatchFileManagerTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/file/WatchFileManagerTest.java
index 614138a4a3..5213f271ae 100644
--- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/file/WatchFileManagerTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/file/WatchFileManagerTest.java
@@ -17,12 +17,18 @@
 
 package org.apache.eventmesh.common.file;
 
+import org.apache.eventmesh.common.utils.ThreadUtils;
+
 import java.io.BufferedReader;
+import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.Properties;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -30,29 +36,36 @@
 public class WatchFileManagerTest {
 
     @Test
-    public void testWatchFile() throws IOException, InterruptedException {
-        String file = WatchFileManagerTest.class.getResource("/configuration.properties").getFile();
-        File f = new File(file);
+    public void testWatchFile() {
+        String resourceUrl = WatchFileManagerTest.class.getResource("/configuration.properties").getFile();
+        File file = new File(resourceUrl);
         final FileChangeListener fileChangeListener = new FileChangeListener() {
             @Override
             public void onChanged(FileChangeContext changeContext) {
-                Assert.assertEquals(f.getName(), changeContext.getFileName());
-                Assert.assertEquals(f.getParent(), changeContext.getDirectoryPath());
+                Assert.assertEquals(file.getName(), changeContext.getFileName());
+                Assert.assertEquals(file.getParent(), changeContext.getDirectoryPath());
             }
 
             @Override
             public boolean support(FileChangeContext changeContext) {
-                return changeContext.getWatchEvent().context().toString().contains(f.getName());
+                return changeContext.getWatchEvent().context().toString().contains(file.getName());
             }
         };
-        WatchFileManager.registerFileChangeListener(f.getParent(), fileChangeListener);
+        WatchFileManager.registerFileChangeListener(file.getParent(), fileChangeListener);
 
+        Path path = Paths.get(resourceUrl);
         Properties properties = new Properties();
-        properties.load(new BufferedReader(new FileReader(file)));
+        try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) {
+            properties.load(reader);
+        } catch (IOException e) {
+            Assert.fail("Test failed to load from file");
+        }
         properties.setProperty("eventMesh.server.newAdd", "newAdd");
-        FileWriter fw = new FileWriter(file);
-        properties.store(fw, "newAdd");
-
-        Thread.sleep(500);
+        try (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {
+            properties.store(writer, "newAdd");
+        } catch (IOException e) {
+            Assert.fail("Test failed to write to file");
+        }
+        ThreadUtils.sleep(500, TimeUnit.MILLISECONDS);
     }
 }
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelectorTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelectorTest.java
index 728244117d..f01a136465 100644
--- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelectorTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/RandomLoadBalanceSelectorTest.java
@@ -25,15 +25,15 @@
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public class RandomLoadBalanceSelectorTest {
 
     private RandomLoadBalanceSelector randomLoadBalanceSelector;
 
-    private Logger logger = LoggerFactory.getLogger(RandomLoadBalanceSelectorTest.class);
-
     @Before
     public void befor() {
         List address = new ArrayList<>();
@@ -51,7 +51,7 @@ public void testSelect() {
             String select = randomLoadBalanceSelector.select();
             addressToNum.put(select, addressToNum.getOrDefault(select, 0) + 1);
         }
-        addressToNum.forEach((key, value) -> logger.info("{} : {}", key, value));
+        addressToNum.forEach((key, value) -> log.info("{} : {}", key, value));
         // just assert success if no exception
         Assert.assertTrue(true);
     }
@@ -60,4 +60,4 @@ public void testSelect() {
     public void testGetType() {
         Assert.assertEquals(LoadBalanceType.RANDOM, randomLoadBalanceSelector.getType());
     }
-}
\ No newline at end of file
+}
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelectorTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelectorTest.java
index beb5e659e1..a5edd17eb2 100644
--- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelectorTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRandomLoadBalanceSelectorTest.java
@@ -29,12 +29,12 @@
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-public class WeightRandomLoadBalanceSelectorTest {
 
-    private Logger logger = LoggerFactory.getLogger(WeightRandomLoadBalanceSelectorTest.class);
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class WeightRandomLoadBalanceSelectorTest {
 
     @Test
     public void testSelect() throws Exception {
@@ -46,13 +46,13 @@ public void testSelect() throws Exception {
         Assert.assertEquals(LoadBalanceType.WEIGHT_RANDOM, weightRandomLoadBalanceSelector.getType());
         int testRange = 100_000;
         Map addressToNum = IntStream.range(0, testRange)
-                .mapToObj(i -> weightRandomLoadBalanceSelector.select())
-                .collect(groupingBy(Function.identity(), summingInt(i -> 1)));
+            .mapToObj(i -> weightRandomLoadBalanceSelector.select())
+            .collect(groupingBy(Function.identity(), summingInt(i -> 1)));
 
         addressToNum.forEach((key, value) -> {
-            logger.info("{}: {}", key, value);
+            log.info("{}: {}", key, value);
         });
-        System.out.printf(addressToNum.toString());
+        log.info("addressToNum: {}", addressToNum);
         // the error less than 5%
         Assert.assertTrue(Math.abs(addressToNum.get("192.168.0.3") - addressToNum.get("192.168.0.2") * 2) < testRange / 20);
         Assert.assertTrue(Math.abs(addressToNum.get("192.168.0.3") - addressToNum.get("192.168.0.1") * 4) < testRange / 20);
@@ -69,8 +69,8 @@ public void testSameWeightSelect() throws Exception {
 
         int testRange = 100_000;
         Map addressToNum = IntStream.range(0, testRange)
-                .mapToObj(i -> weightRandomLoadBalanceSelector.select())
-                .collect(groupingBy(Function.identity(), summingInt(i -> 1)));
+            .mapToObj(i -> weightRandomLoadBalanceSelector.select())
+            .collect(groupingBy(Function.identity(), summingInt(i -> 1)));
 
         Field field = WeightRandomLoadBalanceSelector.class.getDeclaredField("sameWeightGroup");
         field.setAccessible(true);
@@ -78,7 +78,7 @@ public void testSameWeightSelect() throws Exception {
         Assert.assertTrue(sameWeightGroup);
 
         addressToNum.forEach((key, value) -> {
-            logger.info("{}: {}", key, value);
+            log.info("{}: {}", key, value);
         });
         // the error less than 5%
         Assert.assertTrue(Math.abs(addressToNum.get("192.168.0.3") - addressToNum.get("192.168.0.2")) < testRange / 20);
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelectorTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelectorTest.java
index cf43ee48ef..e7c3d3f6e7 100644
--- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelectorTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/loadbalance/WeightRoundRobinLoadBalanceSelectorTest.java
@@ -25,12 +25,13 @@
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-public class WeightRoundRobinLoadBalanceSelectorTest {
 
-    private Logger logger = LoggerFactory.getLogger(WeightRoundRobinLoadBalanceSelectorTest.class);
+import lombok.extern.slf4j.Slf4j;
+
+
+@Slf4j
+public class WeightRoundRobinLoadBalanceSelectorTest {
 
     private WeightRoundRobinLoadBalanceSelector weightRoundRobinLoadBalanceSelector;
 
@@ -51,7 +52,7 @@ public void testSelect() {
             addressToNum.put(select, addressToNum.getOrDefault(select, 0) + 1);
         }
         addressToNum.forEach((key, value) -> {
-            logger.info("{}: {}", key, value);
+            log.info("{}: {}", key, value);
         });
         Assert.assertTrue(addressToNum.get("B") > addressToNum.get("A"));
         Assert.assertTrue(addressToNum.get("C") > addressToNum.get("B"));
@@ -61,4 +62,4 @@ public void testSelect() {
     public void testGetType() {
         Assert.assertEquals(LoadBalanceType.WEIGHT_ROUND_ROBIN, weightRoundRobinLoadBalanceSelector.getType());
     }
-}
\ No newline at end of file
+}
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/AssertTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/AssertTest.java
new file mode 100644
index 0000000000..f6b0b1d547
--- /dev/null
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/AssertTest.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.common.utils;
+
+import org.junit.Test;
+
+/**
+ * test {@link AssertUtils}
+ */
+public class AssertTest {
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testNotNull() {
+        AssertUtils.notNull(null, "error message");
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testIsTrue() {
+        AssertUtils.isTrue(false, "error message");
+    }
+}
\ No newline at end of file
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/JsonUtilsTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/JsonUtilsTest.java
new file mode 100644
index 0000000000..ba9a843308
--- /dev/null
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/JsonUtilsTest.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.common.utils;
+
+import java.nio.charset.StandardCharsets;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+
+import lombok.Data;
+
+public class JsonUtilsTest {
+
+    @Test
+    public void toJSONString() {
+        Map map = new HashMap<>();
+        String jsonString = JsonUtils.toJSONString(map);
+        Assert.assertEquals("{}", jsonString);
+        map.put("mxsm", "2");
+        jsonString = JsonUtils.toJSONString(map);
+        Assert.assertEquals("{\"mxsm\":\"2\"}", jsonString);
+    }
+
+    @Test
+    public void testToBytes() {
+        Map map = new HashMap<>();
+        map.put("mxsm", "2");
+        Assert.assertArrayEquals("{\"mxsm\":\"2\"}".getBytes(StandardCharsets.UTF_8), JsonUtils.toJSONBytes(map));
+    }
+
+    @Test
+    public void testParseObject() {
+
+        String json = "{\"mxsm\":\"2\",\"date\":\"2022-02-12 21:36:01\"}";
+        Map map = JsonUtils.parseTypeReferenceObject(json, new TypeReference>() {
+
+        });
+        Assert.assertNotNull(map);
+        Assert.assertEquals("2", map.get("mxsm"));
+        EventMesh mxsm = JsonUtils.parseObject(json, EventMesh.class);
+        Assert.assertNotNull(mxsm);
+        Assert.assertEquals("2", mxsm.mxsm);
+        Assert.assertEquals(new GregorianCalendar(2022, 1, 12, 21, 36, 01).getTime().getTime(), mxsm.date.getTime());
+        EventMesh mxsm1 = JsonUtils.parseObject(json.getBytes(StandardCharsets.UTF_8), EventMesh.class);
+        Assert.assertNotNull(mxsm1);
+        Assert.assertEquals("2", mxsm1.mxsm);
+    }
+
+
+    @Test
+    public void getJsonNode() {
+        String json = "{\"mxsm\":\"2\",\"date\":\"2022-02-12 21:36:01\"}";
+        JsonNode jsonNode = JsonUtils.getJsonNode(json);
+        Assert.assertNotNull(jsonNode);
+        Assert.assertEquals("2", jsonNode.findValue("mxsm").asText());
+    }
+
+    @Data
+    public static class EventMesh {
+
+        private String mxsm;
+
+        private Date date;
+    }
+}
diff --git a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/util/NetUtilsTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/NetUtilsTest.java
similarity index 69%
rename from eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/util/NetUtilsTest.java
rename to eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/NetUtilsTest.java
index 26e87d7aa2..a1131fde99 100644
--- a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/util/NetUtilsTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/NetUtilsTest.java
@@ -15,15 +15,22 @@
  * limitations under the License.
  */
 
-package org.apache.eventmesh.runtime.util;
+package org.apache.eventmesh.common.utils;
 
+import org.apache.eventmesh.common.enums.HttpMethod;
+
+import java.io.ByteArrayInputStream;
 import java.net.InetSocketAddress;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
 import org.junit.Assert;
 import org.junit.Test;
+import org.mockito.Mockito;
+
+import com.sun.net.httpserver.HttpExchange;
 
 public class NetUtilsTest {
 
@@ -49,4 +56,18 @@ public void testAddressToString() {
         result = NetUtils.addressToString(clients);
         Assert.assertEquals(result, localAddress + "|");
     }
+
+    @Test
+    public void testParsePostBody() throws Exception {
+
+        HttpExchange exchange = Mockito.mock(HttpExchange.class);
+        String expected = "mxsm";
+        ByteArrayInputStream inputStream = new ByteArrayInputStream(expected.getBytes(StandardCharsets.UTF_8));
+        Mockito.when(exchange.getRequestMethod()).thenReturn(HttpMethod.POST.name());
+        Mockito.when(exchange.getRequestBody()).thenReturn(inputStream);
+
+        String actual = NetUtils.parsePostBody(exchange);
+        Assert.assertEquals(expected, actual);
+
+    }
 }
diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/PropertiesUtilsTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/PropertiesUtilsTest.java
index 04f578ccf2..73f4ee5c1a 100644
--- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/PropertiesUtilsTest.java
+++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/utils/PropertiesUtilsTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.eventmesh.common.utils;
 
+import org.apache.eventmesh.common.config.ConfigService;
+
 import java.util.Properties;
 
 import org.junit.Assert;
@@ -34,10 +36,25 @@ public void testGetPropertiesByPrefix() {
         from.put(PREFIX + "b", 1.0);
         from.put(PREFIX + "c.d", "inner d");
         from.put(PREFIX + "c.f", "inner f");
-        Properties to = new Properties();
-        PropertiesUtils.getPropertiesByPrefix(from, to, PREFIX);
+        Properties to = PropertiesUtils.getPropertiesByPrefix(from, PREFIX);
 
         Assert.assertEquals(3, to.size());
         Assert.assertEquals(2, ((Properties) to.get("c")).size());
     }
+
+    @Test
+    public void testLoadPropertiesWhenFileExist() throws Exception {
+        Properties properties = new Properties();
+        ConfigService configService = ConfigService.getInstance();
+        configService.setRootConfig("classPath://configuration.properties");
+        properties = configService.getRootConfig();
+        String path = configService.getRootPath();
+        try {
+            PropertiesUtils.loadPropertiesWhenFileExist(properties, path);
+            Assert.assertEquals(properties.get("eventMesh.server.env").toString(), "env-succeed!!!");
+            Assert.assertEquals(properties.get("eventMesh.server.idc").toString(), "idc-succeed!!!");
+        } catch (Exception e) {
+            Assert.fail();
+        }
+    }
 }
diff --git a/eventmesh-common/src/test/resources/configuration.properties b/eventmesh-common/src/test/resources/configuration.properties
index fe3f749a1b..47bbb1c36c 100644
--- a/eventmesh-common/src/test/resources/configuration.properties
+++ b/eventmesh-common/src/test/resources/configuration.properties
@@ -14,16 +14,25 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-eventMesh.server.env=value1
-eventMesh.server.idc=value2
-eventMesh.sysid=3
-eventMesh.server.cluster=value4
-eventMesh.server.name=value5
-eventMesh.server.hostIp=value6
-eventMesh.connector.plugin.type=rocketmq
-eventMesh.security.plugin.type=acl
-eventMesh.registry.plugin.type=namesrv
-eventMesh.registry.plugin.server-addr=127.0.0.1:8848
-eventMesh.registry.plugin.username=nacos
-eventMesh.registry.plugin.password=nacos
-eventMesh.trace.plugin=zipkin
\ No newline at end of file
+eventMesh.server.env=env-succeed!!!
+eventMesh.server.idc=idc-succeed!!!
+eventMesh.sysid=816
+eventMesh.server.cluster=cluster-succeed!!!
+eventMesh.server.name=name-succeed!!!
+eventMesh.server.hostIp=hostIp-succeed!!!
+eventMesh.connector.plugin.type=connector-succeed!!!
+eventMesh.security.plugin.type=security-succeed!!!
+eventMesh.registry.plugin.type=registry-succeed!!!
+eventMesh.trace.plugin=trace-succeed!!!
+eventMesh.server.registry.registerIntervalInMills=816
+eventMesh.server.registry.fetchRegistryAddrIntervalInMills=1816
+eventMesh.metrics.plugin=metrics-succeed1!!!,metrics-succeed2!!!,metrics-succeed3!!!
+eventMesh.registry.plugin.server-addr=server-addr-succeed1!!!
+
+eventMesh.server.security.enabled=true
+eventMesh.server.registry.enabled=true
+eventMesh.server.trace.enabled=true
+
+eventMesh.server.provide.protocols=TCP,HTTP,GRPC
+eventMesh.registry.plugin.username=username-succeed!!!
+eventMesh.registry.plugin.password=password-succeed!!!
diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle
index 8ccfa87825..25c68d12e6 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle
+++ b/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle
@@ -24,10 +24,10 @@ dependencies {
     api "io.dropwizard.metrics:metrics-annotation"
     api "io.dropwizard.metrics:metrics-json"
 
-    compileOnly 'org.projectlombok:lombok:1.18.22'
-    annotationProcessor 'org.projectlombok:lombok:1.18.22'
+    compileOnly 'org.projectlombok:lombok'
+    annotationProcessor 'org.projectlombok:lombok'
 
-    testCompileOnly 'org.projectlombok:lombok:1.18.22'
-    testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
+    testCompileOnly 'org.projectlombok:lombok'
+    testAnnotationProcessor 'org.projectlombok:lombok'
 
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/admin/Admin.java b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/admin/Admin.java
new file mode 100644
index 0000000000..8ccd8aaf6d
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/admin/Admin.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.eventmesh.api.admin;
+
+import org.apache.eventmesh.api.LifeCycle;
+import org.apache.eventmesh.spi.EventMeshExtensionType;
+import org.apache.eventmesh.spi.EventMeshSPI;
+
+import java.util.List;
+import java.util.Properties;
+
+import io.cloudevents.CloudEvent;
+
+/**
+ * Admin API.
+ */
+@EventMeshSPI(isSingleton = false, eventMeshExtensionType = EventMeshExtensionType.CONNECTOR)
+public interface Admin extends LifeCycle {
+    /**
+     * Initializes admin api service.
+     */
+    void init(Properties keyValue) throws Exception;
+
+    /**
+     * Get the list of topics.
+     *
+     * @return List of topics.
+     */
+    List getTopic() throws Exception;
+
+    /**
+     * Create one topic.
+     */
+    void createTopic(String topicName) throws Exception;
+
+    /**
+     * Delete one topic.
+     */
+    void deleteTopic(String topicName) throws Exception;
+
+    /**
+     * Get the list of all events.
+     *
+     * @return List of events.
+     */
+    List getEvent(String topicName, int offset, int length) throws Exception;
+
+    /**
+     * Publish an event.
+     */
+    void publish(CloudEvent cloudEvent) throws Exception;
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/admin/TopicProperties.java b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/admin/TopicProperties.java
new file mode 100644
index 0000000000..06e6266233
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/admin/TopicProperties.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.eventmesh.api.admin;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class TopicProperties {
+    public String name;
+    public long messageCount;
+
+    @JsonCreator
+    public TopicProperties(
+        @JsonProperty("name") String name,
+        @JsonProperty("messageCount") long messageCount
+    ) {
+        super();
+        this.name = name;
+        this.messageCount = messageCount;
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/connector/ConnectorResourceService.java b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/connector/ConnectorResourceService.java
index 8b6cff71ca..edb61653f2 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/connector/ConnectorResourceService.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/connector/ConnectorResourceService.java
@@ -23,18 +23,18 @@
 /**
  * ConnectorResourceService
  */
-@EventMeshSPI(isSingleton = true, eventMeshExtensionType = EventMeshExtensionType.CONNECTOR)
+@EventMeshSPI(eventMeshExtensionType = EventMeshExtensionType.CONNECTOR)
 public interface ConnectorResourceService {
 
     /**
-     * Resource initialization in connector,such as,some public threadpool if exist
+     * Resource initialization in connector,such as,some public thread pool if exist
      *
      * @throws Exception
      */
     void init() throws Exception;
 
     /**
-     * Resource release in connector,such as,some public threadpool if exist
+     * Resource release in connector,such as,some public thread pool if exist
      *
      * @throws Exception
      */
diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/factory/ConnectorPluginFactory.java b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/factory/ConnectorPluginFactory.java
index 0793634771..27adc0fc73 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/factory/ConnectorPluginFactory.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/factory/ConnectorPluginFactory.java
@@ -19,14 +19,24 @@
 
 package org.apache.eventmesh.api.factory;
 
+import org.apache.eventmesh.api.admin.Admin;
 import org.apache.eventmesh.api.consumer.Consumer;
 import org.apache.eventmesh.api.producer.Producer;
 import org.apache.eventmesh.spi.EventMeshExtensionFactory;
 
 /**
- * The factory to get connector {@link Producer} and {@link Consumer}
+ * The factory to get connector {@link Admin}, {@link Producer} and {@link Consumer}
  */
 public class ConnectorPluginFactory {
+    /**
+     * Get MeshMQAdmin instance by plugin name
+     *
+     * @param connectorPluginName plugin name
+     * @return MeshMQAdmin instance
+     */
+    public static Admin getMeshMQAdmin(String connectorPluginName) {
+        return EventMeshExtensionFactory.getExtension(Admin.class, connectorPluginName);
+    }
 
     /**
      * Get MeshMQProducer instance by plugin name
diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/producer/Producer.java b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/producer/Producer.java
index d8fd2b6a7f..e65b190fbf 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/producer/Producer.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/producer/Producer.java
@@ -20,7 +20,6 @@
 import org.apache.eventmesh.api.LifeCycle;
 import org.apache.eventmesh.api.RequestReplyCallback;
 import org.apache.eventmesh.api.SendCallback;
-import org.apache.eventmesh.api.SendResult;
 import org.apache.eventmesh.spi.EventMeshExtensionType;
 import org.apache.eventmesh.spi.EventMeshSPI;
 
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ClientConfiguration.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ClientConfiguration.java
index f185fcd7cf..e8b9ee658d 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ClientConfiguration.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ClientConfiguration.java
@@ -17,39 +17,57 @@
 
 package org.apache.eventmesh.connector.kafka.config;
 
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.common.base.Preconditions;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.common.config.ConfigFiled;
 
+@Config(prefix = "eventMesh.server.kafka", path = "classPath://kafka-client.properties")
 public class ClientConfiguration {
 
+    @ConfigFiled(field = "namesrvAddr", notEmpty = true)
     public String namesrvAddr = "";
+
+    @ConfigFiled(field = "username")
     public String clientUserName = "username";
+
+    @ConfigFiled(field = "password")
     public String clientPass = "password";
+
+    @ConfigFiled(field = "client.consumeThreadMin")
     public Integer consumeThreadMin = 2;
+
+    @ConfigFiled(field = "client.consumeThreadMax")
     public Integer consumeThreadMax = 2;
+
+    @ConfigFiled(field = "client.consumeThreadPoolQueueSize")
     public Integer consumeQueueSize = 10000;
+
+    @ConfigFiled(field = "client.pullBatchSize")
     public Integer pullBatchSize = 32;
+
+    @ConfigFiled(field = "client.ackwindow")
     public Integer ackWindow = 1000;
+
+    @ConfigFiled(field = "client.pubwindow")
     public Integer pubWindow = 100;
+
+    @ConfigFiled(field = "client.comsumeTimeoutInMin")
     public long consumeTimeout = 0L;
+
+    @ConfigFiled(field = "client.pollNameServerInterval")
     public Integer pollNameServerInterval = 10 * 1000;
+
+    @ConfigFiled(field = "client.heartbeatBrokerInterval")
     public Integer heartbeatBrokerInterval = 30 * 1000;
-    public Integer rebalanceInterval = 20 * 1000;
-    public String clusterName = "";
-    public String accessKey = "";
-    public String secretKey = "";
 
-    public void init() {
-        String namesrvAddrStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_KAFKA_SERVER_PORT);
-        Preconditions.checkState(StringUtils.isNotEmpty(namesrvAddrStr),
-                String.format("%s error", ConfKeys.KEYS_EVENTMESH_KAFKA_SERVER_PORT));
-        namesrvAddr = StringUtils.trim(namesrvAddrStr);
-    }
+    @ConfigFiled(field = "client.rebalanceInterval")
+    public Integer rebalanceInterval = 20 * 1000;
 
-    static class ConfKeys {
+    @ConfigFiled(field = "cluster")
+    public String clusterName = "";
 
-        public static String KEYS_EVENTMESH_KAFKA_SERVER_PORT = "eventMesh.server.kafka.port";
+    @ConfigFiled(field = "accessKey")
+    public String accessKey = "";
 
-    }
+    @ConfigFiled(field = "secretKey")
+    public String secretKey = "";
 }
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java
deleted file mode 100644
index 0c1d17510f..0000000000
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/ConfigurationWrapper.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eventmesh.connector.kafka.config;
-
-import org.apache.eventmesh.common.Constants;
-import org.apache.eventmesh.connector.kafka.common.EventMeshConstants;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import lombok.experimental.UtilityClass;
-import lombok.extern.slf4j.Slf4j;
-
-@Slf4j
-@UtilityClass
-public class ConfigurationWrapper {
-
-    private static final Properties properties = new Properties();
-
-    static {
-        loadProperties();
-    }
-
-    public String getProp(String key) {
-        return StringUtils.isEmpty(key) ? null : properties.getProperty(key, null);
-    }
-
-    /**
-     * Load kafka properties file from classpath and conf home.
-     * The properties defined in conf home will override classpath.
-     */
-    private void loadProperties() {
-        try (InputStream resourceAsStream = ConfigurationWrapper.class.getResourceAsStream(
-                "/" + EventMeshConstants.EVENTMESH_CONF_FILE)) {
-            if (resourceAsStream != null) {
-                properties.load(resourceAsStream);
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(String.format("Load %s.properties file from classpath error", EventMeshConstants.EVENTMESH_CONF_FILE));
-        }
-        try {
-            String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + EventMeshConstants.EVENTMESH_CONF_FILE;
-            if (new File(configPath).exists()) {
-                properties.load(new BufferedReader(new FileReader(configPath)));
-            }
-        } catch (IOException e) {
-            throw new IllegalArgumentException(String.format("Cannot load %s file from conf", EventMeshConstants.EVENTMESH_CONF_FILE));
-        }
-    }
-}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/ConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/ConsumerImpl.java
index 88eef99ecb..421221e81c 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/ConsumerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/ConsumerImpl.java
@@ -38,6 +38,10 @@
 import io.cloudevents.CloudEvent;
 import io.cloudevents.kafka.CloudEventDeserializer;
 
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public class ConsumerImpl {
     private final KafkaConsumer kafkaConsumer;
     private final Properties properties;
@@ -102,6 +106,7 @@ public synchronized void subscribe(String topic) {
             List topics = new ArrayList<>(topicsSet);
             this.kafkaConsumer.subscribe(topics);
         } catch (Exception e) {
+            log.error("Error while subscribing the Kafka consumer to topic: ", e);
             throw new ConnectorRuntimeException(
                 String.format("Kafka consumer can't attach to %s.", topic));
         }
@@ -115,6 +120,7 @@ public synchronized void unsubscribe(String topic) {
             List topics = new ArrayList<>(topicsSet);
             this.kafkaConsumer.subscribe(topics);
         } catch (Exception e) {
+            log.error("Error while unsubscribing the Kafka consumer: ", e);
             throw new ConnectorRuntimeException(String.format("kafka push consumer fails to unsubscribe topic: %s", topic));
         }
     }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerImpl.java
index e03a2d9757..59393778db 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerImpl.java
@@ -20,30 +20,32 @@
 import org.apache.eventmesh.api.AbstractContext;
 import org.apache.eventmesh.api.EventListener;
 import org.apache.eventmesh.api.consumer.Consumer;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.connector.kafka.config.ClientConfiguration;
 
 import org.apache.kafka.clients.consumer.ConsumerConfig;
-import org.apache.kafka.common.serialization.StringDeserializer;
 
 import java.util.List;
 import java.util.Properties;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import io.cloudevents.CloudEvent;
 
+@Config(field = "clientConfiguration")
 public class KafkaConsumerImpl implements Consumer {
-    public Logger messageLogger = LoggerFactory.getLogger("message");
-
     private ConsumerImpl consumer;
 
+    /**
+     * Unified configuration class corresponding to kafka-client.properties
+     */
+    private ClientConfiguration clientConfiguration;
+
     @Override
     public synchronized void init(Properties props) throws Exception {
+        String namesrvAddr = clientConfiguration.namesrvAddr;
         String consumerGroup = props.getProperty("consumerGroup");
-        String bootstrapServers = props.getProperty("bootstrapServers");
-        // Other config props
-        props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
 
+        // Other config props
+        props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, namesrvAddr);
         props.put(ConsumerConfig.GROUP_ID_CONFIG, consumerGroup);
         consumer = new ConsumerImpl(props);
     }
@@ -88,4 +90,7 @@ public synchronized void shutdown() {
         consumer.shutdown();
     }
 
+    public ClientConfiguration getClientConfiguration() {
+        return this.clientConfiguration;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerRunner.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerRunner.java
index e000cb3043..eea95b1c02 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerRunner.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/consumer/KafkaConsumerRunner.java
@@ -30,13 +30,15 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import io.cloudevents.CloudEvent;
 
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public class KafkaConsumerRunner implements Runnable {
-    private final Logger logger = LoggerFactory.getLogger(KafkaConsumerRunner.class);
+
     private final AtomicBoolean closed = new AtomicBoolean(false);
     private final KafkaConsumer consumer;
     private ConcurrentHashMap cloudEventToOffset;
@@ -58,8 +60,8 @@ public long getOffset(CloudEvent cloudEvent) {
 
     @Override
     public void run() {
-        while (!closed.get()) {
-            try {
+        try {
+            while (!closed.get()) {
                 ConsumerRecords records = consumer.poll(Duration.ofMillis(10000));
                 // Handle new records
                 records.forEach(rec -> {
@@ -72,16 +74,16 @@ public void commit(EventMeshAction action) {
                                 switch (action) {
                                     case CommitMessage:
                                         // update offset
-                                        logger.info("message commit, topic: {}, current offset:{}", topicName,
-                                            rec.offset());
+                                        log.info("message commit, topic: {}, current offset:{}", topicName,
+                                                rec.offset());
                                         break;
                                     case ReconsumeLater:
                                         // don't update offset
                                         break;
                                     case ManualAck:
                                         // update offset
-                                        logger
-                                            .info("message ack, topic: {}, current offset:{}", topicName, rec.offset());
+                                        log
+                                                .info("message ack, topic: {}, current offset:{}", topicName, rec.offset());
                                         break;
                                     default:
                                 }
@@ -92,18 +94,17 @@ public void commit(EventMeshAction action) {
                             listener.consume(cloudEvent, eventMeshAsyncConsumeContext);
                         }
                     } catch (Exception e) {
-                        logger.info("Error parsing cloudevents: " + e.getMessage());
+                        log.info("Error parsing cloudevents: {}", e.getMessage());
                     }
                 });
-            } catch (WakeupException e) {
-                // Ignore exception if closing
-                if (!closed.get()) {
-                    throw e;
-                }
-            } finally {
-                consumer.close();
-                break;
             }
+        } catch (WakeupException e) {
+            // Ignore exception if closing
+            if (!closed.get()) {
+                throw e;
+            }
+        } finally {
+            consumer.close();
         }
     }
 
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/KafkaProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/KafkaProducerImpl.java
index 0edaef459a..49bccf42f1 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/KafkaProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/KafkaProducerImpl.java
@@ -17,36 +17,33 @@
 
 package org.apache.eventmesh.connector.kafka.producer;
 
-
 import org.apache.eventmesh.api.RequestReplyCallback;
 import org.apache.eventmesh.api.SendCallback;
-import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
 import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.connector.kafka.config.ClientConfiguration;
 
-import org.apache.kafka.clients.admin.Admin;
-import org.apache.kafka.clients.producer.KafkaProducer;
 import org.apache.kafka.clients.producer.ProducerConfig;
-import org.apache.kafka.clients.producer.ProducerRecord;
-import org.apache.kafka.common.serialization.StringSerializer;
 
-import java.net.URI;
 import java.util.Properties;
-import java.util.Set;
 
 import io.cloudevents.CloudEvent;
-import io.cloudevents.core.builder.CloudEventBuilder;
-import io.cloudevents.kafka.CloudEventSerializer;
 
+@Config(field = "clientConfiguration")
 public class KafkaProducerImpl implements Producer {
 
     private ProducerImpl producer;
 
-    private Properties properties;
+    /**
+     * Unified configuration class corresponding to kafka-client.properties
+     */
+    private ClientConfiguration clientConfiguration;
 
     @Override
     public synchronized void init(Properties keyValue) {
-        keyValue.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
-        Properties properties = (Properties) keyValue.clone();
+        String namesrvAddr = clientConfiguration.namesrvAddr;
+
+        keyValue.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, namesrvAddr);
         this.producer = new ProducerImpl(keyValue);
     }
 
@@ -96,9 +93,12 @@ public void setExtFields() {
         // producer.setExtFields();
     }
 
-
     @Override
     public void sendOneway(CloudEvent message) {
         producer.sendOneway(message);
     }
+
+    public ClientConfiguration getClientConfiguration() {
+        return this.clientConfiguration;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/ProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/ProducerImpl.java
index 90efb383db..670aa46dd7 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/ProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/producer/ProducerImpl.java
@@ -19,7 +19,9 @@
 
 import org.apache.eventmesh.api.RequestReplyCallback;
 import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
 import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
 
 import org.apache.kafka.clients.admin.Admin;
 import org.apache.kafka.clients.producer.KafkaProducer;
@@ -27,14 +29,12 @@
 import org.apache.kafka.clients.producer.ProducerRecord;
 import org.apache.kafka.common.serialization.StringSerializer;
 
+import java.util.Objects;
 import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import io.cloudevents.CloudEvent;
 import io.cloudevents.kafka.CloudEventSerializer;
 
@@ -43,7 +43,6 @@
 @Slf4j
 @SuppressWarnings("deprecation")
 public class ProducerImpl {
-    private Logger logger = LoggerFactory.getLogger(ProducerImpl.class);
     private KafkaProducer producer;
     Properties properties;
 
@@ -81,11 +80,8 @@ public ProducerImpl init(Properties properties) throws Exception {
     }
 
     public void send(CloudEvent cloudEvent) {
-        // ProducerRecord msg =
-        //    KafkaMessageFactory.createWriter(Objects.requireNonNull(cloudEvent.getSubject()))
-        //    .writeBinary(cloudEvent);
         try {
-            this.producer.send(new ProducerRecord<>(cloudEvent.getSubject(), cloudEvent));
+            this.producer.send(new ProducerRecord<>(Objects.requireNonNull(cloudEvent.getSubject()), cloudEvent));
         } catch (Exception e) {
             log.error(String.format("Send message oneway Exception, %s", cloudEvent), e);
         }
@@ -114,7 +110,20 @@ public void sendOneway(CloudEvent message) {
 
     public void sendAsync(CloudEvent cloudEvent, SendCallback sendCallback) {
         try {
-            this.producer.send(new ProducerRecord<>(cloudEvent.getSubject(), cloudEvent));
+            this.producer.send(new ProducerRecord<>(cloudEvent.getSubject(), cloudEvent), (metadata, exception) -> {
+                if (exception != null) {
+                    ConnectorRuntimeException onsEx = new ConnectorRuntimeException(exception.getMessage(), exception);
+                    OnExceptionContext context = new OnExceptionContext();
+                    context.setTopic(cloudEvent.getSubject());
+                    context.setException(onsEx);
+                    sendCallback.onException(context);
+                } else {
+                    SendResult sendResult = new SendResult();
+                    sendResult.setTopic(cloudEvent.getSubject());
+                    sendResult.setMessageId(cloudEvent.getId());
+                    sendCallback.onSuccess(sendResult);
+                }
+            });
         } catch (Exception e) {
             log.error(String.format("Send message oneway Exception, %s", cloudEvent), e);
         }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/java/org/apache/eventmesh/connector/kafka/config/ClientConfigurationTest.java b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/java/org/apache/eventmesh/connector/kafka/config/ClientConfigurationTest.java
new file mode 100644
index 0000000000..24eacc325b
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/java/org/apache/eventmesh/connector/kafka/config/ClientConfigurationTest.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.kafka.config;
+
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+import org.apache.eventmesh.connector.kafka.consumer.KafkaConsumerImpl;
+import org.apache.eventmesh.connector.kafka.producer.KafkaProducerImpl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * test config of Kafka SPI Impl
+ */
+public class ClientConfigurationTest {
+
+    /**
+     * test KafkaConsumerImpl config init when ConnectorPluginFactory get it
+     */
+    @Test
+    public void getConfigWhenKafkaConsumerImplInit() {
+        KafkaConsumerImpl consumer =
+                (KafkaConsumerImpl) ConnectorPluginFactory.getMeshMQPushConsumer("kafka");
+
+        ClientConfiguration config = consumer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    /**
+     * test KafkaProducerImpl config init when ConnectorPluginFactory get it
+     */
+    @Test
+    public void getConfigWhenKafkaProducerImplInit() {
+        KafkaProducerImpl producer =
+                (KafkaProducerImpl) ConnectorPluginFactory.getMeshMQProducer("kafka");
+
+        ClientConfiguration config = producer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    private void assertConfig(ClientConfiguration config) {
+        Assert.assertEquals(config.namesrvAddr, "127.0.0.1:9092;127.0.0.1:9092");
+        Assert.assertEquals(config.clientUserName, "username-succeed!!!");
+        Assert.assertEquals(config.clientPass, "password-succeed!!!");
+        Assert.assertEquals(config.consumeThreadMin, Integer.valueOf(1816));
+        Assert.assertEquals(config.consumeThreadMax, Integer.valueOf(2816));
+        Assert.assertEquals(config.consumeQueueSize, Integer.valueOf(3816));
+        Assert.assertEquals(config.pullBatchSize, Integer.valueOf(4816));
+        Assert.assertEquals(config.ackWindow, Integer.valueOf(5816));
+        Assert.assertEquals(config.pubWindow, Integer.valueOf(6816));
+        Assert.assertEquals(config.consumeTimeout, 7816);
+        Assert.assertEquals(config.pollNameServerInterval, Integer.valueOf(8816));
+        Assert.assertEquals(config.heartbeatBrokerInterval, Integer.valueOf(9816));
+        Assert.assertEquals(config.rebalanceInterval, Integer.valueOf(11816));
+        Assert.assertEquals(config.clusterName, "cluster-succeed!!!");
+        Assert.assertEquals(config.accessKey, "accessKey-succeed!!!");
+        Assert.assertEquals(config.secretKey, "secretKey-succeed!!!");
+    }
+}
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/resources/kafka-client.properties b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/resources/kafka-client.properties
index 7afdf4c408..3b0c217e0a 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/resources/kafka-client.properties
+++ b/eventmesh-connector-plugin/eventmesh-connector-kafka/src/test/resources/kafka-client.properties
@@ -16,3 +16,33 @@
 #
 #######################kafka-client##################
 eventMesh.server.kafka.namesrvAddr=127.0.0.1:9092;127.0.0.1:9092
+eventMesh.server.kafka.username=username-succeed!!!
+eventMesh.server.kafka.password=password-succeed!!!
+eventMesh.server.kafka.client.consumeThreadMin=1816
+eventMesh.server.kafka.client.consumeThreadMax=2816
+eventMesh.server.kafka.client.consumeThreadPoolQueueSize=3816
+eventMesh.server.kafka.client.pullBatchSize=4816
+eventMesh.server.kafka.client.ackwindow=5816
+eventMesh.server.kafka.client.pubwindow=6816
+eventMesh.server.kafka.client.comsumeTimeoutInMin=7816
+eventMesh.server.kafka.client.pollNameServerInterval=8816
+eventMesh.server.kafka.client.heartbeatBrokerInterval=9816
+eventMesh.server.kafka.client.rebalanceInterval=11816
+eventMesh.server.kafka.cluster=cluster-succeed!!!
+eventMesh.server.kafka.accessKey=accessKey-succeed!!!
+eventMesh.server.kafka.secretKey=secretKey-succeed!!!
+eventMesh.server.kafka.username=username-succeed!!!
+eventMesh.server.kafka.password=password-succeed!!!
+eventMesh.server.kafka.client.consumeThreadMin=1816
+eventMesh.server.kafka.client.consumeThreadMax=2816
+eventMesh.server.kafka.client.consumeThreadPoolQueueSize=3816
+eventMesh.server.kafka.client.pullBatchSize=4816
+eventMesh.server.kafka.client.ackwindow=5816
+eventMesh.server.kafka.client.pubwindow=6816
+eventMesh.server.kafka.client.comsumeTimeoutInMin=7816
+eventMesh.server.kafka.client.pollNameServerInterval=8816
+eventMesh.server.kafka.client.heartbeatBrokerInterval=9816
+eventMesh.server.kafka.client.rebalanceInterval=11816
+eventMesh.server.kafka.cluster=cluster-succeed!!!
+eventMesh.server.kafka.accessKey=accessKey-succeed!!!
+eventMesh.server.kafka.secretKey=secretKey-succeed!!!
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/KnativeMessageFactory.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/KnativeMessageFactory.java
index 76cde999d9..a072f426e6 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/KnativeMessageFactory.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/KnativeMessageFactory.java
@@ -24,6 +24,9 @@
 
 import io.cloudevents.CloudEvent;
 
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public final class KnativeMessageFactory {
 
     private KnativeMessageFactory() {
@@ -31,10 +34,14 @@ private KnativeMessageFactory() {
     }
 
     public static String createReader(final CloudEvent message) {
+        if (message.getData() == null) {
+            log.warn("CloudEvent message's data is null.");
+            return "";
+        }
         return new String(message.getData().toBytes(), StandardCharsets.UTF_8);
     }
 
-    public static CloudEvent createWriter(Properties properties) {
-        return new KnativeMessageWriter(properties).message;
+    public static KnativeMessageWriter createWriter(final Properties properties) {
+        return new KnativeMessageWriter(properties);
     }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeBinaryMessageReader.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeBinaryMessageReader.java
index 366cd58a6b..fb7db5b7af 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeBinaryMessageReader.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeBinaryMessageReader.java
@@ -17,6 +17,7 @@
 
 package org.apache.eventmesh.connector.knative.cloudevent.impl;
 
+import java.util.Locale;
 import java.util.function.BiConsumer;
 
 import io.cloudevents.SpecVersion;
@@ -26,12 +27,12 @@
 public class KnativeBinaryMessageReader extends BaseGenericBinaryMessageReaderImpl {
 
     protected KnativeBinaryMessageReader(SpecVersion version, byte[] body) {
-        super(version, body != null && body.length > 0 ? BytesCloudEventData.wrap(body) : null);
+        super(version, body != null && body.length > 0 ? BytesCloudEventData.wrap(body) : (BytesCloudEventData) null);
     }
 
     @Override
     protected boolean isContentTypeHeader(String key) {
-        return key.equals(KnativeHeaders.CONTENT_TYPE);
+        return KnativeHeaders.CONTENT_TYPE.equals(key);
     }
 
     @Override
@@ -41,7 +42,7 @@ protected boolean isCloudEventsHeader(String key) {
 
     @Override
     protected String toCloudEventsKey(String key) {
-        return key.toLowerCase();
+        return key.toLowerCase(Locale.getDefault());
     }
 
     @Override
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeMessageWriter.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeMessageWriter.java
index 5f0b62f835..4a5ca0ff9e 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeMessageWriter.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeMessageWriter.java
@@ -33,17 +33,21 @@
 
 public class KnativeMessageWriter implements MessageWriter, String>, CloudEventWriter {
 
-    public CloudEvent message;
+    private transient CloudEvent message;
+
+    public CloudEvent getMessage() {
+        return this.message;
+    }
 
     public KnativeMessageWriter(Properties properties) {
         String s = "{ \"msg\": [\"" + properties.get("data") + "\"]}";
         this.message = new CloudEventBuilder()
-            .withId(properties.getProperty(KnativeHeaders.CE_ID))
-            .withSource(URI.create(properties.getProperty(KnativeHeaders.CE_SOURCE)))
-            .withType(properties.getProperty(KnativeHeaders.CE_TYPE))
-            .withDataContentType(properties.getProperty(KnativeHeaders.CONTENT_TYPE))
-            .withData(s.getBytes(StandardCharsets.UTF_8))
-            .build();
+                .withId(properties.getProperty(KnativeHeaders.CE_ID))
+                .withSource(URI.create(properties.getProperty(KnativeHeaders.CE_SOURCE)))
+                .withType(properties.getProperty(KnativeHeaders.CE_TYPE))
+                .withDataContentType(properties.getProperty(KnativeHeaders.CONTENT_TYPE))
+                .withData(s.getBytes(StandardCharsets.UTF_8))
+                .build();
     }
 
     @Override
@@ -53,7 +57,10 @@ public String end(CloudEventData data) throws CloudEventRWException {
 
     @Override
     public String end() throws CloudEventRWException {
-        return message.getData().toString();
+        if (message != null && message.getData() != null) {
+            return message.getData().toString();
+        }
+        throw CloudEventRWException.newOther(new IllegalArgumentException("message data is null"));
     }
 
     @Override
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ClientConfiguration.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ClientConfiguration.java
index 5ce9c8fa15..6e741cf956 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ClientConfiguration.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ClientConfiguration.java
@@ -17,28 +17,35 @@
 
 package org.apache.eventmesh.connector.knative.config;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.common.config.ConfigFiled;
+import org.apache.eventmesh.common.config.convert.converter.ListConverter.ListConverterSemi;
 
-import com.google.common.base.Preconditions;
+import java.util.List;
 
+import lombok.Data;
+
+@Data
+@Config(prefix = "eventMesh.server.knative", path = "classPath://knative-client.properties")
 public class ClientConfiguration {
 
-    public String emurl = "";
-    public String serviceAddr = "";
+    @ConfigFiled(field = "service", converter = ListConverterSemi.class)
+    public List service;
 
-    public void init() {
-        String serviceAddrStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_KNATIVE_SERVICE_ADDR);
-        Preconditions.checkState(StringUtils.isNotEmpty(serviceAddrStr),
-            String.format("%s error", ConfKeys.KEYS_EVENTMESH_KNATIVE_SERVICE_ADDR));
-        serviceAddr = StringUtils.trim(serviceAddrStr);
-        String[] temp = serviceAddr.split(";");
-        emurl = temp[0];
-        serviceAddr = temp[1];
-    }
-
-    static class ConfKeys {
+    /**
+     * In keeping with the old way of configuration parsing, the value is taken from the service field [0]
+     */
+    @ConfigFiled(reload = true)
+    public String emurl = "";
 
-        public static final String KEYS_EVENTMESH_KNATIVE_SERVICE_ADDR = "eventMesh.server.knative.service";
+    /**
+     * In keeping with the old way of configuration parsing, the value is taken from the service field [1]
+     */
+    @ConfigFiled(reload = true)
+    public String serviceAddr = "";
 
+    public void reload() {
+        emurl = this.service.get(0);
+        serviceAddr = this.service.get(1);
     }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ConfigurationWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ConfigurationWrapper.java
deleted file mode 100644
index 962f520b96..0000000000
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/config/ConfigurationWrapper.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eventmesh.connector.knative.config;
-
-import org.apache.eventmesh.common.Constants;
-import org.apache.eventmesh.connector.knative.common.EventMeshConstants;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import lombok.experimental.UtilityClass;
-import lombok.extern.slf4j.Slf4j;
-
-@Slf4j
-@UtilityClass
-public class ConfigurationWrapper {
-
-    private static final Properties properties = new Properties();
-
-    static {
-        loadProperties();
-    }
-
-    public String getProp(String key) {
-        return StringUtils.isEmpty(key) ? null : properties.getProperty(key, null);
-    }
-
-    /**
-     * Load Knative properties file from classpath and conf home.
-     * The properties defined in conf home will override classpath.
-     */
-    private void loadProperties() {
-        try (InputStream resourceAsStream = ConfigurationWrapper.class.getResourceAsStream(
-            "/" + EventMeshConstants.EVENTMESH_CONF_FILE)) {
-            if (resourceAsStream != null) {
-                properties.load(resourceAsStream);
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(String.format("Load %s.properties file from classpath error", EventMeshConstants.EVENTMESH_CONF_FILE));
-        }
-        try {
-            String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + EventMeshConstants.EVENTMESH_CONF_FILE;
-            if (new File(configPath).exists()) {
-                properties.load(new BufferedReader(new FileReader(configPath)));
-            }
-        } catch (IOException e) {
-            throw new IllegalArgumentException(String.format("Cannot load %s file from conf", EventMeshConstants.EVENTMESH_CONF_FILE));
-        }
-    }
-}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/DefaultConsumer.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/DefaultConsumer.java
index f10bfb134c..afd542c360 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/DefaultConsumer.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/DefaultConsumer.java
@@ -27,8 +27,6 @@
 import org.asynchttpclient.ListenableFuture;
 import org.asynchttpclient.Response;
 import org.asynchttpclient.util.HttpConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
 
@@ -37,10 +35,14 @@
 @Slf4j
 public class DefaultConsumer {
 
-    public Logger messageLogger = LoggerFactory.getLogger(DefaultConsumer.class);
+    private transient AsyncHttpClient asyncHttpClient;
 
-    AsyncHttpClient asyncHttpClient;
-    private EventMeshMessageListenerConcurrently messageListener;
+
+    private transient EventMeshMessageListenerConcurrently messageListener;
+
+    public EventMeshMessageListenerConcurrently getMessageListener() {
+        return messageListener;
+    }
 
     public DefaultConsumer() throws Exception {
         this.asyncHttpClient = asyncHttpClient();
@@ -57,7 +59,7 @@ public String pullMessage(String topic, String subscribeUrl) throws Exception {
 
         if (response.getStatusCode() == HttpConstants.ResponseStatusCodes.OK_200) {
             responseBody = response.getResponseBody();
-            messageLogger.info(responseBody);
+            log.info(responseBody);
             return responseBody;
         }
         throw new IllegalStateException("HTTP response code error: " + response.getStatusCode());
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImpl.java
index d3303fea5c..891f9b47f6 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImpl.java
@@ -20,6 +20,7 @@
 import org.apache.eventmesh.api.AbstractContext;
 import org.apache.eventmesh.api.EventListener;
 import org.apache.eventmesh.api.consumer.Consumer;
+import org.apache.eventmesh.common.config.Config;
 import org.apache.eventmesh.connector.knative.config.ClientConfiguration;
 
 import java.util.List;
@@ -27,17 +28,26 @@
 
 import io.cloudevents.CloudEvent;
 
+
+import lombok.extern.slf4j.Slf4j;
+
+@Config(field = "clientConfiguration")
+@Slf4j
 public class KnativeConsumerImpl implements Consumer {
 
-    private PullConsumerImpl pullConsumer;
+    private transient PullConsumerImpl pullConsumer;
+
+
+    /**
+     * Unified configuration class corresponding to knative-client.properties
+     */
+    private ClientConfiguration clientConfiguration;
 
     @Override
     public synchronized void init(Properties properties) throws Exception {
         // Load parameters from properties file:
-        final ClientConfiguration clientConfiguration = new ClientConfiguration();
-        clientConfiguration.init();
-        properties.put("emUrl", clientConfiguration.emurl);
-        properties.put("serviceAddr", clientConfiguration.serviceAddr);
+        properties.put("emUrl", clientConfiguration.getEmurl());
+        properties.put("serviceAddr", clientConfiguration.getServiceAddr());
 
         pullConsumer = new PullConsumerImpl(properties);
     }
@@ -52,7 +62,7 @@ public void unsubscribe(String topic) {
         try {
             pullConsumer.unsubscribe(topic);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("unsubscribe error", e);
         }
     }
 
@@ -85,4 +95,8 @@ public void start() {
     public void shutdown() {
         pullConsumer.shutdown();
     }
+
+    public ClientConfiguration getClientConfiguration() {
+        return this.clientConfiguration;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/PullConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/PullConsumerImpl.java
index b827503d2e..9378316480 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/PullConsumerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/consumer/PullConsumerImpl.java
@@ -36,23 +36,28 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 
+
 import io.cloudevents.CloudEvent;
 
 import com.google.common.collect.Lists;
 
-public class PullConsumerImpl {
+import lombok.extern.slf4j.Slf4j;
 
-    private final DefaultConsumer defaultConsumer;
+@Slf4j
+public class PullConsumerImpl {
+    private final transient  DefaultConsumer defaultConsumer;
 
     // Topics to subscribe:
-    private List topicList = null;
-    private final ConcurrentHashMap offsetMap;
-    private final AtomicBoolean started = new AtomicBoolean(false);
-    private final Properties properties;
+    private transient List topicList = null;
+    private final transient ConcurrentHashMap offsetMap;
+    private final transient AtomicBoolean started = new AtomicBoolean(false);
+    private final transient Properties properties;
 
     // Store received message:
-    public ConcurrentMap subscriptionInner;
-    public EventListener eventListener;
+    private transient ConcurrentMap subscriptionInner;
+    private transient EventListener eventListener;
+
+
 
     public PullConsumerImpl(final Properties properties) throws Exception {
         this.properties = properties;
@@ -72,16 +77,17 @@ public void subscribe(String topic) {
             topicList.add(new SubscriptionItem(topic, SubscriptionMode.CLUSTERING, SubscriptionType.ASYNC));
             // Pull event messages iteratively:
             topicList.forEach(
-                item -> {
-                    try {
-                        subscriptionInner.put(item.getTopic(), defaultConsumer.pullMessage(item.getTopic(), properties.getProperty("serviceAddr")));
-                    } catch (Exception e) {
-                        e.printStackTrace();
+                    item -> {
+                        try {
+                            subscriptionInner.put(item.getTopic(),
+                                    defaultConsumer.pullMessage(item.getTopic(), properties.getProperty("serviceAddr")));
+                        } catch (Exception e) {
+                            log.error("store received message error", e);
+                        }
                     }
-                }
             );
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("other error", e);
         }
     }
 
@@ -90,14 +96,14 @@ public void unsubscribe(String topic) {
             // Unsubscribe topic:
             topicList.remove(topic);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("unsubscribe topic error", e);
         }
     }
 
     // todo: offset
     public void updateOffset(List cloudEvents, AbstractContext context) {
         cloudEvents.forEach(cloudEvent -> this.updateOffset(
-            cloudEvent.getSubject(), (Long) cloudEvent.getExtension("offset"))
+                cloudEvent.getSubject(), (Long) cloudEvent.getExtension("offset"))
         );
     }
 
@@ -130,6 +136,7 @@ public void registerEventListener(EventListener listener) {
 
     // todo: load balancer cluser and broadcast
     private class ClusteringMessageListener extends EventMeshMessageListenerConcurrently {
+        @Override
         public EventMeshConsumeConcurrentlyStatus handleMessage(CloudEvent cloudEvent, EventMeshConsumeConcurrentlyContext context) {
             final Properties contextProperties = new Properties();
             contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name());
@@ -140,15 +147,15 @@ public void commit(EventMeshAction action) {
                     switch (action) {
                         case CommitMessage:
                             contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS,
-                                EventMeshConsumeConcurrentlyStatus.CONSUME_SUCCESS.name());
+                                    EventMeshConsumeConcurrentlyStatus.CONSUME_SUCCESS.name());
                             break;
                         case ReconsumeLater:
                             contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS,
-                                EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name());
+                                    EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name());
                             break;
                         case ManualAck:
                             contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS,
-                                EventMeshConsumeConcurrentlyStatus.CONSUME_FINISH.name());
+                                    EventMeshConsumeConcurrentlyStatus.CONSUME_FINISH.name());
                             break;
                         default:
                             break;
@@ -162,7 +169,7 @@ public void commit(EventMeshAction action) {
             eventListener.consume(cloudEvent, eventMeshAsyncConsumeContext);
 
             return EventMeshConsumeConcurrentlyStatus.valueOf(
-                contextProperties.getProperty(NonStandardKeys.MESSAGE_CONSUME_STATUS));
+                    contextProperties.getProperty(NonStandardKeys.MESSAGE_CONSUME_STATUS));
         }
     }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/domain/NonStandardKeys.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/domain/NonStandardKeys.java
index 3fefe67021..f8a092f602 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/domain/NonStandardKeys.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/domain/NonStandardKeys.java
@@ -20,8 +20,8 @@
 /**
  * NonStandardKeys
  */
-public interface NonStandardKeys {
+public class NonStandardKeys {
 
-    String MESSAGE_CONSUME_STATUS = "em.message.consume.status";
+    public static final String MESSAGE_CONSUME_STATUS = "em.message.consume.status";
 
 }
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/AbstractProducer.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/AbstractProducer.java
index 3050776315..02eba59c6b 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/AbstractProducer.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/AbstractProducer.java
@@ -26,17 +26,18 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.asynchttpclient.AsyncHttpClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import io.cloudevents.CloudEvent;
 
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public abstract class AbstractProducer implements Producer {
 
-    static final Logger logger = LoggerFactory.getLogger(AbstractProducer.class);
-    protected final AtomicBoolean started = new AtomicBoolean(false);
-    final Properties properties;
-    AsyncHttpClient asyncHttpClient;
+    protected final transient AtomicBoolean started = new AtomicBoolean(false);
+    protected final transient Properties properties;
+    private transient AsyncHttpClient asyncHttpClient;
 
     AbstractProducer(final Properties properties) {
         this.properties = properties;
@@ -50,10 +51,12 @@ ConnectorRuntimeException checkProducerException(CloudEvent cloudEvent, Throwabl
         return new ConnectorRuntimeException(String.format("Unknown connector runtime exception.", e));
     }
 
+    @Override
     public boolean isStarted() {
         return started.get();
     }
 
+    @Override
     public boolean isClosed() {
         return !this.isStarted();
     }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImpl.java
index 3c0a22a15e..3e3c5f0768 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImpl.java
@@ -21,23 +21,27 @@
 import org.apache.eventmesh.api.SendCallback;
 import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
 import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.common.config.Config;
 import org.apache.eventmesh.connector.knative.config.ClientConfiguration;
 
 import java.util.Properties;
 
 import io.cloudevents.CloudEvent;
 
+@Config(field = "clientConfiguration")
 public class KnativeProducerImpl implements Producer {
 
-    private ProducerImpl producer;
+    private transient ProducerImpl producer;
+
+    /**
+     * Unified configuration class corresponding to knative-client.properties
+     */
+    private ClientConfiguration clientConfiguration;
 
     @Override
     public synchronized void init(Properties properties) throws Exception {
         // Load parameters from properties file:
-        final ClientConfiguration clientConfiguration = new ClientConfiguration();
-        clientConfiguration.init();
-
-        properties.put("url", clientConfiguration.serviceAddr);
+        properties.put("url", clientConfiguration.getServiceAddr());
         producer = new ProducerImpl(properties);
     }
 
@@ -90,4 +94,8 @@ public void checkTopicExist(String topic) throws Exception {
     public void setExtFields() {
         throw new ConnectorRuntimeException("SetExtFields is not supported");
     }
+
+    public ClientConfiguration getClientConfiguration() {
+        return this.clientConfiguration;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/ProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/ProducerImpl.java
index fbfd9eadb3..f97d8c7529 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/ProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/main/java/org/apache/eventmesh/connector/knative/producer/ProducerImpl.java
@@ -76,8 +76,8 @@ public void sendAsync(CloudEvent cloudEvent, SendCallback sendCallback) {
         try {
             this.send(cloudEvent, sendCallback);
         } catch (Exception e) {
-            logger.error(String.format("Send cloudevent message Exception, %s", e));
-            throw new ConnectorRuntimeException("Send cloudevent message Exception.");
+            //LOG.error("Send cloudevent message Exception", e);
+            throw new ConnectorRuntimeException("Send cloudevent message Exception.", e);
         }
     }
 
@@ -91,6 +91,7 @@ public void publish(CloudEvent cloudEvent, SendCallback sendCallback) throws Exc
         this.sendAsync(cloudEvent, sendCallback);
     }
 
+    @Override
     public void sendOneway(CloudEvent cloudEvent) {
         throw new ConnectorRuntimeException("SendOneWay is not supported");
     }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/config/ClientConfigurationTest.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/config/ClientConfigurationTest.java
new file mode 100644
index 0000000000..aa13b3a608
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/config/ClientConfigurationTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.knative.config;
+
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+import org.apache.eventmesh.connector.knative.consumer.KnativeConsumerImpl;
+import org.apache.eventmesh.connector.knative.producer.KnativeProducerImpl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ClientConfigurationTest {
+
+    @Test
+    public void getConfigWhenKnativeConsumerInit() {
+        KnativeConsumerImpl consumer =
+                (KnativeConsumerImpl) ConnectorPluginFactory.getMeshMQPushConsumer("knative");
+
+        ClientConfiguration config = consumer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    @Test
+    public void getConfigWhenKnativeProducerInit() {
+        KnativeProducerImpl producer =
+                (KnativeProducerImpl) ConnectorPluginFactory.getMeshMQProducer("knative");
+
+        ClientConfiguration config = producer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    private void assertConfig(ClientConfiguration config) {
+        Assert.assertEquals(config.getEmurl(), "127.0.0.1");
+        Assert.assertEquals(config.getServiceAddr(), "cloudevents-player.default.127.0.0.1.sslip.io");
+    }
+}
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImplTest.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImplTest.java
index 69184ea126..c5690fb753 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImplTest.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/consumer/KnativeConsumerImplTest.java
@@ -17,8 +17,11 @@
 
 package org.apache.eventmesh.connector.knative.consumer;
 
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+
 import java.util.Properties;
 
+import org.junit.Assert;
 import org.junit.Test;
 
 public class KnativeConsumerImplTest {
@@ -30,10 +33,16 @@ public void testSubscribe() throws Exception {
         properties.put("topic", topic);
 
         // Create a Knative consumer:
-        KnativeConsumerImpl knativeConsumer = new KnativeConsumerImpl();
-        knativeConsumer.init(properties);
+        KnativeConsumerImpl knativeConsumer =
+                (KnativeConsumerImpl) ConnectorPluginFactory.getMeshMQPushConsumer("knative");
+
+        try {
+            knativeConsumer.init(properties);
 
-        // Subscribe:
-        knativeConsumer.subscribe(properties.getProperty("topic"));
+            // Subscribe:
+            knativeConsumer.subscribe(properties.getProperty("topic"));
+        } catch (Exception e) {
+            Assert.fail(e.getMessage());
+        }
     }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImplTest.java b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImplTest.java
index e81e8fdc3c..a4ca490aac 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImplTest.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/java/org/apache/eventmesh/connector/knative/producer/KnativeProducerImplTest.java
@@ -20,11 +20,13 @@
 import org.apache.eventmesh.api.SendCallback;
 import org.apache.eventmesh.api.SendResult;
 import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
 import org.apache.eventmesh.connector.knative.cloudevent.KnativeMessageFactory;
 import org.apache.eventmesh.connector.knative.cloudevent.impl.KnativeHeaders;
 
 import java.util.Properties;
 
+import org.junit.Assert;
 import org.junit.Test;
 
 public class KnativeProducerImplTest {
@@ -41,18 +43,24 @@ public void testPublish() throws Exception {
         properties.put("data", "Hello Knative from EventMesh!");
 
         // Create a Knative producer:
-        KnativeProducerImpl knativehProducer = new KnativeProducerImpl();
-        knativehProducer.init(properties);
-
-        // Publish an event message:
-        knativehProducer.publish(KnativeMessageFactory.createWriter(properties), new SendCallback() {
-            @Override
-            public void onSuccess(SendResult sendResult) {
-            }
-
-            @Override
-            public void onException(OnExceptionContext context) {
-            }
-        });
+        KnativeProducerImpl knativehProducer =
+                (KnativeProducerImpl) ConnectorPluginFactory.getMeshMQProducer("knative");
+
+        try {
+            knativehProducer.init(properties);
+
+            // Publish an event message:
+            knativehProducer.publish(KnativeMessageFactory.createWriter(properties).getMessage(), new SendCallback() {
+                @Override
+                public void onSuccess(SendResult sendResult) {
+                }
+
+                @Override
+                public void onException(OnExceptionContext context) {
+                }
+            });
+        } catch (Exception e) {
+            Assert.fail(e.getMessage());
+        }
     }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/resources/knative-client.properties b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/resources/knative-client.properties
new file mode 100644
index 0000000000..8fec1c4302
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-knative/src/test/resources/knative-client.properties
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#######################knative-client##################
+eventMesh.server.knative.service=127.0.0.1;cloudevents-player.default.127.0.0.1.sslip.io
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/README.md b/eventmesh-connector-plugin/eventmesh-connector-pravega/README.md
index 34b19ae213..6182a5dfd7 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/README.md
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/README.md
@@ -10,7 +10,7 @@ Naturally, Pravega connector makes each topic correspond to a pravega stream. Be
 - Publish success will respond `-1` as messageId since writing to Pravega will not return message offset of the stream. If you want to use EventMesh with Pravega, please ensure messageId is unimportant.
 - Name and ID in Pravega must be `0-9`, `A-Z`, `a-z`, `.`, `-`.
   - Topic must be legal in Pravega.
-  - ReaderGroup name format is `String.format("%s-%s", consumerGroup, topic)`
+  - ReaderGroup name format is `String.format("%s-%s", consumerGroup, topic)` for cluster message model, while random UUID for broadcast message model.
   - Reader name format is `String.format("%s-reader", instanceName).replaceAll("\\(", "-").replaceAll("\\)", "-")`. The `instanceName` consists of `consumerGroup`, config `eventMesh.server.cluster`, EventMesh version and PID. 
 
 ![pravega-connector](./pravega-connector.jpg)
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-pravega/build.gradle
index 7848be104e..c6650440fe 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/build.gradle
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/build.gradle
@@ -27,7 +27,7 @@ dependencies {
         exclude group: 'io.netty', module: 'netty-codec-http2:4.1.30.Final'
     }
     // use newer version to avoid CVE
-    implementation 'io.netty:netty-codec-http2:4.1.79.Final'
+    implementation 'io.netty:netty-codec-http2'
 
     testImplementation "org.testcontainers:testcontainers:1.17.3"
 
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaConsumerImpl.java
index 5c06f6d4ad..5415d328ae 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaConsumerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaConsumerImpl.java
@@ -20,7 +20,9 @@
 import org.apache.eventmesh.api.AbstractContext;
 import org.apache.eventmesh.api.EventListener;
 import org.apache.eventmesh.api.consumer.Consumer;
+import org.apache.eventmesh.common.config.Config;
 import org.apache.eventmesh.connector.pravega.client.PravegaClient;
+import org.apache.eventmesh.connector.pravega.config.PravegaConnectorConfig;
 import org.apache.eventmesh.connector.pravega.exception.PravegaConnectorException;
 
 import java.util.List;
@@ -32,9 +34,15 @@
 import lombok.extern.slf4j.Slf4j;
 
 @Slf4j
+@Config(field = "pravegaConnectorConfig")
 public class PravegaConsumerImpl implements Consumer {
     private static final AtomicBoolean started = new AtomicBoolean(false);
 
+    /**
+     * Unified configuration class corresponding to pravega-connector.properties
+     */
+    private PravegaConnectorConfig pravegaConnectorConfig;
+
     private boolean isBroadcast;
     private String instanceName;
     private String consumerGroup;
@@ -46,7 +54,8 @@ public void init(Properties keyValue) throws Exception {
         isBroadcast = Boolean.parseBoolean(keyValue.getProperty("isBroadcast", "false"));
         instanceName = keyValue.getProperty("instanceName", "");
         consumerGroup = keyValue.getProperty("consumerGroup", "");
-        client = PravegaClient.getInstance();
+
+        client = PravegaClient.getInstance(pravegaConnectorConfig);
     }
 
     @Override
@@ -92,4 +101,8 @@ public void unsubscribe(String topic) {
     public void registerEventListener(EventListener listener) {
         this.eventListener = listener;
     }
+
+    public PravegaConnectorConfig getClientConfiguration() {
+        return this.pravegaConnectorConfig;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaProducerImpl.java
index a5aa1d2909..58bd0b31bc 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/PravegaProducerImpl.java
@@ -23,7 +23,9 @@
 import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
 import org.apache.eventmesh.api.exception.OnExceptionContext;
 import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.common.config.Config;
 import org.apache.eventmesh.connector.pravega.client.PravegaClient;
+import org.apache.eventmesh.connector.pravega.config.PravegaConnectorConfig;
 import org.apache.eventmesh.connector.pravega.exception.PravegaConnectorException;
 
 import java.util.Properties;
@@ -34,13 +36,19 @@
 import lombok.extern.slf4j.Slf4j;
 
 @Slf4j
+@Config(field = "pravegaConnectorConfig")
 public class PravegaProducerImpl implements Producer {
     private final AtomicBoolean started = new AtomicBoolean(false);
     private PravegaClient client;
 
+    /**
+     * Unified configuration class corresponding to pravega-connector.properties
+     */
+    private PravegaConnectorConfig pravegaConnectorConfig;
+
     @Override
     public void init(Properties properties) throws Exception {
-        client = PravegaClient.getInstance();
+        client = PravegaClient.getInstance(pravegaConnectorConfig);
     }
 
     @Override
@@ -105,4 +113,8 @@ public void checkTopicExist(String topic) throws Exception {
     public void setExtFields() {
 
     }
+
+    public PravegaConnectorConfig getClientConfiguration() {
+        return this.pravegaConnectorConfig;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaClient.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaClient.java
index 7c54cc1190..ad353abca3 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaClient.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaClient.java
@@ -57,6 +57,18 @@ public class PravegaClient {
 
     private static PravegaClient instance;
 
+    public static PravegaClient getInstance() {
+        return instance;
+    }
+
+    public static PravegaClient getInstance(PravegaConnectorConfig config) {
+        if (instance == null) {
+            instance = new PravegaClient(config);
+        }
+
+        return instance;
+    }
+
     private PravegaClient(PravegaConnectorConfig config) {
         this.config = config;
         streamManager = StreamManager.create(config.getControllerURI());
@@ -72,22 +84,15 @@ private PravegaClient(PravegaConnectorConfig config) {
         readerGroupManager = ReaderGroupManager.withScope(config.getScope(), clientConfig);
     }
 
-    public static PravegaClient getInstance() {
-        if (instance == null) {
-            instance = new PravegaClient(PravegaConnectorConfig.getInstance());
-        }
-        return instance;
-    }
-
     protected static PravegaClient getNewInstance(PravegaConnectorConfig config) {
         return new PravegaClient(config);
     }
 
     public void start() {
         if (createScope()) {
-            log.info("Create Pravega scope[{}] success.", PravegaConnectorConfig.getInstance().getScope());
+            log.info("Create Pravega scope[{}] success.", config.getScope());
         } else {
-            log.info("Pravega scope[{}] has already been created.", PravegaConnectorConfig.getInstance().getScope());
+            log.info("Pravega scope[{}] has already been created.", config.getScope());
         }
     }
 
@@ -120,6 +125,7 @@ public SendResult publish(String topic, CloudEvent cloudEvent) {
         try {
             writer.writeEvent(PravegaEvent.toByteArray(pravegaEvent)).get(5, TimeUnit.SECONDS);
         } catch (ExecutionException | InterruptedException | TimeoutException e) {
+            log.error(String.format("Write topic[%s] fail.", topic), e);
             throw new PravegaConnectorException(String.format("Write topic[%s] fail.", topic));
         }
         SendResult sendResult = new SendResult();
@@ -152,7 +158,6 @@ public boolean unsubscribe(String topic, boolean isBroadcast, String consumerGro
             deleteReaderGroup(buildReaderGroupName(false, consumerGroup, topic));
         }
         subscribeTaskMap.remove(topic).stopRead();
-        writerMap.remove(topic).close();
         return true;
     }
 
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaEvent.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaEvent.java
index 4ce37cc607..e5ecbb13d2 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaEvent.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/client/PravegaEvent.java
@@ -45,11 +45,11 @@ public class PravegaEvent implements Serializable {
     private long createTimestamp;
 
     public static byte[] toByteArray(PravegaEvent pravegaEvent) {
-        return JsonUtils.serialize(pravegaEvent).getBytes(StandardCharsets.UTF_8);
+        return JsonUtils.toJSONString(pravegaEvent).getBytes(StandardCharsets.UTF_8);
     }
 
     public static PravegaEvent getFromByteArray(byte[] body) {
-        return JsonUtils.deserialize(new String(body, StandardCharsets.UTF_8), PravegaEvent.class);
+        return JsonUtils.parseObject(new String(body, StandardCharsets.UTF_8), PravegaEvent.class);
     }
 
     public CloudEvent convertToCloudEvent() {
@@ -64,7 +64,7 @@ public CloudEvent convertToCloudEvent() {
             default:
                 throw new PravegaConnectorException(String.format("CloudEvent version %s does not support.", version));
         }
-        builder.withData(data.getBytes())
+        builder.withData(data.getBytes(StandardCharsets.UTF_8))
             .withId(extensions.remove("id"))
             .withSource(URI.create(extensions.remove("source")))
             .withType(extensions.remove("type"))
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfig.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfig.java
index e56e8fa638..b7c5ffbac0 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfig.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfig.java
@@ -17,6 +17,9 @@
 
 package org.apache.eventmesh.connector.pravega.config;
 
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.common.config.ConfigFiled;
+
 import org.apache.commons.lang3.StringUtils;
 
 import java.net.URI;
@@ -26,87 +29,38 @@
 
 @Getter
 @Setter
+@Config(prefix = "eventMesh.server.pravega", path = "classPath://pravega-connector.properties")
 public class PravegaConnectorConfig {
-    public static String EVENTMESH_PRAVEGA_CONTROLLER_URI = "eventMesh.server.pravega.controller.uri";
-    public static String EVENTMESH_PRAVEGA_SCOPE = "eventMesh.server.pravega.scope";
-    public static String EVENTMESH_PRAVEGA_AUTH_ENABLED = "eventMesh.server.pravega.authEnabled";
-    public static String EVENTMESH_PRAVEGA_USERNAME = "eventMesh.server.pravega.username";
-    public static String EVENTMESH_PRAVEGA_PASSWORD = "eventMesh.server.pravega.password";
-    public static String EVENTMESH_PRAVEGA_TLS_ENABLED = "eventMesh.server.pravega.tlsEnabled";
-    public static String EVENTMESH_PRAVEGA_TRUSTSTORE = "eventMesh.server.pravega.truststore";
-    public static String EVENTMESH_PRAVEGA_CLIENTPOOL_SIZE = "eventMesh.server.pravega.clientPool.size";
-    public static String EVENTMESH_PRAVEGA_QUEUE_SIZE = "eventMesh.server.pravega.queue.size";
 
+    @ConfigFiled(field = "controller.uri")
     private URI controllerURI = URI.create("tcp://127.0.0.1:9090");
-    private String scope = "eventmesh-pravega";
-    private int clientPoolSize = 8;
-    private int queueSize = 512;
-    private boolean authEnabled = false;
-    private String username = "";
-    private String password = "";
-    private boolean tlsEnable = false;
-    private String truststore = "";
-
-    private static PravegaConnectorConfig INSTANCE = null;
-
-    private PravegaConnectorConfig() {
-    }
-
-    public static synchronized PravegaConnectorConfig getInstance() {
-        if (INSTANCE == null) {
-            INSTANCE = new PravegaConnectorConfig();
-            INSTANCE.init();
-        }
-        return INSTANCE;
-    }
-
-    private void init() {
-        String controllerURIStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_CONTROLLER_URI);
-        if (StringUtils.isNotBlank(controllerURIStr)) {
-            controllerURI = URI.create(StringUtils.trim(controllerURIStr));
-        }
 
-        String scopeStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_SCOPE);
-        if (StringUtils.isNotBlank(scopeStr)) {
-            scope = StringUtils.trim(scopeStr);
-        }
+    @ConfigFiled(field = "scope")
+    private String scope = "eventmesh-pravega";
 
-        String authEnableStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_AUTH_ENABLED);
-        if (StringUtils.isNotBlank(authEnableStr)) {
-            authEnabled = Boolean.parseBoolean(StringUtils.trim(authEnableStr));
-        }
+    @ConfigFiled(field = "clientPool.size")
+    private int clientPoolSize = 8;
 
-        String usernameStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_USERNAME);
-        if (StringUtils.isNotBlank(usernameStr)) {
-            username = StringUtils.trim(usernameStr);
-        }
+    @ConfigFiled(field = "queue.size")
+    private int queueSize = 512;
 
-        String passwordStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_PASSWORD);
-        if (StringUtils.isNotBlank(passwordStr)) {
-            password = StringUtils.trim(passwordStr);
-        }
+    @ConfigFiled(field = "authEnabled", reload = true)
+    private boolean authEnabled = false;
 
-        String tlsEnableStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_TLS_ENABLED);
-        if (StringUtils.isNotBlank(tlsEnableStr)) {
-            tlsEnable = Boolean.parseBoolean(StringUtils.trim(tlsEnableStr));
-        }
+    @ConfigFiled(field = "username")
+    private String username = "";
 
-        String truststoreStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_TRUSTSTORE);
-        if (StringUtils.isNotBlank(truststoreStr)) {
-            truststore = StringUtils.trim(truststoreStr);
-        }
+    @ConfigFiled(field = "password")
+    private String password = "";
 
-        String clientPoolSizeStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_CLIENTPOOL_SIZE);
-        if (StringUtils.isNumeric(clientPoolSizeStr)) {
-            clientPoolSize = Integer.parseInt(clientPoolSizeStr);
-        }
+    @ConfigFiled(field = "tlsEnabled")
+    private boolean tlsEnable = false;
 
-        String queueSizeStr = PravegaConnectorConfigWrapper.getProp(EVENTMESH_PRAVEGA_QUEUE_SIZE);
-        if (StringUtils.isNumeric(queueSizeStr)) {
-            queueSize = Integer.parseInt(queueSizeStr);
-        }
+    @ConfigFiled(field = "truststore")
+    private String truststore = "";
 
-        if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {
+    public void reload() {
+        if (!authEnabled && StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {
             authEnabled = true;
         }
     }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigWrapper.java
deleted file mode 100644
index 4ccc85f25e..0000000000
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/main/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigWrapper.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eventmesh.connector.pravega.config;
-
-import org.apache.eventmesh.common.Constants;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import lombok.experimental.UtilityClass;
-import lombok.extern.slf4j.Slf4j;
-
-@Slf4j
-@UtilityClass
-public class PravegaConnectorConfigWrapper {
-    public static final String PRAVEGA_CONF_FILE = "pravega-connector.properties";
-
-    private static final Properties properties = new Properties();
-
-    static {
-        loadProperties();
-    }
-
-    public String getProp(String key) {
-        return StringUtils.isEmpty(key) ? null : properties.getProperty(key, null);
-    }
-
-    /**
-     * Load DLedger properties file from classpath and conf home.
-     * The properties defined in conf home will override classpath.
-     */
-    private void loadProperties() {
-        try (InputStream resourceAsStream = PravegaConnectorConfigWrapper.class.getResourceAsStream(
-            "/" + PRAVEGA_CONF_FILE)) {
-            if (resourceAsStream != null) {
-                properties.load(resourceAsStream);
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(String.format("Load %s.properties file from classpath error", PRAVEGA_CONF_FILE));
-        }
-        try {
-            String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + PRAVEGA_CONF_FILE;
-            if (new File(configPath).exists()) {
-                properties.load(new BufferedReader(new FileReader(configPath)));
-            }
-        } catch (IOException e) {
-            throw new IllegalArgumentException(String.format("Cannot load %s file from conf", PRAVEGA_CONF_FILE));
-        }
-    }
-}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/client/PravegaClientTest.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/client/PravegaClientTest.java
index c3d29271ed..f4673508a9 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/client/PravegaClientTest.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/client/PravegaClientTest.java
@@ -24,9 +24,11 @@
 
 import org.apache.eventmesh.api.AsyncConsumeContext;
 import org.apache.eventmesh.api.EventListener;
+import org.apache.eventmesh.common.config.ConfigService;
 import org.apache.eventmesh.connector.pravega.config.PravegaConnectorConfig;
 
 import java.net.URI;
+import java.nio.charset.StandardCharsets;
 import java.util.function.Consumer;
 
 import org.junit.Before;
@@ -144,10 +146,12 @@ public void checkTopicExistTest() {
         assertTrue(pravegaClient.checkTopicExist("test1"));
     }
 
-    private PravegaClient getNewPravegaClient() {
-        config = PravegaConnectorConfig.getInstance();
-        config.setControllerURI(controllerURI);
-        return PravegaClient.getNewInstance(config);
+    public PravegaClient getNewPravegaClient() {
+        ConfigService configService = ConfigService.getInstance();
+
+        this.config = configService.buildConfigInstance(PravegaConnectorConfig.class);
+        this.config.setControllerURI(controllerURI);
+        return PravegaClient.getNewInstance(this.config);
     }
 
     private CloudEvent createCloudEvent() {
@@ -160,7 +164,7 @@ private CloudEvent createCloudEvent() {
             .withType("http_request")
             .withDataContentType("application/json")
             .withSubject("TEST-TOPIC-HTTP-ASYNC")
-            .withData(data.getBytes())
+            .withData(data.getBytes(StandardCharsets.UTF_8))
             .withExtension("reqeventmesh2mqtimestamp", "1659342713460")
             .withExtension("ip", "127.0.0.1:51226")
             .withExtension("idc", "idc")
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigTest.java b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigTest.java
index ef638a6386..4256f8cafb 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigTest.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/java/org/apache/eventmesh/connector/pravega/config/PravegaConnectorConfigTest.java
@@ -17,65 +17,44 @@
 
 package org.apache.eventmesh.connector.pravega.config;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+import org.apache.eventmesh.connector.pravega.PravegaConsumerImpl;
+import org.apache.eventmesh.connector.pravega.PravegaProducerImpl;
 
 import java.net.URI;
 
-import org.junit.BeforeClass;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class PravegaConnectorConfigTest {
 
-    private static PravegaConnectorConfig config;
-
-    @BeforeClass
-    public static void init() {
-        config = PravegaConnectorConfig.getInstance();
-    }
-
-    @Test
-    public void getControllerURI() {
-        assertEquals(URI.create("tcp://127.0.0.1:9090"), config.getControllerURI());
-    }
-
-    @Test
-    public void getScope() {
-        assertEquals("eventmesh-pravega", config.getScope());
-    }
-
-    @Test
-    public void isAuthEnabled() {
-        assertFalse(config.isAuthEnabled());
-    }
-
-    @Test
-    public void getUsername() {
-        assertEquals("", config.getUsername());
-    }
-
     @Test
-    public void getPassword() {
-        assertEquals("", config.getPassword());
-    }
+    public void getConfigWhenPravegaConsumerInit() {
+        PravegaConsumerImpl consumer =
+                (PravegaConsumerImpl) ConnectorPluginFactory.getMeshMQPushConsumer("pravega");
 
-    @Test
-    public void isTslEnabled() {
-        assertFalse(config.isTlsEnable());
+        PravegaConnectorConfig config = consumer.getClientConfiguration();
+        assertConfig(config);
     }
 
     @Test
-    public void getTruststore() {
-        assertEquals("", config.getTruststore());
-    }
+    public void getConfigWhenPravegaProducerInit() {
+        PravegaProducerImpl producer =
+                (PravegaProducerImpl) ConnectorPluginFactory.getMeshMQProducer("pravega");
 
-    @Test
-    public void getClientPoolSize() {
-        assertEquals(8, config.getClientPoolSize());
+        PravegaConnectorConfig config = producer.getClientConfiguration();
+        assertConfig(config);
     }
 
-    @Test
-    public void getQueueSize() {
-        assertEquals(512, config.getQueueSize());
+    private void assertConfig(PravegaConnectorConfig config) {
+        Assert.assertEquals(config.getControllerURI(), URI.create("tcp://127.0.0.1:816"));
+        Assert.assertEquals(config.getScope(), "scope-success!!!");
+        Assert.assertTrue(config.isAuthEnabled());
+        Assert.assertEquals(config.getUsername(), "username-success!!!");
+        Assert.assertEquals(config.getPassword(), "password-success!!!");
+        Assert.assertTrue(config.isTlsEnable());
+        Assert.assertEquals(config.getTruststore(), "truststore-success!!!");
+        Assert.assertEquals(config.getClientPoolSize(), 816);
+        Assert.assertEquals(config.getQueueSize(), 1816);
     }
 }
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/resources/pravega-connector.properties b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/resources/pravega-connector.properties
index 25fa6f0af4..5bb5e54907 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/resources/pravega-connector.properties
+++ b/eventmesh-connector-plugin/eventmesh-connector-pravega/src/test/resources/pravega-connector.properties
@@ -15,12 +15,12 @@
 # limitations under the License.
 #
 #######################pravega-client##################
-eventMesh.server.pravega.controller.uri=tcp://127.0.0.1:9090
-eventMesh.server.pravega.scope=eventmesh-pravega
+eventMesh.server.pravega.controller.uri=tcp://127.0.0.1:816
+eventMesh.server.pravega.scope=scope-success!!!
 eventMesh.server.pravega.authEnabled=false
-eventMesh.server.pravega.username=
-eventMesh.server.pravega.password=
-eventMesh.server.pravega.tlsEnabled=false
-eventMesh.server.pravega.truststore=
-eventMesh.server.pravega.clientPool.size=8
-eventMesh.server.pravega.queue.size=512
\ No newline at end of file
+eventMesh.server.pravega.username=username-success!!!
+eventMesh.server.pravega.password=password-success!!!
+eventMesh.server.pravega.tlsEnabled=true
+eventMesh.server.pravega.truststore=truststore-success!!!
+eventMesh.server.pravega.clientPool.size=816
+eventMesh.server.pravega.queue.size=1816
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/client/PulsarClientWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/client/PulsarClientWrapper.java
new file mode 100644
index 0000000000..076ca005c5
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/client/PulsarClientWrapper.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.pulsar.client;
+
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.connector.pulsar.config.ClientConfiguration;
+import org.apache.eventmesh.connector.pulsar.utils.CloudEventUtils;
+
+import org.apache.pulsar.client.api.ClientBuilder;
+import org.apache.pulsar.client.api.Producer;
+import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.client.api.PulsarClientException;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import io.cloudevents.CloudEvent;
+import io.cloudevents.core.provider.EventFormatProvider;
+import io.cloudevents.jackson.JsonFormat;
+
+import com.google.common.base.Preconditions;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class PulsarClientWrapper {
+
+    private ClientConfiguration config;
+    private PulsarClient pulsarClient;
+    private Map> producerMap = new HashMap<>();
+
+    public PulsarClientWrapper(ClientConfiguration config)  {
+        this.config = config;
+        try {
+            ClientBuilder clientBuilder = PulsarClient.builder()
+                .serviceUrl(config.getServiceAddr());
+
+            if (config.getAuthPlugin() != null) {
+                Preconditions.checkNotNull(config.getAuthParams(),
+                    "Authentication Enabled in pulsar cluster, Please set authParams in pulsar-client.properties");
+                clientBuilder.authentication(
+                    config.getAuthPlugin(),
+                    config.getAuthParams()
+                );
+            }
+
+            this.pulsarClient = clientBuilder.build();
+        } catch (PulsarClientException ex) {
+            throw new ConnectorRuntimeException(
+              String.format("Failed to connect pulsar cluster %s with exception: %s", config.getServiceAddr(), ex.getMessage()));
+        }
+    }
+
+    private Producer createProducer(String topic) {
+        try {
+            return this.pulsarClient.newProducer()
+                .topic(topic)
+                .batchingMaxPublishDelay(10, TimeUnit.MILLISECONDS)
+                .sendTimeout(10, TimeUnit.SECONDS)
+                .blockIfQueueFull(true)
+                .create();
+        } catch (PulsarClientException ex) {
+            throw new ConnectorRuntimeException(
+              String.format("Failed to create pulsar producer for %s with exception: %s", topic, ex.getMessage()));
+        }
+    }
+
+    public void publish(CloudEvent cloudEvent, SendCallback sendCallback) {
+        String topic = cloudEvent.getSubject();
+        Producer producer = producerMap.computeIfAbsent(topic, k -> createProducer(topic));
+        try {
+            byte[] serializedCloudEvent = EventFormatProvider
+                .getInstance()
+                .resolveFormat(JsonFormat.CONTENT_TYPE)
+                .serialize(cloudEvent);
+            producer.sendAsync(serializedCloudEvent).thenAccept(messageId -> {
+                sendCallback.onSuccess(CloudEventUtils.convertSendResult(cloudEvent));
+            });
+        } catch (Exception ex) {
+            log.error("Failed to publish cloudEvent for {} with exception: {}",
+                cloudEvent.getSubject(), ex.getMessage());
+        }
+    }
+
+    public void shutdown() throws PulsarClientException {
+        pulsarClient.close();
+        for (Map.Entry> producerEntry : producerMap.entrySet()) {
+            producerEntry.getValue().close();
+        }
+        producerMap.clear();
+    }
+
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ClientConfiguration.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ClientConfiguration.java
index d57d64e18e..9410debf59 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ClientConfiguration.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ClientConfiguration.java
@@ -17,24 +17,23 @@
 
 package org.apache.eventmesh.connector.pulsar.config;
 
-import org.apache.commons.lang3.StringUtils;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.common.config.ConfigFiled;
 
-import com.google.common.base.Preconditions;
+import lombok.Getter;
+import lombok.Setter;
 
+@Getter
+@Setter
+@Config(prefix = "eventMesh.server.pulsar", path = "classPath://pulsar-client.properties")
 public class ClientConfiguration {
 
-    public String serviceAddr = "";
+    @ConfigFiled(field = "service")
+    private String serviceAddr;
 
-    public void init() {
-        String serviceAddrStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_PULSAR_SERVICE_ADDR);
-        Preconditions.checkState(StringUtils.isNotEmpty(serviceAddrStr),
-                String.format("%s error", ConfKeys.KEYS_EVENTMESH_PULSAR_SERVICE_ADDR));
-        serviceAddr = StringUtils.trim(serviceAddrStr);
-        String[] temp = serviceAddr.split(";");
-        serviceAddr = temp[1];
-    }
+    @ConfigFiled(field = "authPlugin")
+    private String authPlugin;
 
-    static class ConfKeys {
-        public static final String KEYS_EVENTMESH_PULSAR_SERVICE_ADDR = "eventMesh.server.pulsar.service";
-    }
+    @ConfigFiled(field = "authParams")
+    private String authParams;
 }
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ConfigurationWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ConfigurationWrapper.java
deleted file mode 100644
index ee1c42d971..0000000000
--- a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/ConfigurationWrapper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eventmesh.connector.pulsar.config;
-
-import org.apache.eventmesh.common.Constants;
-import org.apache.eventmesh.connector.pulsar.common.EventMeshConstants;
-
-import org.apache.commons.lang3.StringUtils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-import lombok.experimental.UtilityClass;
-import lombok.extern.slf4j.Slf4j;
-
-@Slf4j
-@UtilityClass
-public class ConfigurationWrapper {
-
-    private static final Properties properties = new Properties();
-
-    static {
-        loadProperties();
-    }
-
-    public String getProp(String key) {
-        return StringUtils.isEmpty(key) ? null : properties.getProperty(key, null);
-    }
-
-    /**
-     * Load Pulsar properties file from classpath and conf home.
-     * The properties defined in conf home will override classpath.
-     */
-    private void loadProperties() {
-        try (InputStream resourceAsStream = ConfigurationWrapper.class.getResourceAsStream(
-                "/" + EventMeshConstants.EVENTMESH_CONF_FILE)) {
-            if (resourceAsStream != null) {
-                properties.load(resourceAsStream);
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(String.format("Load %s.properties file from classpath error", EventMeshConstants.EVENTMESH_CONF_FILE));
-        }
-
-        try {
-            String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + EventMeshConstants.EVENTMESH_CONF_FILE;
-            if (new File(configPath).exists()) {
-                properties.load(new BufferedReader(new FileReader(configPath)));
-            }
-        } catch (IOException e) {
-            throw new IllegalArgumentException(String.format("Cannot load %s file from conf", EventMeshConstants.EVENTMESH_CONF_FILE));
-        }
-    }
-}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/consumer/PulsarConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/consumer/PulsarConsumerImpl.java
new file mode 100644
index 0000000000..a3b41c5c99
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/consumer/PulsarConsumerImpl.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.pulsar.consumer;
+
+import org.apache.eventmesh.api.AbstractContext;
+import org.apache.eventmesh.api.EventListener;
+import org.apache.eventmesh.api.EventMeshAction;
+import org.apache.eventmesh.api.EventMeshAsyncConsumeContext;
+import org.apache.eventmesh.api.consumer.Consumer;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.connector.pulsar.config.ClientConfiguration;
+
+import org.apache.pulsar.client.api.ClientBuilder;
+import org.apache.pulsar.client.api.MessageListener;
+import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.client.api.PulsarClientException;
+
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import io.cloudevents.CloudEvent;
+import io.cloudevents.core.format.EventDeserializationException;
+import io.cloudevents.core.provider.EventFormatProvider;
+import io.cloudevents.jackson.JsonFormat;
+
+import com.google.common.base.Preconditions;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Config(field = "clientConfiguration")
+public class PulsarConsumerImpl implements Consumer {
+
+    private final AtomicBoolean started = new AtomicBoolean(false);
+    private Properties properties;
+    private PulsarClient pulsarClient;
+    private org.apache.pulsar.client.api.Consumer consumer;
+    private EventListener eventListener;
+
+    /**
+     * Unified configuration class corresponding to pulsar-client.properties
+     */
+    private ClientConfiguration clientConfiguration;
+
+    @Override
+    public void init(Properties properties) throws Exception {
+        this.properties = properties;
+
+        try {
+            ClientBuilder clientBuilder = PulsarClient.builder()
+                .serviceUrl(clientConfiguration.getServiceAddr());
+
+            if (clientConfiguration.getAuthPlugin() != null) {
+                Preconditions.checkNotNull(clientConfiguration.getAuthParams(),
+                    "Authentication Enabled in pulsar cluster, Please set authParams in pulsar-client.properties");
+                clientBuilder.authentication(
+                    clientConfiguration.getAuthPlugin(),
+                    clientConfiguration.getAuthParams()
+                );
+            }
+
+            this.pulsarClient = clientBuilder.build();
+        } catch (Exception ex) {
+            throw new ConnectorRuntimeException(
+              String.format("Failed to connect pulsar with exception: %s", ex.getMessage()));
+        }
+    }
+
+    @Override
+    public void start() {
+        this.started.compareAndSet(false, true);
+    }
+
+    @Override
+    public void subscribe(String topic) throws Exception {
+
+        if (pulsarClient == null) {
+            throw new ConnectorRuntimeException(
+                 String.format("Cann't find the pulsar client for topic: %s", topic));
+        }
+
+        EventMeshAsyncConsumeContext consumeContext = new EventMeshAsyncConsumeContext() {
+            @Override
+            public void commit(EventMeshAction action) {
+                log.debug("message action: {} for topic: {}", action.name(), topic);
+            }
+        };
+
+        consumer = pulsarClient.newConsumer()
+            .topic(topic)
+            .subscriptionName(properties.getProperty(Constants.CONSUMER_GROUP))
+            .messageListener(
+              (MessageListener) (ackConsumer, msg) -> {
+                  CloudEvent cloudEvent = EventFormatProvider
+                      .getInstance()
+                      .resolveFormat(JsonFormat.CONTENT_TYPE)
+                      .deserialize(msg.getData());
+                  eventListener.consume(cloudEvent, consumeContext);
+                  try {
+                      ackConsumer.acknowledge(msg);
+                  } catch (PulsarClientException ex) {
+                      throw new ConnectorRuntimeException(
+                        String.format("Failed to unsubscribe the topic:%s with exception: %s", topic, ex.getMessage()));
+                  } catch (EventDeserializationException ex) {
+                      log.warn("The Message isn't json format, with exception:{}", ex.getMessage());
+                  }
+              }).subscribe();
+    }
+
+    @Override
+    public void unsubscribe(String topic) {
+        try {
+            consumer.unsubscribe();
+        } catch (PulsarClientException ex) {
+            throw new ConnectorRuntimeException(
+              String.format("Failed to unsubscribe the topic:%s with exception: %s", topic, ex.getMessage()));
+        }
+    }
+
+    @Override
+    public void updateOffset(List cloudEvents, AbstractContext context) {
+    }
+
+    @Override
+    public void registerEventListener(EventListener listener) {
+        this.eventListener = listener;
+    }
+
+    @Override
+    public boolean isStarted() {
+        return this.started.get();
+    }
+
+    @Override
+    public boolean isClosed() {
+        return !this.isStarted();
+    }
+
+    @Override
+    public void shutdown() {
+        this.started.compareAndSet(true, false);
+        try {
+            this.consumer.close();
+            this.pulsarClient.close();
+        } catch (PulsarClientException ex) {
+            throw new ConnectorRuntimeException(
+              String.format("Failed to close the pulsar client with exception: %s", ex.getMessage()));
+        }
+    }
+
+    public ClientConfiguration getClientConfiguration() {
+        return this.clientConfiguration;
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/AbstractProducer.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/AbstractProducer.java
index e1199da004..f0e4858e83 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/AbstractProducer.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/AbstractProducer.java
@@ -22,14 +22,11 @@
 import java.util.Properties;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import io.cloudevents.CloudEvent;
 
 public abstract class AbstractProducer {
 
-    static final Logger logger = LoggerFactory.getLogger(AbstractProducer.class);
     protected final AtomicBoolean started = new AtomicBoolean(false);
     final Properties properties;
 
@@ -43,9 +40,9 @@ public Properties properties() {
 
     ConnectorRuntimeException checkProducerException(CloudEvent cloudEvent, Throwable e) {
         if (cloudEvent.getData() == null) {
-            return new ConnectorRuntimeException(String.format("CloudEvent message data does not exist.", e));
+            return new ConnectorRuntimeException(String.format("CloudEvent message data does not exist, %s", e.getMessage()));
         }
-        return new ConnectorRuntimeException(String.format("Unknown connector runtime exception.", e));
+        return new ConnectorRuntimeException(String.format("Unknown connector runtime exception, %s", e.getMessage()));
     }
 
     public boolean isStarted() {
@@ -55,4 +52,4 @@ public boolean isStarted() {
     public boolean isClosed() {
         return !this.isStarted();
     }
-}
\ No newline at end of file
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/ProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/ProducerImpl.java
index 2e52cb0d7c..2d90ebaa86 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/ProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/ProducerImpl.java
@@ -18,54 +18,35 @@
 package org.apache.eventmesh.connector.pulsar.producer;
 
 import org.apache.eventmesh.api.SendCallback;
-import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
-import org.apache.eventmesh.api.exception.OnExceptionContext;
-import org.apache.eventmesh.connector.pulsar.utils.CloudEventUtils;
-
-import org.apache.pulsar.client.api.Producer;
-import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.eventmesh.connector.pulsar.client.PulsarClientWrapper;
+import org.apache.eventmesh.connector.pulsar.config.ClientConfiguration;
 
 import java.util.Properties;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import io.cloudevents.CloudEvent;
-import io.cloudevents.core.provider.EventFormatProvider;
-import io.cloudevents.jackson.JsonFormat;
 
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
 public class ProducerImpl extends AbstractProducer {
+
     private final AtomicBoolean started = new AtomicBoolean(false);
-    private PulsarClient pulsarClient;
+
+    private ClientConfiguration config;
+    private PulsarClientWrapper pulsarClient;
+
+    public ProducerImpl(final Properties properties, ClientConfiguration config) {
+        this(properties);
+        setConfig(config);
+    }
 
     public ProducerImpl(final Properties properties) {
         super(properties);
     }
 
     public void publish(CloudEvent cloudEvent, SendCallback sendCallback) {
-
-        try {
-            Producer producer = this.pulsarClient.newProducer()
-                    .topic(cloudEvent.getSubject())
-                    .batchingMaxPublishDelay(10, TimeUnit.MILLISECONDS)
-                    .sendTimeout(10, TimeUnit.SECONDS)
-                    .blockIfQueueFull(true)
-                    .create();
-
-            byte[] serializedCloudEvent = EventFormatProvider
-                    .getInstance()
-                    .resolveFormat(JsonFormat.CONTENT_TYPE)
-                    .serialize(cloudEvent);
-
-            producer.sendAsync(serializedCloudEvent).thenAccept(messageId -> {
-                sendCallback.onSuccess(CloudEventUtils.convertSendResult(cloudEvent));
-            });
-        } catch (Exception e) {
-            ConnectorRuntimeException onsEx = this.checkProducerException(cloudEvent, e);
-            OnExceptionContext context = new OnExceptionContext();
-            context.setTopic(cloudEvent.getSubject());
-            context.setException(onsEx);
-            sendCallback.onException(context);
-        }
+        this.pulsarClient.publish(cloudEvent, sendCallback);
     }
 
     public void init(Properties properties) {
@@ -73,30 +54,30 @@ public void init(Properties properties) {
     }
 
     public void start() {
-        try {
-            this.started.compareAndSet(false, true);
-            this.pulsarClient = PulsarClient.builder()
-                    .serviceUrl(this.properties().get("url").toString())
-                    .build();
-        } catch (Exception ignored) {
-            // ignored
-        }
+        this.started.compareAndSet(false, true);
+        this.pulsarClient = new PulsarClientWrapper(config);
     }
 
     public void shutdown() {
         try {
             this.started.compareAndSet(true, false);
-            this.pulsarClient.close();
+            this.pulsarClient.shutdown();
         } catch (Exception ignored) {
             // ignored
         }
     }
 
+    @Override
     public boolean isStarted() {
         return this.started.get();
     }
 
+    @Override
     public boolean isClosed() {
         return !this.isStarted();
     }
+
+    public void setConfig(ClientConfiguration config) {
+        this.config = config;
+    }
 }
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/PulsarProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/PulsarProducerImpl.java
index f58904c277..063c1439ec 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/PulsarProducerImpl.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/producer/PulsarProducerImpl.java
@@ -21,22 +21,26 @@
 import org.apache.eventmesh.api.SendCallback;
 import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
 import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.common.config.Config;
 import org.apache.eventmesh.connector.pulsar.config.ClientConfiguration;
 
 import java.util.Properties;
 
 import io.cloudevents.CloudEvent;
 
+@Config(field = "clientConfiguration")
 public class PulsarProducerImpl implements Producer {
+
     private ProducerImpl producer;
 
+    /**
+     * Unified configuration class corresponding to pulsar-client.properties
+     */
+    private ClientConfiguration clientConfiguration;
+
     @Override
     public synchronized void init(Properties properties) {
-        final ClientConfiguration clientConfiguration = new ClientConfiguration();
-        clientConfiguration.init();
-
-        properties.put("url", clientConfiguration.serviceAddr);
-        producer = new ProducerImpl(properties);
+        producer = new ProducerImpl(properties, clientConfiguration);
     }
 
     @Override
@@ -88,4 +92,8 @@ public void checkTopicExist(String topic) throws Exception {
     public void setExtFields() {
         throw new ConnectorRuntimeException("SetExtFields is not supported");
     }
+
+    public ClientConfiguration getClientConfiguration() {
+        return this.clientConfiguration;
+    }
 }
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/test/java/org/apache/eventmesh/connector/pulsar/config/ClientConfigurationTest.java b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/test/java/org/apache/eventmesh/connector/pulsar/config/ClientConfigurationTest.java
new file mode 100644
index 0000000000..493cd167ad
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/test/java/org/apache/eventmesh/connector/pulsar/config/ClientConfigurationTest.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.pulsar.config;
+
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+import org.apache.eventmesh.connector.pulsar.consumer.PulsarConsumerImpl;
+import org.apache.eventmesh.connector.pulsar.producer.PulsarProducerImpl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ClientConfigurationTest {
+
+    @Test
+    public void getConfigWhenPulsarConsumerInit() {
+        PulsarConsumerImpl consumer =
+                (PulsarConsumerImpl) ConnectorPluginFactory.getMeshMQPushConsumer("pulsar");
+
+        ClientConfiguration config = consumer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    @Test
+    public void getConfigWhenPulsarProducerInit() {
+        PulsarProducerImpl producer =
+                (PulsarProducerImpl) ConnectorPluginFactory.getMeshMQProducer("pulsar");
+
+        ClientConfiguration config = producer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    private void assertConfig(ClientConfiguration config) {
+        Assert.assertEquals(config.getServiceAddr(), "127.0.0.1:6650");
+        Assert.assertEquals(config.getAuthPlugin(), "authPlugin-success!!!");
+        Assert.assertEquals(config.getAuthParams(), "authParams-success!!!");
+    }
+}
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/test/resources/pulsar-client.properties b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/test/resources/pulsar-client.properties
new file mode 100644
index 0000000000..645a5edb6e
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-pulsar/src/test/resources/pulsar-client.properties
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+eventMesh.server.pulsar.service=127.0.0.1:6650
+eventMesh.server.pulsar.authPlugin=authPlugin-success!!!
+eventMesh.server.pulsar.authParams=authParams-success!!!
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/build.gradle
new file mode 100644
index 0000000000..5a691e3c56
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/build.gradle
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+configurations {
+    implementation.exclude group: 'ch.qos.logback', module: 'logback-classic'
+    implementation.exclude group: 'log4j', module: 'log4j'
+}
+
+dependencies {
+    implementation project(":eventmesh-connector-plugin:eventmesh-connector-api")
+    implementation project(":eventmesh-common")
+    // rabbitmq
+    implementation 'com.rabbitmq:amqp-client:5.16.0'
+
+    testImplementation project(":eventmesh-connector-plugin:eventmesh-connector-api")
+    testImplementation project(":eventmesh-common")
+    // rabbitmq
+    testImplementation 'com.rabbitmq:amqp-client:5.16.0'
+
+    implementation 'io.cloudevents:cloudevents-json-jackson'
+    testImplementation 'io.cloudevents:cloudevents-json-jackson'
+
+    testImplementation "org.mockito:mockito-core"
+    testImplementation "org.powermock:powermock-module-junit4"
+    testImplementation "org.powermock:powermock-api-mockito2"
+
+    compileOnly 'org.projectlombok:lombok:1.18.22'
+    annotationProcessor 'org.projectlombok:lombok:1.18.22'
+
+    testCompileOnly 'org.projectlombok:lombok:1.18.22'
+    testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
+
+    testImplementation('com.github.fridujo:rabbitmq-mock:1.1.1')
+}
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/gradle.properties b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/gradle.properties
new file mode 100644
index 0000000000..5df0ccda7b
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/gradle.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+pluginType=connector
+pluginName=rabbitmq
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/client/RabbitmqClient.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/client/RabbitmqClient.java
new file mode 100644
index 0000000000..85ccca208d
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/client/RabbitmqClient.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.client;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.rabbitmq.client.BuiltinExchangeType;
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class RabbitmqClient {
+
+
+    private final RabbitmqConnectionFactory rabbitmqConnectionFactory;
+
+    public RabbitmqClient(RabbitmqConnectionFactory rabbitmqConnectionFactory) {
+        this.rabbitmqConnectionFactory = rabbitmqConnectionFactory;
+    }
+
+
+    /**
+     * get rabbitmq connection
+     *
+     * @param host        host
+     * @param username    username
+     * @param passwd      password
+     * @param port        port
+     * @param virtualHost virtual host
+     * @return connection
+     * @throws Exception Exception
+     */
+    public Connection getConnection(String host, String username,
+                                    String passwd, int port,
+                                    String virtualHost) throws Exception {
+        ConnectionFactory factory = rabbitmqConnectionFactory.createConnectionFactory();
+        factory.setHost(host.trim());
+        factory.setPort(port);
+        if (StringUtils.isNotEmpty(virtualHost)) {
+            factory.setVirtualHost(virtualHost.trim());
+        }
+        factory.setUsername(username);
+        factory.setPassword(passwd.trim());
+
+        return rabbitmqConnectionFactory.createConnection(factory);
+    }
+
+    /**
+     * send message
+     *
+     * @param channel      channel
+     * @param exchangeName exchange name
+     * @param routingKey   routing key
+     * @param message      message
+     * @throws Exception Exception
+     */
+    public void publish(Channel channel, String exchangeName,
+                        String routingKey, byte[] message) throws Exception {
+        channel.basicPublish(exchangeName, routingKey, null, message);
+    }
+
+    /**
+     * binding queue
+     *
+     * @param channel             channel
+     * @param builtinExchangeType exchange type
+     * @param exchangeName        exchange name
+     * @param routingKey          routing key
+     * @param queueName           queue name
+     */
+    public void binding(Channel channel, BuiltinExchangeType builtinExchangeType,
+                        String exchangeName, String routingKey, String queueName) {
+        try {
+            channel.exchangeDeclare(exchangeName, builtinExchangeType.getType(), true,
+                    false, false, null);
+            channel.queueDeclare(queueName, false, false,
+                    false, null);
+            routingKey = builtinExchangeType.getType().equals(BuiltinExchangeType.FANOUT.getType()) ? "" : routingKey;
+            channel.queueBind(queueName, exchangeName, routingKey);
+        } catch (Exception ex) {
+            log.error("[RabbitmqClient] binding happen exception.", ex);
+        }
+    }
+
+    /**
+     * unbinding queue
+     *
+     * @param channel      channel
+     * @param exchangeName exchange name
+     * @param routingKey   routing key
+     * @param queueName    queue name
+     */
+    public void unbinding(Channel channel, String exchangeName, String routingKey, String queueName) {
+        try {
+            channel.queueUnbind(queueName, exchangeName, routingKey);
+        } catch (Exception ex) {
+            log.error("[RabbitmqClient] unbinding happen exception.", ex);
+        }
+    }
+
+    /**
+     * close connection
+     *
+     * @param connection connection
+     */
+    public void closeConnection(Connection connection) {
+        if (null != connection) {
+            try {
+                connection.close();
+            } catch (Exception ex) {
+                log.error("[RabbitmqClient] connection close happen exception.", ex);
+            }
+        }
+    }
+
+    /**
+     * close channel
+     *
+     * @param channel channel
+     */
+    public void closeChannel(Channel channel) {
+        if (null != channel) {
+            try {
+                channel.close();
+            } catch (Exception ex) {
+                log.error("[RabbitmqClient] channel close happen exception.", ex);
+            }
+        }
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/client/RabbitmqConnectionFactory.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/client/RabbitmqConnectionFactory.java
new file mode 100644
index 0000000000..2ff41f4f90
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/client/RabbitmqConnectionFactory.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.client;
+
+import java.io.IOException;
+import java.util.concurrent.TimeoutException;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+
+public class RabbitmqConnectionFactory {
+
+    public ConnectionFactory createConnectionFactory() {
+        return new ConnectionFactory();
+    }
+
+    public Connection createConnection(ConnectionFactory connectionFactory) throws IOException, TimeoutException {
+        return connectionFactory.newConnection();
+    }
+
+    public Channel createChannel(Connection connection) throws IOException {
+        return connection.createChannel();
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEvent.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEvent.java
new file mode 100644
index 0000000000..501b26620d
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEvent.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.cloudevent;
+
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.utils.JsonUtils;
+import org.apache.eventmesh.connector.rabbitmq.exception.RabbitmqaConnectorException;
+import org.apache.eventmesh.connector.rabbitmq.utils.ByteArrayUtils;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import io.cloudevents.CloudEvent;
+import io.cloudevents.SpecVersion;
+import io.cloudevents.core.builder.CloudEventBuilder;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class RabbitmqCloudEvent implements Serializable {
+
+    private SpecVersion version;
+    private String data;
+    private Map extensions = new HashMap<>();
+
+    public CloudEvent convertToCloudEvent() {
+        CloudEventBuilder builder;
+        switch (version) {
+            case V03:
+                builder = CloudEventBuilder.v03();
+                break;
+            case V1:
+                builder = CloudEventBuilder.v1();
+                break;
+            default:
+                throw new RabbitmqaConnectorException(String.format("CloudEvent version %s does not support.", version));
+        }
+        builder.withData(data.getBytes(StandardCharsets.UTF_8))
+                .withId(extensions.remove("id"))
+                .withSource(URI.create(extensions.remove("source")))
+                .withType(extensions.remove("type"))
+                .withDataContentType(extensions.remove("datacontenttype"))
+                .withSubject(extensions.remove("subject"));
+        extensions.forEach(builder::withExtension);
+
+        return builder.build();
+    }
+
+    public static byte[] toByteArray(RabbitmqCloudEvent rabbitmqCloudEvent) throws Exception {
+        Optional optionalBytes = ByteArrayUtils.objectToBytes(rabbitmqCloudEvent);
+        return optionalBytes.orElseGet(() -> new byte[]{});
+    }
+
+    public static RabbitmqCloudEvent getFromByteArray(byte[] body) {
+        return JsonUtils.parseTypeReferenceObject(new String(body, Constants.DEFAULT_CHARSET), new TypeReference() {
+        });
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java
new file mode 100644
index 0000000000..b7e2e093f1
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEventWriter.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.cloudevent;
+
+import java.nio.charset.StandardCharsets;
+
+import io.cloudevents.CloudEventData;
+import io.cloudevents.SpecVersion;
+import io.cloudevents.core.format.EventFormat;
+import io.cloudevents.core.message.MessageWriter;
+import io.cloudevents.rw.CloudEventContextWriter;
+import io.cloudevents.rw.CloudEventRWException;
+import io.cloudevents.rw.CloudEventWriter;
+
+public class RabbitmqCloudEventWriter
+        implements MessageWriter, RabbitmqCloudEvent>, CloudEventWriter {
+
+    private final RabbitmqCloudEvent rabbitmqCloudEvent;
+
+    public RabbitmqCloudEventWriter() {
+        rabbitmqCloudEvent = new RabbitmqCloudEvent();
+    }
+
+    @Override
+    public RabbitmqCloudEvent setEvent(EventFormat format, byte[] value) throws CloudEventRWException {
+        rabbitmqCloudEvent.setData(new String(value, StandardCharsets.UTF_8));
+        return rabbitmqCloudEvent;
+    }
+
+    @Override
+    public RabbitmqCloudEvent end(CloudEventData data) throws CloudEventRWException {
+        rabbitmqCloudEvent.setData(new String(data.toBytes(), StandardCharsets.UTF_8));
+        return rabbitmqCloudEvent;
+    }
+
+    @Override
+    public RabbitmqCloudEvent end() throws CloudEventRWException {
+        rabbitmqCloudEvent.setData("");
+        return rabbitmqCloudEvent;
+    }
+
+    @Override
+    public CloudEventContextWriter withContextAttribute(String name, String value) throws CloudEventRWException {
+        rabbitmqCloudEvent.getExtensions().put(name, value);
+        return this;
+    }
+
+    @Override
+    public CloudEventWriter create(SpecVersion version) throws CloudEventRWException {
+        rabbitmqCloudEvent.setVersion(version);
+        return this;
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/config/ConfigurationHolder.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/config/ConfigurationHolder.java
new file mode 100644
index 0000000000..7ac00ef0b3
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/config/ConfigurationHolder.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.config;
+
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.common.config.ConfigFiled;
+
+import com.rabbitmq.client.BuiltinExchangeType;
+
+import lombok.Data;
+
+@Data
+@Config(prefix = "eventMesh.server.rabbitmq", path = "classPath://rabbitmq-client.properties")
+public class ConfigurationHolder {
+
+    @ConfigFiled(field = "host")
+    public String host;
+
+    @ConfigFiled(field = "port")
+    public int port;
+
+    @ConfigFiled(field = "username")
+    public String username;
+
+    @ConfigFiled(field = "passwd")
+    public String passwd;
+
+    @ConfigFiled(field = "virtualHost")
+    public String virtualHost;
+
+    @ConfigFiled(field = "exchangeType")
+    public BuiltinExchangeType exchangeType;
+
+    @ConfigFiled(field = "exchangeName")
+    public String exchangeName;
+
+    @ConfigFiled(field = "routingKey")
+    public String routingKey;
+
+    @ConfigFiled(field = "queueName")
+    public String queueName;
+
+    @ConfigFiled(field = "autoAck")
+    public boolean autoAck;
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/connector/RabbitmqConnectorResourceService.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/connector/RabbitmqConnectorResourceService.java
new file mode 100644
index 0000000000..2e16e613a5
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/connector/RabbitmqConnectorResourceService.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.connector;
+
+import org.apache.eventmesh.api.connector.ConnectorResourceService;
+
+public class RabbitmqConnectorResourceService implements ConnectorResourceService {
+    @Override
+    public void init() throws Exception {
+
+    }
+
+    @Override
+    public void release() throws Exception {
+
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumer.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumer.java
new file mode 100644
index 0000000000..e3d248718e
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumer.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.consumer;
+
+import org.apache.eventmesh.api.AbstractContext;
+import org.apache.eventmesh.api.EventListener;
+import org.apache.eventmesh.api.consumer.Consumer;
+import org.apache.eventmesh.common.ThreadPoolFactory;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.connector.rabbitmq.client.RabbitmqClient;
+import org.apache.eventmesh.connector.rabbitmq.client.RabbitmqConnectionFactory;
+import org.apache.eventmesh.connector.rabbitmq.config.ConfigurationHolder;
+
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.ThreadPoolExecutor;
+
+
+import io.cloudevents.CloudEvent;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Config(field = "configurationHolder")
+
+@Slf4j
+public class RabbitmqConsumer implements Consumer {
+
+
+    private RabbitmqConnectionFactory rabbitmqConnectionFactory = new RabbitmqConnectionFactory();
+
+    private RabbitmqClient rabbitmqClient;
+
+    private Connection connection;
+
+    private Channel channel;
+
+    private volatile boolean started = false;
+
+    /**
+     * Unified configuration class corresponding to rabbitmq-client.properties
+     */
+    private ConfigurationHolder configurationHolder;
+
+    private final ThreadPoolExecutor executor = ThreadPoolFactory.createThreadPoolExecutor(
+            Runtime.getRuntime().availableProcessors() * 2,
+            Runtime.getRuntime().availableProcessors() * 2,
+            "EventMesh-Rabbitmq-Consumer");
+
+    private RabbitmqConsumerHandler rabbitmqConsumerHandler;
+
+    @Override
+    public boolean isStarted() {
+        return started;
+    }
+
+    @Override
+    public boolean isClosed() {
+        return !isStarted();
+    }
+
+    @Override
+    public void start() {
+        if (!started) {
+            started = true;
+        }
+    }
+
+    @Override
+    public void shutdown() {
+        if (started) {
+            try {
+                rabbitmqClient.closeConnection(connection);
+                rabbitmqClient.closeChannel(channel);
+                rabbitmqConsumerHandler.stop();
+            } finally {
+                started = false;
+            }
+        }
+    }
+
+    @Override
+    public void init(Properties keyValue) throws Exception {
+        this.rabbitmqClient = new RabbitmqClient(rabbitmqConnectionFactory);
+        this.connection = rabbitmqClient.getConnection(configurationHolder.getHost(), configurationHolder.getUsername(),
+                configurationHolder.getPasswd(), configurationHolder.getPort(), configurationHolder.getVirtualHost());
+        this.channel = rabbitmqConnectionFactory.createChannel(connection);
+        this.rabbitmqConsumerHandler = new RabbitmqConsumerHandler(channel, configurationHolder);
+    }
+
+    @Override
+    public void updateOffset(List cloudEvents, AbstractContext context) {
+
+    }
+
+    @Override
+    public void subscribe(String topic) {
+        rabbitmqClient.binding(channel, configurationHolder.getExchangeType(), configurationHolder.getExchangeName(),
+                configurationHolder.getRoutingKey(), configurationHolder.getQueueName());
+        executor.execute(rabbitmqConsumerHandler);
+    }
+
+    @Override
+    public void unsubscribe(String topic) {
+        try {
+            rabbitmqClient.unbinding(channel, configurationHolder.getExchangeName(),
+                    configurationHolder.getRoutingKey(), configurationHolder.getQueueName());
+            rabbitmqConsumerHandler.stop();
+        } catch (Exception ex) {
+            log.error("[RabbitmqConsumer] unsubscribe happen exception.", ex);
+        }
+    }
+
+    @Override
+    public void registerEventListener(EventListener listener) {
+        rabbitmqConsumerHandler.setEventListener(listener);
+    }
+
+    public void setRabbitmqConnectionFactory(RabbitmqConnectionFactory rabbitmqConnectionFactory) {
+        this.rabbitmqConnectionFactory = rabbitmqConnectionFactory;
+    }
+
+    public ConfigurationHolder getClientConfiguration() {
+        return this.configurationHolder;
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumerHandler.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumerHandler.java
new file mode 100644
index 0000000000..c22624be29
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumerHandler.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.consumer;
+
+import org.apache.eventmesh.api.EventListener;
+import org.apache.eventmesh.api.EventMeshAction;
+import org.apache.eventmesh.api.EventMeshAsyncConsumeContext;
+import org.apache.eventmesh.connector.rabbitmq.cloudevent.RabbitmqCloudEvent;
+import org.apache.eventmesh.connector.rabbitmq.config.ConfigurationHolder;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import io.cloudevents.CloudEvent;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.GetResponse;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class RabbitmqConsumerHandler implements Runnable {
+
+
+    private final Channel channel;
+    private final ConfigurationHolder configurationHolder;
+    private final AtomicBoolean stop = new AtomicBoolean(false);
+    private EventListener eventListener;
+
+    public RabbitmqConsumerHandler(Channel channel, ConfigurationHolder configurationHolder) {
+        this.channel = channel;
+        this.configurationHolder = configurationHolder;
+    }
+
+    @Override
+    public void run() {
+        while (!stop.get()) {
+            try {
+                GetResponse response = channel.basicGet(configurationHolder.getQueueName(), configurationHolder.isAutoAck());
+                if (response != null) {
+                    RabbitmqCloudEvent rabbitmqCloudEvent = RabbitmqCloudEvent.getFromByteArray(response.getBody());
+                    CloudEvent cloudEvent = rabbitmqCloudEvent.convertToCloudEvent();
+                    final EventMeshAsyncConsumeContext consumeContext = new EventMeshAsyncConsumeContext() {
+                        @Override
+                        public void commit(EventMeshAction action) {
+                            log.info("[RabbitmqConsumerHandler] Rabbitmq consumer context commit.");
+                        }
+                    };
+                    if (eventListener != null) {
+                        eventListener.consume(cloudEvent, consumeContext);
+                    }
+                    if (!configurationHolder.isAutoAck()) {
+                        channel.basicAck(response.getEnvelope().getDeliveryTag(), false);
+                    }
+                }
+            } catch (Exception ex) {
+                log.error("[RabbitmqConsumerHandler] thread run happen exception.", ex);
+            }
+        }
+    }
+
+    public void setEventListener(EventListener eventListener) {
+        this.eventListener = eventListener;
+    }
+
+    public void stop() {
+        stop.set(true);
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/exception/RabbitmqaConnectorException.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/exception/RabbitmqaConnectorException.java
new file mode 100644
index 0000000000..ba06999804
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/exception/RabbitmqaConnectorException.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.exception;
+
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+
+public class RabbitmqaConnectorException extends ConnectorRuntimeException {
+
+    public RabbitmqaConnectorException(String message) {
+        super(message);
+    }
+
+    public RabbitmqaConnectorException(Throwable throwable) {
+        super(throwable);
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/producer/RabbitmqProducer.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/producer/RabbitmqProducer.java
new file mode 100644
index 0000000000..2833aec4db
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/producer/RabbitmqProducer.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.common.config.Config;
+import org.apache.eventmesh.connector.rabbitmq.client.RabbitmqClient;
+import org.apache.eventmesh.connector.rabbitmq.client.RabbitmqConnectionFactory;
+import org.apache.eventmesh.connector.rabbitmq.cloudevent.RabbitmqCloudEvent;
+import org.apache.eventmesh.connector.rabbitmq.cloudevent.RabbitmqCloudEventWriter;
+import org.apache.eventmesh.connector.rabbitmq.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.rabbitmq.utils.ByteArrayUtils;
+
+import java.util.Optional;
+import java.util.Properties;
+
+import io.cloudevents.CloudEvent;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Config(field = "configurationHolder")
+@Slf4j
+public class RabbitmqProducer implements Producer {
+
+    private RabbitmqConnectionFactory rabbitmqConnectionFactory = new RabbitmqConnectionFactory();
+
+    private RabbitmqClient rabbitmqClient;
+
+    private Connection connection;
+
+    private Channel channel;
+
+    private volatile boolean started = false;
+
+    /**
+     * Unified configuration class corresponding to rabbitmq-client.properties
+     */
+    private ConfigurationHolder configurationHolder;
+
+    @Override
+    public boolean isStarted() {
+        return started;
+    }
+
+    @Override
+    public boolean isClosed() {
+        return !isStarted();
+    }
+
+    @Override
+    public void start() {
+        if (!started) {
+            started = true;
+        }
+    }
+
+    @Override
+    public void shutdown() {
+        if (started) {
+            try {
+                rabbitmqClient.closeConnection(connection);
+                rabbitmqClient.closeChannel(channel);
+            } finally {
+                started = false;
+            }
+        }
+    }
+
+    @Override
+    public void init(Properties properties) throws Exception {
+        this.rabbitmqClient = new RabbitmqClient(rabbitmqConnectionFactory);
+        this.connection = rabbitmqClient.getConnection(configurationHolder.getHost(), configurationHolder.getUsername(),
+                configurationHolder.getPasswd(), configurationHolder.getPort(), configurationHolder.getVirtualHost());
+        this.channel = rabbitmqConnectionFactory.createChannel(connection);
+    }
+
+    @Override
+    public void publish(CloudEvent cloudEvent, SendCallback sendCallback) throws Exception {
+        try {
+            RabbitmqCloudEventWriter writer = new RabbitmqCloudEventWriter();
+            RabbitmqCloudEvent rabbitmqCloudEvent = writer.writeBinary(cloudEvent);
+            byte[] data = RabbitmqCloudEvent.toByteArray(rabbitmqCloudEvent);
+            if (data != null) {
+                rabbitmqClient.publish(channel, configurationHolder.getExchangeName(), configurationHolder.getRoutingKey(), data);
+
+                SendResult sendResult = new SendResult();
+                sendResult.setTopic(cloudEvent.getSubject());
+                sendResult.setMessageId(cloudEvent.getId());
+                sendCallback.onSuccess(sendResult);
+            }
+        } catch (Exception ex) {
+            log.error("[RabbitmqProducer] publish happen exception.", ex);
+            sendCallback.onException(
+                    OnExceptionContext.builder()
+                            .topic(cloudEvent.getSubject())
+                            .messageId(cloudEvent.getId())
+                            .exception(new ConnectorRuntimeException(ex))
+                            .build()
+            );
+        }
+    }
+
+    @Override
+    public void sendOneway(CloudEvent cloudEvent) {
+        try {
+            Optional optionalBytes = ByteArrayUtils.objectToBytes(cloudEvent);
+            if (optionalBytes.isPresent()) {
+                byte[] data = optionalBytes.get();
+                rabbitmqClient.publish(channel, configurationHolder.getExchangeName(),
+                        configurationHolder.getRoutingKey(), data);
+            }
+        } catch (Exception ex) {
+            log.error("[RabbitmqProducer] sendOneway happen exception.", ex);
+        }
+    }
+
+    @Override
+    public void request(CloudEvent cloudEvent, RequestReplyCallback rrCallback, long timeout) throws Exception {
+
+    }
+
+    @Override
+    public boolean reply(CloudEvent cloudEvent, SendCallback sendCallback) throws Exception {
+        return false;
+    }
+
+    @Override
+    public void checkTopicExist(String topic) throws Exception {
+
+    }
+
+    @Override
+    public void setExtFields() {
+
+    }
+
+    public void setRabbitmqConnectionFactory(RabbitmqConnectionFactory rabbitmqConnectionFactory) {
+        this.rabbitmqConnectionFactory = rabbitmqConnectionFactory;
+    }
+
+    public ConfigurationHolder getClientConfiguration() {
+        return this.configurationHolder;
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/utils/ByteArrayUtils.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/utils/ByteArrayUtils.java
new file mode 100644
index 0000000000..d6848db9cb
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/utils/ByteArrayUtils.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.utils;
+
+import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.utils.JsonUtils;
+
+import java.io.IOException;
+import java.util.Optional;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+
+@SuppressWarnings("all")
+public class ByteArrayUtils {
+
+    public static  Optional objectToBytes(T obj) throws IOException {
+        String s = JsonUtils.toJSONString(obj);
+        byte[] bytes = s.getBytes();
+        return Optional.ofNullable(bytes);
+    }
+
+    public static  Optional bytesToObject(byte[] bytes) throws IOException, ClassNotFoundException {
+        T t = JsonUtils.parseTypeReferenceObject(new String(bytes, Constants.DEFAULT_CHARSET), new TypeReference() {
+        });
+        return Optional.ofNullable(t);
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.connector.ConnectorResourceService b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.connector.ConnectorResourceService
new file mode 100644
index 0000000000..1b7228c7cb
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.connector.ConnectorResourceService
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+rabbitmq=org.apache.eventmesh.connector.rabbitmq.connector.RabbitmqConnectorResourceService
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.consumer.Consumer b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.consumer.Consumer
new file mode 100644
index 0000000000..1d9791e92d
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.consumer.Consumer
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+rabbitmq=org.apache.eventmesh.connector.rabbitmq.consumer.RabbitmqConsumer
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.producer.Producer b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.producer.Producer
new file mode 100644
index 0000000000..d60ea94bb4
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.producer.Producer
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+rabbitmq=org.apache.eventmesh.connector.rabbitmq.producer.RabbitmqProducer
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/rabbitmq-client.properties b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/rabbitmq-client.properties
new file mode 100644
index 0000000000..db9f3a5fa8
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/main/resources/rabbitmq-client.properties
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+####################### rabbitmq server ##################
+eventMesh.server.rabbitmq.host=
+eventMesh.server.rabbitmq.port=
+eventMesh.server.rabbitmq.username=
+eventMesh.server.rabbitmq.passwd=
+eventMesh.server.rabbitmq.virtualHost=
+
+####################### rabbitmq queue setting ##################
+# DIRECT, FANOUT, TOPIC, HEADERS
+eventMesh.server.rabbitmq.exchangeType=TOPIC
+eventMesh.server.rabbitmq.exchangeName=
+eventMesh.server.rabbitmq.routingKey=
+eventMesh.server.rabbitmq.queueName=
+eventMesh.server.rabbitmq.autoAck=true
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/RabbitmqMockConnectionFactory.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/RabbitmqMockConnectionFactory.java
new file mode 100644
index 0000000000..912e825bf0
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/RabbitmqMockConnectionFactory.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq;
+
+import org.apache.eventmesh.connector.rabbitmq.client.RabbitmqConnectionFactory;
+
+import com.github.fridujo.rabbitmq.mock.MockConnectionFactory;
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+
+public class RabbitmqMockConnectionFactory extends RabbitmqConnectionFactory {
+
+    private final ConnectionFactory myConnectionFactory;
+
+    private final Connection myConnection;
+
+    private final Channel myChannel;
+
+    public RabbitmqMockConnectionFactory() throws Exception {
+        this.myConnectionFactory = new MockConnectionFactory();
+        this.myConnectionFactory.setHost("127.0.0.1");
+        this.myConnectionFactory.setPort(5672);
+        this.myConnectionFactory.setUsername("root");
+        this.myConnectionFactory.setPassword("123456");
+        this.myConnection = this.myConnectionFactory.newConnection();
+        this.myChannel = myConnection.createChannel();
+    }
+
+    @Override
+    public ConnectionFactory createConnectionFactory() {
+        return this.myConnectionFactory;
+    }
+
+    @Override
+    public Connection createConnection(ConnectionFactory connectionFactory) {
+        return this.myConnection;
+    }
+
+    @Override
+    public Channel createChannel(Connection connection) {
+        return this.myChannel;
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/RabbitmqServer.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/RabbitmqServer.java
new file mode 100644
index 0000000000..ce36c30096
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/RabbitmqServer.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq;
+
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+import org.apache.eventmesh.connector.rabbitmq.consumer.RabbitmqConsumer;
+import org.apache.eventmesh.connector.rabbitmq.producer.RabbitmqProducer;
+
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.Before;
+
+public class RabbitmqServer {
+    protected RabbitmqConsumer rabbitmqConsumer;
+    protected RabbitmqProducer rabbitmqProducer;
+
+    @Before
+    public void setup() throws Exception {
+        RabbitmqMockConnectionFactory rabbitmqMockConnectionFactory = new RabbitmqMockConnectionFactory();
+
+        rabbitmqConsumer =
+                (RabbitmqConsumer) ConnectorPluginFactory.getMeshMQPushConsumer("rabbitmq");
+        rabbitmqConsumer.setRabbitmqConnectionFactory(rabbitmqMockConnectionFactory);
+        rabbitmqConsumer.init(new Properties());
+        rabbitmqConsumer.start();
+
+        rabbitmqProducer = (RabbitmqProducer) ConnectorPluginFactory.getMeshMQProducer("rabbitmq");
+        rabbitmqProducer.setRabbitmqConnectionFactory(rabbitmqMockConnectionFactory);
+        rabbitmqProducer.init(new Properties());
+        rabbitmqProducer.start();
+    }
+
+    @After
+    public void shutdown() {
+        rabbitmqConsumer.shutdown();
+        rabbitmqProducer.shutdown();
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEventTest.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEventTest.java
new file mode 100644
index 0000000000..687a399ebd
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/cloudevent/RabbitmqCloudEventTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.cloudevent;
+
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.time.OffsetDateTime;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import io.cloudevents.CloudEvent;
+import io.cloudevents.core.builder.CloudEventBuilder;
+
+public class RabbitmqCloudEventTest {
+
+    private CloudEvent cloudEvent;
+
+    @Before
+    public void before() {
+        cloudEvent = CloudEventBuilder.v1()
+                .withId("1")
+                .withTime(OffsetDateTime.now())
+                .withSource(URI.create("testsource"))
+                .withSubject("topic")
+                .withType(String.class.getCanonicalName())
+                .withDataContentType("text/plain")
+                .withData("data".getBytes(StandardCharsets.UTF_8))
+                .build();
+    }
+
+    @Test
+    public void toByteArray() throws Exception {
+        RabbitmqCloudEventWriter writer = new RabbitmqCloudEventWriter();
+        RabbitmqCloudEvent rabbitmqCloudEvent = writer.writeBinary(cloudEvent);
+        Assert.assertEquals(cloudEvent.getSubject(), "topic");
+
+        byte[] data = RabbitmqCloudEvent.toByteArray(rabbitmqCloudEvent);
+        Assert.assertNotNull(data);
+    }
+
+    @Test
+    public void getFromByteArray() throws Exception {
+        RabbitmqCloudEventWriter writer = new RabbitmqCloudEventWriter();
+        RabbitmqCloudEvent rabbitmqCloudEvent = writer.writeBinary(cloudEvent);
+        Assert.assertEquals(cloudEvent.getSubject(), "topic");
+
+        byte[] data = RabbitmqCloudEvent.toByteArray(rabbitmqCloudEvent);
+        Assert.assertNotNull(data);
+
+        RabbitmqCloudEvent event = RabbitmqCloudEvent.getFromByteArray(data);
+        Assert.assertEquals(event.getExtensions().get("subject"), "topic");
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/config/ConfigurationHolderTest.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/config/ConfigurationHolderTest.java
new file mode 100644
index 0000000000..231703ecc8
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/config/ConfigurationHolderTest.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.config;
+
+import org.apache.eventmesh.api.factory.ConnectorPluginFactory;
+import org.apache.eventmesh.connector.rabbitmq.consumer.RabbitmqConsumer;
+import org.apache.eventmesh.connector.rabbitmq.producer.RabbitmqProducer;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.rabbitmq.client.BuiltinExchangeType;
+
+public class ConfigurationHolderTest {
+
+    @Test
+    public void getConfigWhenRabbitmqConsumerInit() {
+        RabbitmqConsumer consumer =
+                (RabbitmqConsumer) ConnectorPluginFactory.getMeshMQPushConsumer("rabbitmq");
+
+        ConfigurationHolder config = consumer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    @Test
+    public void getConfigWhenRabbitmqProducerInit() {
+        RabbitmqProducer producer =
+                (RabbitmqProducer) ConnectorPluginFactory.getMeshMQProducer("rabbitmq");
+
+        ConfigurationHolder config = producer.getClientConfiguration();
+        assertConfig(config);
+    }
+
+    private void assertConfig(ConfigurationHolder config) {
+        Assert.assertEquals(config.getHost(), "127.0.0.1");
+        Assert.assertEquals(config.getPort(), 5672);
+        Assert.assertEquals(config.getUsername(), "username-success!!!");
+        Assert.assertEquals(config.getPasswd(), "passwd-success!!!");
+        Assert.assertEquals(config.getVirtualHost(), "virtualHost-success!!!");
+
+        Assert.assertEquals(config.getExchangeType(), BuiltinExchangeType.TOPIC);
+        Assert.assertEquals(config.getExchangeName(), "exchangeName-success!!!");
+        Assert.assertEquals(config.getRoutingKey(), "routingKey-success!!!");
+        Assert.assertEquals(config.getQueueName(), "queueName-success!!!");
+        Assert.assertTrue(config.isAutoAck());
+    }
+}
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumerTest.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumerTest.java
new file mode 100644
index 0000000000..ebf9e25fa6
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/consumer/RabbitmqConsumerTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.consumer;
+
+import org.apache.eventmesh.api.EventMeshAction;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.common.utils.ThreadUtils;
+import org.apache.eventmesh.connector.rabbitmq.RabbitmqServer;
+
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.time.OffsetDateTime;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import io.cloudevents.CloudEvent;
+import io.cloudevents.core.builder.CloudEventBuilder;
+
+public class RabbitmqConsumerTest extends RabbitmqServer {
+
+    @Test
+    public void isStarted() {
+        Assert.assertTrue(rabbitmqConsumer.isStarted());
+    }
+
+    @Test
+    public void isClosed() {
+        Assert.assertFalse(rabbitmqConsumer.isClosed());
+    }
+
+    @Test
+    public void subscribe() throws Exception {
+        final int expectedCount = 5;
+        final CountDownLatch downLatch = new CountDownLatch(expectedCount);
+
+        rabbitmqConsumer.registerEventListener((cloudEvent, context) -> {
+            downLatch.countDown();
+            context.commit(EventMeshAction.CommitMessage);
+            Assert.assertEquals(cloudEvent.getSubject(), "topic");
+        });
+
+        rabbitmqConsumer.subscribe("topic");
+
+        ThreadUtils.sleep(1, TimeUnit.SECONDS);
+        for (int i = 0; i < expectedCount; i++) {
+            CloudEvent cloudEvent = CloudEventBuilder.v1()
+                    .withId(String.valueOf(i))
+                    .withTime(OffsetDateTime.now())
+                    .withSource(URI.create("testsource"))
+                    .withSubject("topic")
+                    .withType(String.class.getCanonicalName())
+                    .withDataContentType("text/plain")
+                    .withData("data".getBytes(StandardCharsets.UTF_8))
+                    .build();
+
+            rabbitmqProducer.publish(cloudEvent, new SendCallback() {
+                @Override
+                public void onSuccess(SendResult sendResult) {
+                    Assert.assertEquals(cloudEvent.getId(), sendResult.getMessageId());
+                    Assert.assertEquals(cloudEvent.getSubject(), sendResult.getTopic());
+                }
+
+                @Override
+                public void onException(OnExceptionContext context) {
+                    Assert.assertEquals(cloudEvent.getId(), context.getMessageId());
+                    Assert.assertEquals(cloudEvent.getSubject(), context.getTopic());
+                }
+            });
+        }
+
+        Assert.assertTrue(downLatch.await(5, TimeUnit.MINUTES));
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/producer/RabbitmqProducerTest.java b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/producer/RabbitmqProducerTest.java
new file mode 100644
index 0000000000..567e747207
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/java/org/apache/eventmesh/connector/rabbitmq/producer/RabbitmqProducerTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rabbitmq.producer;
+
+import org.apache.eventmesh.api.EventMeshAction;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.common.utils.ThreadUtils;
+import org.apache.eventmesh.connector.rabbitmq.RabbitmqServer;
+
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.time.OffsetDateTime;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import io.cloudevents.CloudEvent;
+import io.cloudevents.core.builder.CloudEventBuilder;
+
+public class RabbitmqProducerTest extends RabbitmqServer {
+
+    @Test
+    public void isStarted() {
+        Assert.assertTrue(rabbitmqProducer.isStarted());
+    }
+
+    @Test
+    public void isClosed() {
+        Assert.assertFalse(rabbitmqProducer.isClosed());
+    }
+
+    @Test
+    public void publish() throws Exception {
+        final int expectedCount = 5;
+        final CountDownLatch downLatch = new CountDownLatch(expectedCount);
+
+        rabbitmqConsumer.registerEventListener((cloudEvent, context) -> {
+            downLatch.countDown();
+            context.commit(EventMeshAction.CommitMessage);
+            Assert.assertEquals(cloudEvent.getSubject(), "topic");
+        });
+
+        rabbitmqConsumer.subscribe("topic");
+
+        ThreadUtils.sleep(1, TimeUnit.SECONDS);
+        for (int i = 0; i < expectedCount; i++) {
+            CloudEvent cloudEvent = CloudEventBuilder.v1()
+                    .withId(String.valueOf(i))
+                    .withTime(OffsetDateTime.now())
+                    .withSource(URI.create("testsource"))
+                    .withSubject("topic")
+                    .withType(String.class.getCanonicalName())
+                    .withDataContentType("text/plain")
+                    .withData("data".getBytes(StandardCharsets.UTF_8))
+                    .build();
+
+            rabbitmqProducer.publish(cloudEvent, new SendCallback() {
+                @Override
+                public void onSuccess(SendResult sendResult) {
+                    Assert.assertEquals(cloudEvent.getId(), sendResult.getMessageId());
+                    Assert.assertEquals(cloudEvent.getSubject(), sendResult.getTopic());
+                }
+
+                @Override
+                public void onException(OnExceptionContext context) {
+                    Assert.assertEquals(cloudEvent.getId(), context.getMessageId());
+                    Assert.assertEquals(cloudEvent.getSubject(), context.getTopic());
+                }
+            });
+        }
+
+        Assert.assertTrue(downLatch.await(5, TimeUnit.MINUTES));
+    }
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/resources/rabbitmq-client.properties b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/resources/rabbitmq-client.properties
new file mode 100644
index 0000000000..082fbe5b45
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-rabbitmq/src/test/resources/rabbitmq-client.properties
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+####################### rabbitmq server ##################
+eventMesh.server.rabbitmq.host=127.0.0.1
+eventMesh.server.rabbitmq.port=5672
+eventMesh.server.rabbitmq.username=username-success!!!
+eventMesh.server.rabbitmq.passwd=passwd-success!!!
+eventMesh.server.rabbitmq.virtualHost=virtualHost-success!!!
+
+####################### rabbitmq queue setting ##################
+# DIRECT, FANOUT, TOPIC, HEADERS
+eventMesh.server.rabbitmq.exchangeType=TOPIC
+eventMesh.server.rabbitmq.exchangeName=exchangeName-success!!!
+eventMesh.server.rabbitmq.routingKey=routingKey-success!!!
+eventMesh.server.rabbitmq.queueName=queueName-success!!!
+eventMesh.server.rabbitmq.autoAck=true
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-redis/build.gradle
index 61e33853a9..9ba6898dbd 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-redis/build.gradle
+++ b/eventmesh-connector-plugin/eventmesh-connector-redis/build.gradle
@@ -43,4 +43,14 @@ dependencies {
     // test dependencies
     testImplementation 'ai.grakn:redis-mock:0.1.6'
     testImplementation "org.mockito:mockito-core"
+
+    compileOnly 'org.projectlombok:lombok:1.18.22'
+    annotationProcessor 'org.projectlombok:lombok:1.18.22'
+
+    testCompileOnly 'org.projectlombok:lombok:1.18.22'
+    testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
+}
+
+test {
+    systemProperty "io.netty.tryUnsafe", "false"
 }
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/client/RedissonClient.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/client/RedissonClient.java
index 14ad394936..42891c26f4 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/client/RedissonClient.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/client/RedissonClient.java
@@ -17,13 +17,10 @@
 
 package org.apache.eventmesh.connector.redis.client;
 
-import static org.apache.eventmesh.connector.redis.config.ConfigurationWrapper.getPropertiesByPrefix;
-import static org.apache.eventmesh.connector.redis.config.ConfigurationWrapper.getProperty;
-
 import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
 import org.apache.eventmesh.common.Constants;
+import org.apache.eventmesh.common.config.ConfigService;
 import org.apache.eventmesh.connector.redis.cloudevent.CloudEventCodec;
-import org.apache.eventmesh.connector.redis.config.ConfigOptions;
 import org.apache.eventmesh.connector.redis.config.RedisProperties;
 
 import java.util.Arrays;
@@ -45,7 +42,7 @@ public final class RedissonClient {
     public static final Redisson INSTANCE;
 
     static {
-        OBJECT_MAPPER.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, Boolean.FALSE);
+        OBJECT_MAPPER.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
 
         INSTANCE = create();
 
@@ -59,39 +56,8 @@ public final class RedissonClient {
     }
 
     public static Redisson create() {
-        RedisProperties properties = new RedisProperties();
-        String serverTypeName = getProperty(ConfigOptions.SERVER_TYPE);
-        if (serverTypeName != null) {
-            try {
-                properties.setServerType(RedisProperties.ServerType.valueOf(serverTypeName));
-            } catch (Exception e) {
-                final String message = "Invalid Redis server type: " + properties.getServerType()
-                    + ", supported values are: "
-                    + Arrays.toString(RedisProperties.ServerType.values());
-                throw new ConnectorRuntimeException(message, e);
-            }
-        } else {
-            properties.setServerType(RedisProperties.ServerType.SINGLE);
-        }
-
-        String serverAddress = getProperty(ConfigOptions.SERVER_ADDRESS);
-        if (serverAddress != null) {
-            properties.setServerAddress(serverAddress);
-        } else {
-            throw new ConnectorRuntimeException("Lack Redis server address");
-        }
-
-        String serverMasterName = getProperty(ConfigOptions.SERVER_MASTER_NAME);
-        if (serverMasterName != null) {
-            properties.setServerMasterName(serverMasterName);
-        }
-
-        String serverPassword = getProperty(ConfigOptions.SERVER_PASSWORD);
-        if (serverPassword != null) {
-            properties.setServerPassword(serverPassword);
-        }
-
-        properties.setRedissonProperties(getPropertiesByPrefix(ConfigOptions.REDISSON_PROPERTIES_PREFIX));
+        ConfigService configService = ConfigService.getInstance();
+        RedisProperties properties = configService.buildConfigInstance(RedisProperties.class);
 
         return create(properties);
     }
@@ -102,8 +68,8 @@ private static Redisson create(RedisProperties properties) {
             serverType = properties.getServerType();
         } catch (IllegalArgumentException ie) {
             final String message = "Invalid Redis server type: " + properties.getServerType()
-                + ", supported values are: "
-                + Arrays.toString(RedisProperties.ServerType.values());
+                    + ", supported values are: "
+                    + Arrays.toString(RedisProperties.ServerType.values());
             throw new ConnectorRuntimeException(message, ie);
         }
 
@@ -122,24 +88,24 @@ private static Redisson create(RedisProperties properties) {
         switch (serverType) {
             case SINGLE:
                 config.useSingleServer()
-                    .setAddress(serverAddress)
-                    .setPassword(serverPassword);
+                        .setAddress(serverAddress)
+                        .setPassword(serverPassword);
                 break;
             case CLUSTER:
                 config.useClusterServers()
-                    .addNodeAddress(serverAddress.split(Constants.COMMA))
-                    .setPassword(serverPassword);
+                        .addNodeAddress(serverAddress.split(Constants.COMMA))
+                        .setPassword(serverPassword);
                 break;
             case SENTINEL:
                 config.useSentinelServers()
-                    .setMasterName(masterName)
-                    .addSentinelAddress(serverAddress)
-                    .setPassword(serverPassword);
+                        .setMasterName(masterName)
+                        .addSentinelAddress(serverAddress)
+                        .setPassword(serverPassword);
                 break;
             default:
                 final String message = "Invalid Redis server type: " + properties.getServerType()
-                    + ", supported values are: "
-                    + Arrays.toString(RedisProperties.ServerType.values());
+                        + ", supported values are: "
+                        + Arrays.toString(RedisProperties.ServerType.values());
                 throw new ConnectorRuntimeException(message);
         }
 
diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/cloudevent/CloudEventCodec.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/cloudevent/CloudEventCodec.java
index 25014b2ee2..7d15855060 100644
--- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/cloudevent/CloudEventCodec.java
+++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/cloudevent/CloudEventCodec.java
@@ -31,7 +31,7 @@ public class CloudEventCodec extends BaseCodec {
 
     public static final CloudEventCodec INSTANCE = new CloudEventCodec();
 
-    private static final JsonFormat jsonFormat = new JsonFormat(Boolean.FALSE, Boolean.TRUE);
+    private static final JsonFormat jsonFormat = new JsonFormat(false, true);
 
     private static final Encoder encoder = in -> {
         ByteBuf out = ByteBufAllocator.DEFAULT.buffer();
diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/ConfigOptions.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/ConfigOptions.java
deleted file mode 100644
index f882a866fd..0000000000
--- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/ConfigOptions.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.eventmesh.connector.redis.config;
-
-/**
- * Redis connector related configuration options.
- */
-public interface ConfigOptions {
-
-    /**
-     * The redis server configuration to be used, default is SINGLE.
-     */
-    String SERVER_TYPE = "eventMesh.server.redis.serverType";
-
-    /**
-     * The master server name used by Redis Sentinel servers and master change monitoring task, default is master.
-     */
-    String SERVER_MASTER_NAME = "eventMesh.server.redis.serverMasterName";
-
-    /**
-     * The address of the redis server following format -- host1:port1,host2:port2,……
-     */
-    String SERVER_ADDRESS = "eventMesh.server.redis.serverAddress";
-
-    /**
-     * The password for redis authentication.
-     */
-    String SERVER_PASSWORD = "eventMesh.server.redis.serverPassword";
-
-    /**
-     * The redisson options, redisson properties, please refer to the redisson manual.
-     * 

- * For example, the redisson timeout property is configured as eventMesh.server.redis.redisson.timeout - */ - String REDISSON_PROPERTIES_PREFIX = "eventMesh.server.redis.redisson"; -} diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/ConfigurationWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/ConfigurationWrapper.java deleted file mode 100644 index 7d83965975..0000000000 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/ConfigurationWrapper.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.eventmesh.connector.redis.config; - -import org.apache.eventmesh.common.Constants; -import org.apache.eventmesh.common.utils.PropertiesUtils; - -import org.apache.commons.lang3.StringUtils; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -public class ConfigurationWrapper { - - private static final String CONF_FILE = "redis-client.properties"; - - private static final Properties properties = new Properties(); - - static { - loadProperties(); - } - - public static String getProperty(String key) { - return StringUtils.isEmpty(key) - ? null : properties.getProperty(key, null); - } - - public static Properties getPropertiesByPrefix(String prefix) { - if (StringUtils.isBlank(prefix)) { - return null; - } - Properties to = new Properties(); - return PropertiesUtils.getPropertiesByPrefix(properties, to, prefix); - } - - private static void loadProperties() { - try (InputStream resourceAsStream = ConfigurationWrapper.class.getResourceAsStream( - "/" + CONF_FILE)) { - if (resourceAsStream != null) { - properties.load(resourceAsStream); - } - } catch (IOException e) { - throw new RuntimeException(String.format("Load %s file from classpath error", CONF_FILE)); - } - try { - String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + CONF_FILE; - if (new File(configPath).exists()) { - properties.load(new BufferedReader(new FileReader(configPath))); - } - } catch (IOException e) { - throw new IllegalArgumentException(String.format("Cannot load %s file from conf", CONF_FILE)); - } - } -} diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisProperties.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisProperties.java index 7e5d7b20ed..42906b1b08 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisProperties.java +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisProperties.java @@ -17,75 +17,48 @@ package org.apache.eventmesh.connector.redis.config; +import org.apache.eventmesh.common.config.Config; +import org.apache.eventmesh.common.config.ConfigFiled; + import java.util.Properties; +import lombok.Data; + +@Data +@Config(prefix = "eventMesh.server.redis", path = "classPath://redis-client.properties") public class RedisProperties { /** * The redis server configuration to be used. */ + @ConfigFiled(field = "serverType") private ServerType serverType = ServerType.SINGLE; /** * The master server name used by Redis Sentinel servers and master change monitoring task. */ + @ConfigFiled(field = "serverMasterName") private String serverMasterName = "master"; /** * The address of the redis server following format -- host1:port1,host2:port2,…… */ + @ConfigFiled(field = "serverAddress") private String serverAddress; /** * The password for redis authentication. */ + @ConfigFiled(field = "serverPassword") private String serverPassword; /** - * The redisson options, redisson properties, please refer to the redisson manual. + * The redisson options, redisson properties + * prefix is `eventMesh.server.redis.redisson` */ + @ConfigFiled(field = "redisson") private Properties redissonProperties; - public ServerType getServerType() { - return serverType; - } - - public void setServerType(ServerType serverType) { - this.serverType = serverType; - } - - public String getServerAddress() { - return serverAddress; - } - - public void setServerAddress(String serverAddress) { - this.serverAddress = serverAddress; - } - - public String getServerPassword() { - return serverPassword; - } - - public void setServerPassword(String serverPassword) { - this.serverPassword = serverPassword; - } - - public String getServerMasterName() { - return serverMasterName; - } - - public void setServerMasterName(String serverMasterName) { - this.serverMasterName = serverMasterName; - } - - public Properties getRedissonProperties() { - return redissonProperties; - } - - public void setRedissonProperties(Properties redissonProperties) { - this.redissonProperties = redissonProperties; - } - public enum ServerType { SINGLE, CLUSTER, diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumer.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumer.java index 511b0339b2..2abd68e52d 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumer.java +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumer.java @@ -29,16 +29,16 @@ import org.redisson.Redisson; import org.redisson.api.listener.MessageListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import io.cloudevents.CloudEvent; import com.google.common.base.Preconditions; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class RedisConsumer implements Consumer { - private static final Logger logger = LoggerFactory.getLogger(RedisConsumer.class); private Redisson redisson; @@ -120,7 +120,7 @@ public void onMessage(CharSequence channel, CloudEvent msg) { final EventMeshAsyncConsumeContext consumeContext = new EventMeshAsyncConsumeContext() { @Override public void commit(EventMeshAction action) { - logger.info("channel: {} consumer event: {} finish action: {}", + log.info("channel: {} consumer event: {} finish action: {}", channel, msg.getId(), action); } }; diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/config/RedisPropertiesTest.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/config/RedisPropertiesTest.java new file mode 100644 index 0000000000..9321f53701 --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/config/RedisPropertiesTest.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.connector.redis.config; + +import org.apache.eventmesh.common.config.ConfigService; + +import java.util.Properties; + +import org.junit.Assert; +import org.junit.Test; + +public class RedisPropertiesTest { + + @Test + public void getRedisProperties() { + ConfigService configService = ConfigService.getInstance(); + RedisProperties config = configService.buildConfigInstance(RedisProperties.class); + assertConfig(config); + } + + private void assertConfig(RedisProperties config) { + Assert.assertEquals(config.getServerAddress(), "redis://127.0.0.1:6379"); + Assert.assertEquals(config.getServerType(), RedisProperties.ServerType.SINGLE); + Assert.assertEquals(config.getServerMasterName(), "serverMasterName-success!!!"); + + Properties properties = new Properties(); + properties.put("threads", "2"); + properties.put("nettyThreads", "2"); + Properties redissonProperties = config.getRedissonProperties(); + Assert.assertEquals(redissonProperties, properties); + } +} \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/connector/UnitTest.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/connector/UnitTest.java index c50f747471..1b9072914c 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/connector/UnitTest.java +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/connector/UnitTest.java @@ -27,6 +27,7 @@ import org.apache.eventmesh.connector.redis.producer.RedisProducer; import java.net.URI; +import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Properties; import java.util.concurrent.CountDownLatch; @@ -87,7 +88,7 @@ public void testPubSub() throws Exception { .withSubject(topic) .withType(String.class.getCanonicalName()) .withDataContentType("text/plain") - .withData("data".getBytes()) + .withData("data".getBytes(StandardCharsets.UTF_8)) .build(); redisProducer.publish(cloudEvent, new SendCallback() { diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumerTest.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumerTest.java index c0f65879ae..9609672cbb 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumerTest.java +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/consumer/RedisConsumerTest.java @@ -22,6 +22,7 @@ import org.apache.eventmesh.connector.redis.client.RedissonClient; import java.net.URI; +import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Properties; import java.util.concurrent.CountDownLatch; @@ -77,7 +78,7 @@ public void testSubscribe() throws Exception { .withSubject("topic") .withType(String.class.getCanonicalName()) .withDataContentType("text/plain") - .withData("data".getBytes()) + .withData("data".getBytes(StandardCharsets.UTF_8)) .build(); redissonTopic.publish(cloudEvent); diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/producer/RedisProducerTest.java b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/producer/RedisProducerTest.java index 7494c1727c..15dd65ff09 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/producer/RedisProducerTest.java +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/java/org/apache/eventmesh/connector/redis/producer/RedisProducerTest.java @@ -23,6 +23,7 @@ import org.apache.eventmesh.connector.redis.AbstractRedisServer; import java.net.URI; +import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Properties; import java.util.UUID; @@ -65,7 +66,7 @@ public void testPublish() throws Exception { .withSubject(RedisProducerTest.class.getSimpleName()) .withType(String.class.getCanonicalName()) .withDataContentType("text/plain") - .withData("data".getBytes()) + .withData("data".getBytes(StandardCharsets.UTF_8)) .build(); redisProducer.publish(cloudEvent, new SendCallback() { diff --git a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/resources/redis-client.properties b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/resources/redis-client.properties index 9151c027ee..7c89643f73 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/resources/redis-client.properties +++ b/eventmesh-connector-plugin/eventmesh-connector-redis/src/test/resources/redis-client.properties @@ -14,5 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -eventMesh.server.redis.serverAddress=redis://127.0.0.1:6379 \ No newline at end of file +eventMesh.server.redis.serverAddress=redis://127.0.0.1:6379 +eventMesh.server.redis.serverType=SINGLE +eventMesh.server.redis.serverMasterName=serverMasterName-success!!! +eventMesh.server.redis.redisson.threads=2 +eventMesh.server.redis.redisson.nettyThreads=2 \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle index 45e6bdd40c..939cd7b722 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle @@ -21,19 +21,19 @@ configurations { } List rocketmq = [ - "org.apache.rocketmq:rocketmq-client:$rocketmq_version", - "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", - "org.apache.rocketmq:rocketmq-common:$rocketmq_version", - "org.apache.rocketmq:rocketmq-store:$rocketmq_version", - "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", - "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", - "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", - "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", - "org.apache.rocketmq:rocketmq-test:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", - "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", - "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", - "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + "org.apache.rocketmq:rocketmq-client:$rocketmq_version", + "org.apache.rocketmq:rocketmq-broker:$rocketmq_version", + "org.apache.rocketmq:rocketmq-common:$rocketmq_version", + "org.apache.rocketmq:rocketmq-store:$rocketmq_version", + "org.apache.rocketmq:rocketmq-namesrv:$rocketmq_version", + "org.apache.rocketmq:rocketmq-tools:$rocketmq_version", + "org.apache.rocketmq:rocketmq-remoting:$rocketmq_version", + "org.apache.rocketmq:rocketmq-logging:$rocketmq_version", + "org.apache.rocketmq:rocketmq-test:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", + "org.apache.rocketmq:rocketmq-filter:$rocketmq_version", + "org.apache.rocketmq:rocketmq-acl:$rocketmq_version", + "org.apache.rocketmq:rocketmq-srvutil:$rocketmq_version", ] diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/gradle.properties b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/gradle.properties index 2138704df0..120504127f 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/gradle.properties +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/gradle.properties @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - rocketmq_version=4.9.3 - pluginType=connector pluginName=rocketmq \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/RocketMQAdmin.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/RocketMQAdmin.java new file mode 100644 index 0000000000..4e5e918f0f --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/RocketMQAdmin.java @@ -0,0 +1,172 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.eventmesh.connector.rocketmq.admin; + +import org.apache.eventmesh.api.admin.Admin; +import org.apache.eventmesh.api.admin.TopicProperties; +import org.apache.eventmesh.common.config.ConfigService; +import org.apache.eventmesh.connector.rocketmq.config.ClientConfiguration; + +import org.apache.commons.lang3.StringUtils; +import org.apache.rocketmq.acl.common.AclClientRPCHook; +import org.apache.rocketmq.acl.common.SessionCredentials; +import org.apache.rocketmq.common.TopicConfig; +import org.apache.rocketmq.common.admin.TopicOffset; +import org.apache.rocketmq.common.admin.TopicStatsTable; +import org.apache.rocketmq.common.message.MessageQueue; +import org.apache.rocketmq.remoting.RPCHook; +import org.apache.rocketmq.tools.admin.DefaultMQAdminExt; +import org.apache.rocketmq.tools.command.CommandUtil; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Properties; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicBoolean; + +import io.cloudevents.CloudEvent; + +public class RocketMQAdmin implements Admin { + private final AtomicBoolean isStarted; + + protected DefaultMQAdminExt adminExt; + + protected String nameServerAddr; + + protected String clusterName; + + private int numOfQueue = 4; + private int queuePermission = 6; + + public RocketMQAdmin(Properties properties) { + isStarted = new AtomicBoolean(false); + + ConfigService configService = ConfigService.getInstance(); + ClientConfiguration clientConfiguration = configService.buildConfigInstance(ClientConfiguration.class); + + nameServerAddr = clientConfiguration.namesrvAddr; + clusterName = clientConfiguration.clusterName; + String accessKey = clientConfiguration.accessKey; + String secretKey = clientConfiguration.secretKey; + + RPCHook rpcHook = new AclClientRPCHook(new SessionCredentials(accessKey, secretKey)); + adminExt = new DefaultMQAdminExt(rpcHook); + String groupId = UUID.randomUUID().toString(); + adminExt.setAdminExtGroup("admin_ext_group-" + groupId); + adminExt.setNamesrvAddr(nameServerAddr); + } + + @Override + public boolean isStarted() { + return isStarted.get(); + } + + @Override + public boolean isClosed() { + return !isStarted.get(); + } + + @Override + public void start() { + isStarted.compareAndSet(false, true); + } + + @Override + public void shutdown() { + isStarted.compareAndSet(true, false); + } + + @Override + public void init(Properties keyValue) throws Exception { + } + + @Override + public List getTopic() throws Exception { + try { + adminExt.start(); + List result = new ArrayList<>(); + + Set topicList = adminExt.fetchAllTopicList().getTopicList(); + for (String topic : topicList) { + long messageCount = 0; + TopicStatsTable topicStats = adminExt.examineTopicStats(topic); + HashMap offsetTable = topicStats.getOffsetTable(); + for (TopicOffset topicOffset : offsetTable.values()) { + messageCount += topicOffset.getMaxOffset() - topicOffset.getMinOffset(); + } + result.add(new TopicProperties( + topic, messageCount + )); + } + + result.sort(Comparator.comparing(t -> t.name)); + return result; + } finally { + adminExt.shutdown(); + } + } + + @Override + public void createTopic(String topicName) throws Exception { + if (StringUtils.isBlank(topicName)) { + throw new Exception("Topic name can not be blank"); + } + try { + adminExt.start(); + Set brokerAddress = CommandUtil.fetchMasterAddrByClusterName(adminExt, clusterName); + for (String masterAddress : brokerAddress) { + TopicConfig topicConfig = new TopicConfig(); + topicConfig.setTopicName(topicName); + topicConfig.setReadQueueNums(numOfQueue); + topicConfig.setWriteQueueNums(numOfQueue); + topicConfig.setPerm(queuePermission); + adminExt.createAndUpdateTopicConfig(masterAddress, topicConfig); + } + } finally { + adminExt.shutdown(); + } + } + + @Override + public void deleteTopic(String topicName) throws Exception { + if (StringUtils.isBlank(topicName)) { + throw new Exception("Topic name can not be blank."); + } + try { + adminExt.start(); + Set brokerAddress = CommandUtil.fetchMasterAddrByClusterName(adminExt, clusterName); + adminExt.deleteTopicInBroker(brokerAddress, topicName); + } finally { + adminExt.shutdown(); + } + } + + @Override + public List getEvent(String topicName, int offset, int length) throws Exception { + return null; + } + + @Override + public void publish(CloudEvent cloudEvent) throws Exception { + } +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/RocketMQAdminAdaptor.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/RocketMQAdminAdaptor.java new file mode 100644 index 0000000000..30134e8c51 --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/RocketMQAdminAdaptor.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.eventmesh.connector.rocketmq.admin; + +import org.apache.eventmesh.api.admin.Admin; +import org.apache.eventmesh.api.admin.TopicProperties; + +import java.util.List; +import java.util.Properties; + +import io.cloudevents.CloudEvent; + +public class RocketMQAdminAdaptor implements Admin { + + private RocketMQAdmin admin; + + public RocketMQAdminAdaptor() { + } + + @Override + public boolean isStarted() { + return admin.isStarted(); + } + + @Override + public boolean isClosed() { + return admin.isClosed(); + } + + @Override + public void start() { + admin.start(); + } + + @Override + public void shutdown() { + admin.shutdown(); + } + + @Override + public void init(Properties keyValue) throws Exception { + admin = new RocketMQAdmin(keyValue); + } + + @Override + public List getTopic() throws Exception { + return admin.getTopic(); + } + + @Override + public void createTopic(String topicName) throws Exception { + admin.createTopic(topicName); + } + + @Override + public void deleteTopic(String topicName) throws Exception { + admin.deleteTopic(topicName); + } + + @Override + public List getEvent(String topicName, int offset, int length) throws Exception { + return admin.getEvent(topicName, offset, length); + } + + @Override + public void publish(CloudEvent cloudEvent) throws Exception { + admin.publish(cloudEvent); + } +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/Command.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/Command.java index 9f3b5e9e60..1ccf5ef60f 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/Command.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/Command.java @@ -17,6 +17,7 @@ package org.apache.eventmesh.connector.rocketmq.admin.command; +import org.apache.eventmesh.common.config.ConfigService; import org.apache.eventmesh.connector.rocketmq.config.ClientConfiguration; import org.apache.rocketmq.acl.common.AclClientRPCHook; @@ -26,6 +27,9 @@ import java.util.UUID; +import lombok.Data; + +@Data public abstract class Command { protected DefaultMQAdminExt adminExt; @@ -33,8 +37,8 @@ public abstract class Command { protected String clusterName; public void init() { - final ClientConfiguration clientConfiguration = new ClientConfiguration(); - clientConfiguration.init(); + ConfigService configService = ConfigService.getInstance(); + ClientConfiguration clientConfiguration = configService.buildConfigInstance(ClientConfiguration.class); nameServerAddr = clientConfiguration.namesrvAddr; clusterName = clientConfiguration.clusterName; diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/CreateTopicCommand.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/CreateTopicCommand.java deleted file mode 100644 index f1e325e552..0000000000 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/admin/command/CreateTopicCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.eventmesh.connector.rocketmq.admin.command; - -import org.apache.commons.lang3.StringUtils; -import org.apache.rocketmq.common.TopicConfig; -import org.apache.rocketmq.tools.command.CommandUtil; - -import java.util.Set; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class CreateTopicCommand extends Command { - public Logger logger = LoggerFactory.getLogger(this.getClass()); - - private int numOfQueue = 4; - private int queuePermission = 6; - private String topicName = ""; - - @Override - public void execute() throws Exception { - if (StringUtils.isBlank(topicName)) { - logger.error("Topic name can not be blank."); - throw new Exception("Topic name can not be blank."); - } - try { - init(); - adminExt.start(); - Set brokersAddr = CommandUtil.fetchMasterAddrByClusterName( - adminExt, clusterName); - for (String masterAddr : brokersAddr) { - TopicConfig topicConfig = new TopicConfig(); - topicConfig.setTopicName(topicName); - topicConfig.setReadQueueNums(numOfQueue); - topicConfig.setWriteQueueNums(numOfQueue); - topicConfig.setPerm(queuePermission); - adminExt.createAndUpdateTopicConfig(masterAddr, topicConfig); - logger.info("Topic {} is created for RocketMQ broker {}", topicName, masterAddr); - } - } finally { - adminExt.shutdown(); - } - } - - public int getNumOfQueue() { - return numOfQueue; - } - - public int getQueuePermission() { - return queuePermission; - } - - public String getTopicName() { - return topicName; - } - - public void setTopicName(String topicName) { - this.topicName = topicName; - } - - public void setNumOfQueue(int numOfQueue) { - this.numOfQueue = numOfQueue; - } - - public void setQueuePermission(int permission) { - this.queuePermission = permission; - } -} diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/RocketMQMessageFactory.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/RocketMQMessageFactory.java index 24699ef9fe..547b308ab4 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/RocketMQMessageFactory.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/RocketMQMessageFactory.java @@ -49,13 +49,13 @@ public static MessageReader createReader(final Message message) throws CloudEven public static MessageReader createReader(final Map props, @Nullable final byte[] body) - throws CloudEventRWException { + throws CloudEventRWException { return MessageUtils.parseStructuredOrBinaryMessage( - () -> null, - format -> null, - () -> props.get(RocketMQHeaders.SPEC_VERSION), - sv -> new RocketMQBinaryMessageReader(sv, props, body) + () -> null, + format -> null, + () -> props.get(RocketMQHeaders.SPEC_VERSION), + sv -> new RocketMQBinaryMessageReader(sv, props, body) ); } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQBinaryMessageReader.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQBinaryMessageReader.java index 07888a6a72..e1d789c438 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQBinaryMessageReader.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQBinaryMessageReader.java @@ -26,14 +26,14 @@ import io.cloudevents.core.message.impl.BaseGenericBinaryMessageReaderImpl; public class RocketMQBinaryMessageReader - extends BaseGenericBinaryMessageReaderImpl { + extends BaseGenericBinaryMessageReaderImpl { private final Map headers; public RocketMQBinaryMessageReader(SpecVersion version, Map headers, byte[] payload) { super(version, - payload != null && payload.length > 0 ? BytesCloudEventData.wrap(payload) : null); + payload != null && payload.length > 0 ? BytesCloudEventData.wrap(payload) : null); Objects.requireNonNull(headers); this.headers = headers; @@ -56,7 +56,7 @@ protected String toCloudEventsKey(String key) { @Override protected void forEachHeader(BiConsumer fn) { - this.headers.forEach((k, v) -> fn.accept(k, v)); + this.headers.forEach(fn); } @Override diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQHeaders.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQHeaders.java index 793092355d..64600ae0a7 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQHeaders.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQHeaders.java @@ -27,10 +27,10 @@ public class RocketMQHeaders { public static final String CE_PREFIX = "CE_"; protected static final Map ATTRIBUTES_TO_HEADERS = - MessageUtils.generateAttributesToHeadersMapping(v -> v); + MessageUtils.generateAttributesToHeadersMapping(v -> v); public static final String CONTENT_TYPE = - ATTRIBUTES_TO_HEADERS.get(CloudEventV1.DATACONTENTTYPE); + ATTRIBUTES_TO_HEADERS.get(CloudEventV1.DATACONTENTTYPE); public static final String SPEC_VERSION = ATTRIBUTES_TO_HEADERS.get(CloudEventV1.SPECVERSION); diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQMessageWriter.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQMessageWriter.java index 6900c44cee..4985130ba7 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQMessageWriter.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQMessageWriter.java @@ -29,7 +29,7 @@ public final class RocketMQMessageWriter - implements MessageWriter, Message>, CloudEventWriter { + implements MessageWriter, Message>, CloudEventWriter { private Message message; @@ -66,7 +66,7 @@ public RocketMQMessageWriter(String topic, String keys, String tags) { @Override public CloudEventContextWriter withContextAttribute(String name, String value) - throws CloudEventRWException { + throws CloudEventRWException { message.putUserProperty(name, value); return this; } @@ -79,7 +79,7 @@ public RocketMQMessageWriter create(final SpecVersion version) { @Override public Message setEvent(final EventFormat format, final byte[] value) - throws CloudEventRWException { + throws CloudEventRWException { message.putUserProperty(RocketMQHeaders.CONTENT_TYPE, format.serializedContentType()); message.setBody(value); return message; diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfiguration.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfiguration.java index 53f7e5f2cf..547e3a6fef 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfiguration.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfiguration.java @@ -17,185 +17,57 @@ package org.apache.eventmesh.connector.rocketmq.config; -import org.apache.commons.lang3.StringUtils; - -import com.google.common.base.Preconditions; +import org.apache.eventmesh.common.config.Config; +import org.apache.eventmesh.common.config.ConfigFiled; +@Config(prefix = "eventMesh.server.rocketmq", path = "classPath://rocketmq-client.properties") public class ClientConfiguration { + @ConfigFiled(field = "namesrvAddr", notEmpty = true) public String namesrvAddr = ""; + + @ConfigFiled(field = "username") public String clientUserName = "username"; + + @ConfigFiled(field = "password") public String clientPass = "password"; + + @ConfigFiled(field = "client.consumeThreadMin") public Integer consumeThreadMin = 2; + + @ConfigFiled(field = "client.consumeThreadMax") public Integer consumeThreadMax = 2; + + @ConfigFiled(field = "client.consumeThreadPoolQueueSize") public Integer consumeQueueSize = 10000; + + @ConfigFiled(field = "client.pullBatchSize") public Integer pullBatchSize = 32; + + @ConfigFiled(field = "client.ackwindow") public Integer ackWindow = 1000; + + @ConfigFiled(field = "client.pubwindow") public Integer pubWindow = 100; + + @ConfigFiled(field = "client.comsumeTimeoutInMin") public long consumeTimeout = 0L; + + @ConfigFiled(field = "client.pollNameServerInterval") public Integer pollNameServerInterval = 10 * 1000; + + @ConfigFiled(field = "client.heartbeatBrokerInterval") public Integer heartbeatBrokerInterval = 30 * 1000; + + @ConfigFiled(field = "client.rebalanceInterval") public Integer rebalanceInterval = 20 * 1000; - public String clusterName = ""; - public String accessKey = ""; - public String secretKey = ""; - public void init() { - - String clientUserNameStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_USERNAME); - if (StringUtils.isNotBlank(clientUserNameStr)) { - clientUserName = StringUtils.trim(clientUserNameStr); - } - - String clientPassStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_PASSWORD); - if (StringUtils.isNotBlank(clientPassStr)) { - clientPass = StringUtils.trim(clientPassStr); - } - - String namesrvAddrStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_NAMESRV_ADDR); - Preconditions.checkState(StringUtils.isNotEmpty(namesrvAddrStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_NAMESRV_ADDR)); - namesrvAddr = StringUtils.trim(namesrvAddrStr); - - String consumeThreadPoolMinStr = - ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MIN); - if (StringUtils.isNotEmpty(consumeThreadPoolMinStr)) { - Preconditions.checkState(StringUtils.isNumeric(consumeThreadPoolMinStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MIN)); - consumeThreadMin = Integer.valueOf(consumeThreadPoolMinStr); - } - - String consumeThreadPoolMaxStr = - ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MAX); - if (StringUtils.isNotEmpty(consumeThreadPoolMaxStr)) { - Preconditions.checkState(StringUtils.isNumeric(consumeThreadPoolMaxStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MAX)); - consumeThreadMax = Integer.valueOf(consumeThreadPoolMaxStr); - } - - String consumerThreadPoolQueueSizeStr = - ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_QUEUESIZE); - if (StringUtils.isNotEmpty(consumerThreadPoolQueueSizeStr)) { - Preconditions.checkState(StringUtils.isNumeric(consumerThreadPoolQueueSizeStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_QUEUESIZE)); - consumeQueueSize = Integer.valueOf(consumerThreadPoolQueueSizeStr); - } - - String clientAckWindowStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_ACK_WINDOW); - if (StringUtils.isNotEmpty(clientAckWindowStr)) { - Preconditions.checkState(StringUtils.isNumeric(clientAckWindowStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_ACK_WINDOW)); - ackWindow = Integer.valueOf(clientAckWindowStr); - } - - String clientPubWindowStr = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_PUB_WINDOW); - if (StringUtils.isNotEmpty(clientPubWindowStr)) { - Preconditions.checkState(StringUtils.isNumeric(clientPubWindowStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_PUB_WINDOW)); - pubWindow = Integer.valueOf(clientPubWindowStr); - } - - String consumeTimeoutStr = - ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_CONSUME_TIMEOUT); - if (StringUtils.isNotBlank(consumeTimeoutStr)) { - Preconditions.checkState(StringUtils.isNumeric(consumeTimeoutStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_CONSUME_TIMEOUT)); - consumeTimeout = Long.parseLong(consumeTimeoutStr); - } - - String clientPullBatchSizeStr = - ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_PULL_BATCHSIZE); - if (StringUtils.isNotEmpty(clientPullBatchSizeStr)) { - Preconditions.checkState(StringUtils.isNumeric(clientPullBatchSizeStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_PULL_BATCHSIZE)); - pullBatchSize = Integer.valueOf(clientPullBatchSizeStr); - } - - String clientPollNamesrvIntervalStr = - ConfigurationWrapper.getProp( - ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_POLL_NAMESRV_INTERVAL); - if (StringUtils.isNotEmpty(clientPollNamesrvIntervalStr)) { - Preconditions.checkState(StringUtils.isNumeric(clientPollNamesrvIntervalStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_POLL_NAMESRV_INTERVAL)); - pollNameServerInterval = Integer.valueOf(clientPollNamesrvIntervalStr); - } - - String clientHeartbeatBrokerIntervalStr = - ConfigurationWrapper.getProp( - ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_HEARTBEAT_BROKER_INTERVAL); - if (StringUtils.isNotEmpty(clientHeartbeatBrokerIntervalStr)) { - Preconditions.checkState(StringUtils.isNumeric(clientHeartbeatBrokerIntervalStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_HEARTBEAT_BROKER_INTERVAL)); - heartbeatBrokerInterval = Integer.valueOf(clientHeartbeatBrokerIntervalStr); - } - - String clientRebalanceIntervalIntervalStr = - ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_REBALANCE_INTERVAL); - if (StringUtils.isNotEmpty(clientRebalanceIntervalIntervalStr)) { - Preconditions.checkState(StringUtils.isNumeric(clientRebalanceIntervalIntervalStr), - String.format("%s error", ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLIENT_REBALANCE_INTERVAL)); - rebalanceInterval = Integer.valueOf(clientRebalanceIntervalIntervalStr); - } - - String cluster = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_CLUSTER); - if (StringUtils.isNotBlank(cluster)) { - clusterName = cluster; - } - - String ak = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_ACCESS_KEY); - if (StringUtils.isNotBlank(ak)) { - accessKey = ak; - } - - String sk = ConfigurationWrapper.getProp(ConfKeys.KEYS_EVENTMESH_ROCKETMQ_SECRET_KEY); - if (StringUtils.isNotBlank(sk)) { - secretKey = sk; - } - } - - static class ConfKeys { - - public static final String KEYS_EVENTMESH_ROCKETMQ_NAMESRV_ADDR = "eventMesh.server.rocketmq.namesrvAddr"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_USERNAME = "eventMesh.server.rocketmq.username"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_PASSWORD = "eventMesh.server.rocketmq.password"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MIN = - "eventMesh.server.rocketmq.client.consumeThreadMin"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MAX = - "eventMesh.server.rocketmq.client.consumeThreadMax"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_QUEUESIZE = - "eventMesh.server.rocketmq.client.consumeThreadPoolQueueSize"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_ACK_WINDOW = "eventMesh.server.rocketmq.client.ackwindow"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_PUB_WINDOW = "eventMesh.server.rocketmq.client.pubwindow"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_CONSUME_TIMEOUT = - "eventMesh.server.rocketmq.client.comsumeTimeoutInMin"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_PULL_BATCHSIZE = - "eventMesh.server.rocketmq.client.pullBatchSize"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_POLL_NAMESRV_INTERVAL = - "eventMesh.server.rocketmq.client.pollNameServerInterval"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_HEARTBEAT_BROKER_INTERVAL = - "eventMesh.server.rocketmq.client.heartbeatBrokerInterval"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_REBALANCE_INTERVAL = - "eventMesh.server.rocketmq.client.rebalanceInterval"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_CLUSTER = "eventMesh.server.rocketmq.cluster"; - - public static final String KEYS_EVENTMESH_ROCKETMQ_ACCESS_KEY = - "eventMesh.server.rocketmq.accessKey"; + @ConfigFiled(field = "cluster") + public String clusterName = ""; - public static final String KEYS_EVENTMESH_ROCKETMQ_SECRET_KEY = - "eventMesh.server.rocketmq.secretKey"; + @ConfigFiled(field = "accessKey") + public String accessKey = ""; - } + @ConfigFiled(field = "secretKey") + public String secretKey = ""; } \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ConfigurationWrapper.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ConfigurationWrapper.java deleted file mode 100644 index 83036bb36b..0000000000 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/config/ConfigurationWrapper.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.eventmesh.connector.rocketmq.config; - -import org.apache.eventmesh.common.Constants; -import org.apache.eventmesh.connector.rocketmq.common.EventMeshConstants; - -import org.apache.commons.lang3.StringUtils; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -import lombok.experimental.UtilityClass; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@UtilityClass -public class ConfigurationWrapper { - - private static final Properties properties = new Properties(); - - static { - loadProperties(); - } - - public String getProp(String key) { - return StringUtils.isEmpty(key) ? null : properties.getProperty(key, null); - } - - /** - * Load rocketmq properties file from classpath and conf home. - * The properties defined in conf home will override classpath. - */ - private void loadProperties() { - try (InputStream resourceAsStream = ConfigurationWrapper.class.getResourceAsStream( - "/" + EventMeshConstants.EVENTMESH_CONF_FILE)) { - if (resourceAsStream != null) { - properties.load(resourceAsStream); - } - } catch (IOException e) { - throw new RuntimeException(String.format("Load %s.properties file from classpath error", EventMeshConstants.EVENTMESH_CONF_FILE)); - } - try { - String configPath = Constants.EVENTMESH_CONF_HOME + File.separator + EventMeshConstants.EVENTMESH_CONF_FILE; - if (new File(configPath).exists()) { - properties.load(new BufferedReader(new FileReader(configPath))); - } - } catch (IOException e) { - throw new IllegalArgumentException(String.format("Cannot load %s file from conf", EventMeshConstants.EVENTMESH_CONF_FILE)); - } - } -} diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/PushConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/PushConsumerImpl.java index 0ec54f5816..24d2dc5652 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/PushConsumerImpl.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/PushConsumerImpl.java @@ -46,6 +46,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Properties; import java.util.concurrent.atomic.AtomicBoolean; @@ -72,7 +73,7 @@ public PushConsumerImpl(final Properties properties) { String consumerGroup = clientConfig.getConsumerId(); if (null == consumerGroup || consumerGroup.isEmpty()) { throw new ConnectorRuntimeException( - "Consumer Group is necessary for RocketMQ, please set it."); + "Consumer Group is necessary for RocketMQ, please set it."); } this.rocketmqPushConsumer.setConsumerGroup(consumerGroup); this.rocketmqPushConsumer.setMaxReconsumeTimes(clientConfig.getRmqMaxRedeliveryTimes()); @@ -80,7 +81,7 @@ public PushConsumerImpl(final Properties properties) { this.rocketmqPushConsumer.setConsumeThreadMax(clientConfig.getRmqMaxConsumeThreadNums()); this.rocketmqPushConsumer.setConsumeThreadMin(clientConfig.getRmqMinConsumeThreadNums()); this.rocketmqPushConsumer.setMessageModel( - MessageModel.valueOf(clientConfig.getMessageModel())); + MessageModel.valueOf(clientConfig.getMessageModel())); String consumerId = OMSUtil.buildInstanceName(); //this.rocketmqPushConsumer.setInstanceName(consumerId); @@ -149,14 +150,16 @@ public void unsubscribe(String topic) { public void updateOffset(List cloudEvents, AbstractContext context) { ConsumeMessageService consumeMessageService = rocketmqPushConsumer - .getDefaultMQPushConsumerImpl().getConsumeMessageService(); + .getDefaultMQPushConsumerImpl().getConsumeMessageService(); List msgExtList = new ArrayList<>(cloudEvents.size()); for (CloudEvent msg : cloudEvents) { - msgExtList.add(CloudEventUtils.msgConvertExt( - RocketMQMessageFactory.createWriter(msg.getSubject()).writeBinary(msg))); + if (msg != null) { + msgExtList.add(CloudEventUtils.msgConvertExt( + RocketMQMessageFactory.createWriter(Objects.requireNonNull(msg.getSubject())).writeBinary(msg))); + } } ((ConsumeMessageConcurrentlyService) consumeMessageService) - .updateOffset(msgExtList, (EventMeshConsumeConcurrentlyContext) context); + .updateOffset(msgExtList, (EventMeshConsumeConcurrentlyContext) context); } @@ -170,13 +173,13 @@ public EventMeshConsumeConcurrentlyStatus handleMessage(MessageExt msg, } msg.putUserProperty(Constants.PROPERTY_MESSAGE_BORN_TIMESTAMP, - String.valueOf(msg.getBornTimestamp())); + String.valueOf(msg.getBornTimestamp())); msg.putUserProperty(Constants.PROPERTY_MESSAGE_STORE_TIMESTAMP, - String.valueOf(msg.getStoreTimestamp())); + String.valueOf(msg.getStoreTimestamp())); //for rr request/reply CloudEvent cloudEvent = - RocketMQMessageFactory.createReader(CloudEventUtils.msgConvert(msg)).toEvent(); + RocketMQMessageFactory.createReader(CloudEventUtils.msgConvert(msg)).toEvent(); CloudEventBuilder cloudEventBuilder = null; for (String sysPropKey : MessageConst.STRING_HASH_SET) { @@ -192,27 +195,27 @@ public EventMeshConsumeConcurrentlyStatus handleMessage(MessageExt msg, if (eventListener == null) { throw new ConnectorRuntimeException(String.format("The topic/queue %s isn't attached to this consumer", - msg.getTopic())); + msg.getTopic())); } final Properties contextProperties = new Properties(); contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); + EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); EventMeshAsyncConsumeContext eventMeshAsyncConsumeContext = new EventMeshAsyncConsumeContext() { @Override public void commit(EventMeshAction action) { switch (action) { case CommitMessage: contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.CONSUME_SUCCESS.name()); + EventMeshConsumeConcurrentlyStatus.CONSUME_SUCCESS.name()); break; case ReconsumeLater: contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); + EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); break; case ManualAck: contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.CONSUME_FINISH.name()); + EventMeshConsumeConcurrentlyStatus.CONSUME_FINISH.name()); break; default: break; @@ -225,7 +228,7 @@ public void commit(EventMeshAction action) { eventListener.consume(cloudEvent, eventMeshAsyncConsumeContext); return EventMeshConsumeConcurrentlyStatus.valueOf( - contextProperties.getProperty(NonStandardKeys.MESSAGE_CONSUME_STATUS)); + contextProperties.getProperty(NonStandardKeys.MESSAGE_CONSUME_STATUS)); } @@ -241,12 +244,12 @@ public EventMeshConsumeConcurrentlyStatus handleMessage(MessageExt msg, } msg.putUserProperty(Constants.PROPERTY_MESSAGE_BORN_TIMESTAMP, - String.valueOf(msg.getBornTimestamp())); + String.valueOf(msg.getBornTimestamp())); msg.putUserProperty(EventMeshConstants.STORE_TIMESTAMP, - String.valueOf(msg.getStoreTimestamp())); + String.valueOf(msg.getStoreTimestamp())); CloudEvent cloudEvent = - RocketMQMessageFactory.createReader(CloudEventUtils.msgConvert(msg)).toEvent(); + RocketMQMessageFactory.createReader(CloudEventUtils.msgConvert(msg)).toEvent(); CloudEventBuilder cloudEventBuilder = null; @@ -263,13 +266,13 @@ public EventMeshConsumeConcurrentlyStatus handleMessage(MessageExt msg, if (eventListener == null) { throw new ConnectorRuntimeException(String.format("The topic/queue %s isn't attached to this consumer", - msg.getTopic())); + msg.getTopic())); } final Properties contextProperties = new Properties(); contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); + EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); EventMeshAsyncConsumeContext eventMeshAsyncConsumeContext = new EventMeshAsyncConsumeContext() { @Override @@ -277,15 +280,15 @@ public void commit(EventMeshAction action) { switch (action) { case CommitMessage: contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.CONSUME_SUCCESS.name()); + EventMeshConsumeConcurrentlyStatus.CONSUME_SUCCESS.name()); break; case ReconsumeLater: contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); + EventMeshConsumeConcurrentlyStatus.RECONSUME_LATER.name()); break; case ManualAck: contextProperties.put(NonStandardKeys.MESSAGE_CONSUME_STATUS, - EventMeshConsumeConcurrentlyStatus.CONSUME_FINISH.name()); + EventMeshConsumeConcurrentlyStatus.CONSUME_FINISH.name()); break; default: break; @@ -298,7 +301,7 @@ public void commit(EventMeshAction action) { eventListener.consume(cloudEvent, eventMeshAsyncConsumeContext); return EventMeshConsumeConcurrentlyStatus.valueOf( - contextProperties.getProperty(NonStandardKeys.MESSAGE_CONSUME_STATUS)); + contextProperties.getProperty(NonStandardKeys.MESSAGE_CONSUME_STATUS)); } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java index a2630652ad..db6e1632a1 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java @@ -21,6 +21,7 @@ import org.apache.eventmesh.api.EventListener; import org.apache.eventmesh.api.consumer.Consumer; import org.apache.eventmesh.common.Constants; +import org.apache.eventmesh.common.config.Config; import org.apache.eventmesh.connector.rocketmq.config.ClientConfiguration; import org.apache.rocketmq.common.protocol.heartbeat.MessageModel; @@ -28,42 +29,38 @@ import java.util.List; import java.util.Properties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import io.cloudevents.CloudEvent; import lombok.extern.slf4j.Slf4j; @Slf4j +@Config(field = "clientConfiguration") public class RocketMQConsumerImpl implements Consumer { - public Logger messageLogger = LoggerFactory.getLogger("message"); - private PushConsumerImpl pushConsumer; + private ClientConfiguration clientConfiguration; + @Override public synchronized void init(Properties keyValue) throws Exception { - final ClientConfiguration clientConfiguration = new ClientConfiguration(); - clientConfiguration.init(); - boolean isBroadcast = Boolean.parseBoolean(keyValue.getProperty(Constants.IS_BROADCAST)); + boolean isBroadcast = Boolean.parseBoolean(keyValue.getProperty("isBroadcast")); - String consumerGroup = keyValue.getProperty(Constants.CONSUMER_GROUP); + String consumerGroup = keyValue.getProperty("consumerGroup"); if (isBroadcast) { consumerGroup = Constants.BROADCAST_PREFIX + consumerGroup; } String namesrvAddr = clientConfiguration.namesrvAddr; - String instanceName = keyValue.getProperty(Constants.INSTANCE_NAME); + String instanceName = keyValue.getProperty("instanceName"); Properties properties = new Properties(); - properties.put(Constants.ACCESS_POINTS, namesrvAddr); - properties.put(Constants.REGION, Constants.NAMESPACE); - properties.put(Constants.INSTANCE_NAME, instanceName); - properties.put(Constants.CONSUMER_ID, consumerGroup); + properties.put("ACCESS_POINTS", namesrvAddr); + properties.put("REGION", "namespace"); + properties.put("instanceName", instanceName); + properties.put("CONSUMER_ID", consumerGroup); if (isBroadcast) { - properties.put(Constants.MESSAGE_MODEL, MessageModel.BROADCASTING.name()); + properties.put("MESSAGE_MODEL", MessageModel.BROADCASTING.name()); } else { - properties.put(Constants.MESSAGE_MODEL, MessageModel.CLUSTERING.name()); + properties.put("MESSAGE_MODEL", MessageModel.CLUSTERING.name()); } pushConsumer = new PushConsumerImpl(properties); @@ -113,4 +110,7 @@ public Properties attributes() { return pushConsumer.attributes(); } + public ClientConfiguration getClientConfiguration() { + return clientConfiguration; + } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/patch/EventMeshMessageListenerConcurrently.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/patch/EventMeshMessageListenerConcurrently.java index 0d32ba27d3..9a7190a480 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/patch/EventMeshMessageListenerConcurrently.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/patch/EventMeshMessageListenerConcurrently.java @@ -25,13 +25,11 @@ import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; +@Slf4j public abstract class EventMeshMessageListenerConcurrently implements MessageListenerConcurrently { - private static final Logger LOG = LoggerFactory.getLogger(EventMeshMessageListenerConcurrently.class); - @Override public ConsumeConcurrentlyStatus consumeMessage(final List msgs, final ConsumeConcurrentlyContext context) { @@ -58,11 +56,11 @@ public ConsumeConcurrentlyStatus consumeMessage(final List msgs, return status; } } catch (Throwable e) { - LOG.info("handleMessage fail", e); + log.info("handleMessage fail", e); return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } } catch (Throwable e) { - LOG.info("handleMessage fail", e); + log.info("handleMessage fail", e); return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } //return status; diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/AbstractProducer.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/AbstractProducer.java index ade88f5a7d..6335d49d0a 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/AbstractProducer.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/AbstractProducer.java @@ -101,24 +101,24 @@ ConnectorRuntimeException checkProducerException(String topic, String msgId, Thr if (e.getCause() != null) { if (e.getCause() instanceof RemotingTimeoutException) { return new RMQTimeoutException( - String.format("Send message to broker timeout, %dms, Topic=%s, msgId=%s", - this.rocketmqProducer.getSendMsgTimeout(), topic, msgId), e); + String.format("Send message to broker timeout, %dms, Topic=%s, msgId=%s", + this.rocketmqProducer.getSendMsgTimeout(), topic, msgId), e); } else if (e.getCause() instanceof MQBrokerException - || e.getCause() instanceof RemotingConnectException) { + || e.getCause() instanceof RemotingConnectException) { if (e.getCause() instanceof MQBrokerException) { MQBrokerException brokerException = (MQBrokerException) e.getCause(); return new ConnectorRuntimeException( - String.format("Received a broker exception, Topic=%s, msgId=%s, %s", - topic, msgId, brokerException.getErrorMessage()), e); + String.format("Received a broker exception, Topic=%s, msgId=%s, %s", + topic, msgId, brokerException.getErrorMessage()), e); } if (e.getCause() instanceof RemotingConnectException) { RemotingConnectException connectException = - (RemotingConnectException) e.getCause(); + (RemotingConnectException) e.getCause(); return new ConnectorRuntimeException( - String.format( - "Network connection experiences failures. Topic=%s, msgId=%s, %s", - topic, msgId, connectException.getMessage()), e); + String.format( + "Network connection experiences failures. Topic=%s, msgId=%s, %s", + topic, msgId, connectException.getMessage()), e); } } } else { @@ -126,12 +126,12 @@ ConnectorRuntimeException checkProducerException(String topic, String msgId, Thr MQClientException clientException = (MQClientException) e; if (-1 == clientException.getResponseCode()) { return new ConnectorRuntimeException( - String.format("Topic does not exist, Topic=%s, msgId=%s", - topic, msgId), e); + String.format("Topic does not exist, Topic=%s, msgId=%s", + topic, msgId), e); } else if (ResponseCode.MESSAGE_ILLEGAL == clientException.getResponseCode()) { return new RMQMessageFormatException( - String.format("A illegal message for RocketMQ, Topic=%s, msgId=%s", - topic, msgId), e); + String.format("A illegal message for RocketMQ, Topic=%s, msgId=%s", + topic, msgId), e); } } } @@ -142,16 +142,16 @@ protected void checkProducerServiceState(DefaultMQProducerImpl producer) { switch (producer.getServiceState()) { case CREATE_JUST: throw new ConnectorRuntimeException( - String.format("You do not have start the producer, %s", - producer.getServiceState())); + String.format("You do not have start the producer, %s", + producer.getServiceState())); case SHUTDOWN_ALREADY: throw new ConnectorRuntimeException( - String.format("Your producer has been shut down, %s", - producer.getServiceState())); + String.format("Your producer has been shut down, %s", + producer.getServiceState())); case START_FAILED: throw new ConnectorRuntimeException( - String.format("When you start your service throws an exception, %s", - producer.getServiceState())); + String.format("When you start your service throws an exception, %s", + producer.getServiceState())); case RUNNING: default: } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/ProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/ProducerImpl.java index fd4cecc710..7f868eddcd 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/ProducerImpl.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/ProducerImpl.java @@ -37,6 +37,7 @@ import org.apache.rocketmq.common.message.MessageConst; import org.apache.rocketmq.remoting.exception.RemotingException; +import java.util.Objects; import java.util.Properties; import io.cloudevents.CloudEvent; @@ -71,8 +72,8 @@ public void setExtFields() { public SendResult send(CloudEvent cloudEvent) { this.checkProducerServiceState(rocketmqProducer.getDefaultMQProducerImpl()); org.apache.rocketmq.common.message.Message msg = - RocketMQMessageFactory.createWriter(cloudEvent.getSubject()).writeBinary(cloudEvent); - msg = supplySysProp(msg, cloudEvent); + RocketMQMessageFactory.createWriter(Objects.requireNonNull(cloudEvent.getSubject())).writeBinary(cloudEvent); + supplySysProp(msg, cloudEvent); String messageId = null; try { org.apache.rocketmq.client.producer.SendResult sendResultRmq = this.rocketmqProducer.send(msg); @@ -91,8 +92,8 @@ public SendResult send(CloudEvent cloudEvent) { public void sendOneway(CloudEvent cloudEvent) { this.checkProducerServiceState(this.rocketmqProducer.getDefaultMQProducerImpl()); org.apache.rocketmq.common.message.Message msg = - RocketMQMessageFactory.createWriter(cloudEvent.getSubject()).writeBinary(cloudEvent); - msg = supplySysProp(msg, cloudEvent); + RocketMQMessageFactory.createWriter(Objects.requireNonNull(cloudEvent.getSubject())).writeBinary(cloudEvent); + supplySysProp(msg, cloudEvent); try { this.rocketmqProducer.sendOneway(msg); } catch (Exception e) { @@ -105,7 +106,7 @@ public void sendOneway(CloudEvent cloudEvent) { public void sendAsync(CloudEvent cloudEvent, SendCallback sendCallback) { this.checkProducerServiceState(this.rocketmqProducer.getDefaultMQProducerImpl()); org.apache.rocketmq.common.message.Message msg = - RocketMQMessageFactory.createWriter(cloudEvent.getSubject()).writeBinary(cloudEvent); + RocketMQMessageFactory.createWriter(Objects.requireNonNull(cloudEvent.getSubject())).writeBinary(cloudEvent); msg = supplySysProp(msg, cloudEvent); try { this.rocketmqProducer.send(msg, this.sendCallbackConvert(msg, sendCallback)); @@ -120,19 +121,19 @@ public void request(CloudEvent cloudEvent, RequestReplyCallback rrCallback, long this.checkProducerServiceState(this.rocketmqProducer.getDefaultMQProducerImpl()); org.apache.rocketmq.common.message.Message msg = - RocketMQMessageFactory.createWriter(cloudEvent.getSubject()).writeBinary(cloudEvent); + RocketMQMessageFactory.createWriter(Objects.requireNonNull(cloudEvent.getSubject())).writeBinary(cloudEvent); - msg = supplySysProp(msg, cloudEvent); + supplySysProp(msg, cloudEvent); rocketmqProducer.request(msg, rrCallbackConvert(msg, rrCallback), timeout); } - public boolean reply(final CloudEvent cloudEvent, final SendCallback sendCallback) { + public void reply(final CloudEvent cloudEvent, final SendCallback sendCallback) { this.checkProducerServiceState(this.rocketmqProducer.getDefaultMQProducerImpl()); org.apache.rocketmq.common.message.Message msg = - RocketMQMessageFactory.createWriter(cloudEvent.getSubject()).writeBinary(cloudEvent); + RocketMQMessageFactory.createWriter(Objects.requireNonNull(cloudEvent.getSubject())).writeBinary(cloudEvent); MessageAccessor.putProperty(msg, MessageConst.PROPERTY_MESSAGE_TYPE, MixAll.REPLY_MESSAGE_FLAG); - msg = supplySysProp(msg, cloudEvent); + supplySysProp(msg, cloudEvent); try { this.rocketmqProducer.send(msg, this.sendCallbackConvert(msg, sendCallback)); @@ -140,15 +141,14 @@ public boolean reply(final CloudEvent cloudEvent, final SendCallback sendCallbac log.error(String.format("Send message async Exception, %s", msg), e); throw this.checkProducerException(msg.getTopic(), MessageClientIDSetter.getUniqID(msg), e); } - return true; } private Message supplySysProp(Message msg, CloudEvent cloudEvent) { for (String sysPropKey : MessageConst.STRING_HASH_SET) { String ceKey = sysPropKey.toLowerCase().replaceAll("_", Constants.MESSAGE_PROP_SEPARATOR); - if (cloudEvent.getExtension(ceKey) != null && StringUtils.isNotEmpty(cloudEvent.getExtension(ceKey).toString())) { - MessageAccessor.putProperty(msg, sysPropKey, cloudEvent.getExtension(ceKey).toString()); + if (cloudEvent.getExtension(ceKey) != null && StringUtils.isNotEmpty(Objects.requireNonNull(cloudEvent.getExtension(ceKey)).toString())) { + MessageAccessor.putProperty(msg, sysPropKey, Objects.requireNonNull(cloudEvent.getExtension(ceKey)).toString()); msg.getProperties().remove(ceKey); } } @@ -187,24 +187,22 @@ public void onException(Throwable e) { private org.apache.rocketmq.client.producer.SendCallback sendCallbackConvert(final Message message, final SendCallback sendCallback) { - org.apache.rocketmq.client.producer.SendCallback rmqSendCallback = - new org.apache.rocketmq.client.producer.SendCallback() { - @Override - public void onSuccess(org.apache.rocketmq.client.producer.SendResult sendResult) { - sendCallback.onSuccess(CloudEventUtils.convertSendResult(sendResult)); - } + return new org.apache.rocketmq.client.producer.SendCallback() { + @Override + public void onSuccess(org.apache.rocketmq.client.producer.SendResult sendResult) { + sendCallback.onSuccess(CloudEventUtils.convertSendResult(sendResult)); + } - @Override - public void onException(Throwable e) { - String topic = message.getTopic(); - ConnectorRuntimeException onsEx = ProducerImpl.this.checkProducerException(topic, null, e); - OnExceptionContext context = new OnExceptionContext(); - context.setTopic(topic); - context.setException(onsEx); - sendCallback.onException(context); - } - }; - return rmqSendCallback; + @Override + public void onException(Throwable e) { + String topic = message.getTopic(); + ConnectorRuntimeException onsEx = ProducerImpl.this.checkProducerException(topic, null, e); + OnExceptionContext context = new OnExceptionContext(); + context.setTopic(topic); + context.setException(onsEx); + sendCallback.onException(context); + } + }; } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/RocketMQProducerImpl.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/RocketMQProducerImpl.java index 1dbca5926f..ca3761ad1a 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/RocketMQProducerImpl.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/producer/RocketMQProducerImpl.java @@ -21,6 +21,7 @@ import org.apache.eventmesh.api.SendCallback; import org.apache.eventmesh.api.producer.Producer; import org.apache.eventmesh.common.Constants; +import org.apache.eventmesh.common.config.Config; import org.apache.eventmesh.connector.rocketmq.common.EventMeshConstants; import org.apache.eventmesh.connector.rocketmq.config.ClientConfiguration; @@ -36,14 +37,15 @@ @Slf4j @SuppressWarnings("deprecation") +@Config(field = "clientConfiguration") public class RocketMQProducerImpl implements Producer { private ProducerImpl producer; + private ClientConfiguration clientConfiguration; + @Override public synchronized void init(Properties keyValue) { - final ClientConfiguration clientConfiguration = new ClientConfiguration(); - clientConfiguration.init(); String producerGroup = keyValue.getProperty(Constants.PRODUCER_GROUP); String omsNamesrv = clientConfiguration.namesrvAddr; @@ -114,4 +116,8 @@ public void setExtFields() { public void sendOneway(CloudEvent message) { producer.sendOneway(message); } + + public ClientConfiguration getClientConfiguration() { + return clientConfiguration; + } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/BeanUtils.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/BeanUtils.java index ee9644502c..443ba8d1e7 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/BeanUtils.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/BeanUtils.java @@ -25,6 +25,7 @@ import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; +import java.util.Objects; import java.util.Properties; import java.util.Set; @@ -35,7 +36,7 @@ public final class BeanUtils { /** * Maps primitive {@code Class}es to their corresponding wrapper {@code Class}. */ - private static Map, Class> primitiveWrapperMap = new HashMap<>(); + private static final Map, Class> primitiveWrapperMap = new HashMap<>(); static { primitiveWrapperMap.put(Boolean.TYPE, Boolean.class); @@ -49,15 +50,14 @@ public final class BeanUtils { primitiveWrapperMap.put(Void.TYPE, Void.TYPE); } - private static Map, Class> wrapperMap = new HashMap<>(); + private static final Map, Class> wrapperMap = new HashMap<>(); static { - for (final Class primitiveClass : primitiveWrapperMap.keySet()) { - final Class wrapperClass = primitiveWrapperMap.get(primitiveClass); - if (!primitiveClass.equals(wrapperClass)) { + primitiveWrapperMap.forEach((primitiveClass, wrapperClass) -> { + if (!Objects.equals(wrapperClass, primitiveClass)) { wrapperMap.put(wrapperClass, primitiveClass); } - } + }); wrapperMap.put(String.class, String.class); } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/CloudEventUtils.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/CloudEventUtils.java index dbf1175e9c..c3e84bb6be 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/CloudEventUtils.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/utils/CloudEventUtils.java @@ -26,13 +26,19 @@ import org.apache.rocketmq.common.message.MessageConst; import org.apache.rocketmq.common.message.MessageExt; -import java.util.Map; -import java.util.Set; +import java.util.Objects; +import java.util.function.BiConsumer; +import java.util.function.Function; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class CloudEventUtils { + public static SendResult convertSendResult( - org.apache.rocketmq.client.producer.SendResult rmqResult) { + org.apache.rocketmq.client.producer.SendResult rmqResult) { SendResult sendResult = new SendResult(); sendResult.setTopic(rmqResult.getMessageQueue().getTopic()); sendResult.setMessageId(rmqResult.getMsgId()); @@ -42,53 +48,39 @@ public static SendResult convertSendResult( public static Message msgConvert(MessageExt rmqMsg) { Message message = new Message(); - if (rmqMsg.getTopic() != null) { - message.setTopic(rmqMsg.getTopic()); - } - - if (rmqMsg.getKeys() != null) { - message.setKeys(rmqMsg.getKeys()); - } - - if (rmqMsg.getTags() != null) { - message.setTags(rmqMsg.getTags()); - } - + initProperty(rmqMsg, message, MessageExt::getTopic, Message::setTopic); + initProperty(rmqMsg, message, MessageExt::getKeys, Message::setKeys); + initProperty(rmqMsg, message, MessageExt::getTags, Message::setTags); if (rmqMsg.getBody() != null) { message.setBody(rmqMsg.getBody()); } - - final Set> entries = rmqMsg.getProperties().entrySet(); - - for (final Map.Entry entry : entries) { - MessageAccessor.putProperty(message, entry.getKey(), entry.getValue()); - } + rmqMsg.getProperties().forEach((k, v) -> MessageAccessor.putProperty(message, k, v)); if (rmqMsg.getMsgId() != null) { MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_MESSAGE_ID), - rmqMsg.getMsgId()); + rmqMsg.getMsgId()); } if (rmqMsg.getTopic() != null) { MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_DESTINATION), - rmqMsg.getTopic()); + rmqMsg.getTopic()); } // MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_BORN_HOST), - String.valueOf(rmqMsg.getBornHost())); + String.valueOf(rmqMsg.getBornHost())); MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_BORN_TIMESTAMP), - String.valueOf(rmqMsg.getBornTimestamp())); + String.valueOf(rmqMsg.getBornTimestamp())); MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_STORE_HOST), - String.valueOf(rmqMsg.getStoreHost())); + String.valueOf(rmqMsg.getStoreHost())); MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_STORE_TIMESTAMP), - String.valueOf(rmqMsg.getStoreTimestamp())); + String.valueOf(rmqMsg.getStoreTimestamp())); //use in manual ack MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_QUEUE_ID), - String.valueOf(rmqMsg.getQueueId())); + String.valueOf(rmqMsg.getQueueId())); MessageAccessor.putProperty(message, buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_QUEUE_OFFSET), - String.valueOf(rmqMsg.getQueueOffset())); + String.valueOf(rmqMsg.getQueueOffset())); for (String sysPropKey : MessageConst.STRING_HASH_SET) { if (StringUtils.isNotEmpty(message.getProperty(sysPropKey))) { @@ -110,15 +102,10 @@ private static String buildCloudEventPropertyKey(String propName) { public static org.apache.rocketmq.common.message.MessageExt msgConvertExt(Message message) { org.apache.rocketmq.common.message.MessageExt rmqMessageExt = - new org.apache.rocketmq.common.message.MessageExt(); + new org.apache.rocketmq.common.message.MessageExt(); try { - if (message.getKeys() != null) { - rmqMessageExt.setKeys(message.getKeys()); - } - if (message.getTags() != null) { - rmqMessageExt.setTags(message.getTags()); - } - + initProperty(message, rmqMessageExt, Message::getKeys, Message::setKeys); + initProperty(message, rmqMessageExt, Message::getTags, Message::setTags); if (message.getBody() != null) { rmqMessageExt.setBody(message.getBody()); @@ -129,22 +116,39 @@ public static org.apache.rocketmq.common.message.MessageExt msgConvertExt(Messag rmqMessageExt.setTopic(message.getTopic()); int queueId = - Integer.parseInt(message.getProperty(buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_QUEUE_ID))); + Integer.parseInt(message.getProperty(buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_QUEUE_ID))); long queueOffset = Long.parseLong( - message.getProperty(buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_QUEUE_OFFSET))); + message.getProperty(buildCloudEventPropertyKey(Constants.PROPERTY_MESSAGE_QUEUE_OFFSET))); //use in manual ack rmqMessageExt.setQueueId(queueId); rmqMessageExt.setQueueOffset(queueOffset); - Map properties = message.getProperties(); - for (final Map.Entry entry : properties.entrySet()) { - MessageAccessor.putProperty(rmqMessageExt, entry.getKey(), entry.getValue()); - } + + message.getProperties().forEach((k, v) -> MessageAccessor.putProperty(rmqMessageExt, k, v)); } catch (Exception e) { + log.error("Error with msgConvertExt", e); e.printStackTrace(); } return rmqMessageExt; } + /** + * Populate the target with properties whose source is not empty + * + * @param source source + * @param target target + * @param function function + * @param biConsumer biConsumer + * @param t + * @param v + */ + private static void initProperty(T source, V target, Function function, BiConsumer biConsumer) { + String apply = function.apply(source); + if (Objects.nonNull(apply)) { + biConsumer.accept(target, apply); + } + + } + } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java index 1fe8dc3172..0b00b4fe21 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java @@ -17,6 +17,8 @@ package org.apache.rocketmq.client.impl.consumer; +import org.apache.eventmesh.common.EventMeshThreadFactory; +import org.apache.eventmesh.common.utils.ThreadUtils; import org.apache.eventmesh.connector.rocketmq.patch.EventMeshConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; @@ -28,7 +30,6 @@ import org.apache.rocketmq.client.log.ClientLogger; import org.apache.rocketmq.client.stat.ConsumerStatsManager; import org.apache.rocketmq.common.MixAll; -import org.apache.rocketmq.common.ThreadFactoryImpl; import org.apache.rocketmq.common.message.MessageAccessor; import org.apache.rocketmq.common.message.MessageConst; import org.apache.rocketmq.common.message.MessageExt; @@ -41,9 +42,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; -import java.util.Iterator; import java.util.List; -import java.util.Map; +import java.util.Objects; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; @@ -75,35 +75,30 @@ public ConsumeMessageConcurrentlyService(DefaultMQPushConsumerImpl defaultMQPush this.defaultMQPushConsumer = this.defaultMQPushConsumerImpl.getDefaultMQPushConsumer(); this.consumerGroup = this.defaultMQPushConsumer.getConsumerGroup(); - this.consumeRequestQueue = new LinkedBlockingQueue(); + this.consumeRequestQueue = new LinkedBlockingQueue<>(); this.consumeExecutor = new ThreadPoolExecutor( - this.defaultMQPushConsumer.getConsumeThreadMin(), - this.defaultMQPushConsumer.getConsumeThreadMax(), - 1000 * 60, - TimeUnit.MILLISECONDS, - this.consumeRequestQueue, - new ThreadFactoryImpl("ConsumeMessageThread_" + consumerGroup + "_")); + this.defaultMQPushConsumer.getConsumeThreadMin(), + this.defaultMQPushConsumer.getConsumeThreadMax(), + 1000 * 60, + TimeUnit.MILLISECONDS, + this.consumeRequestQueue, + new EventMeshThreadFactory("ConsumeMessageThread_" + consumerGroup + "_")); - this.scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryImpl("ConsumeMessageScheduledThread_")); - this.cleanExpireMsgExecutors = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryImpl("CleanExpireMsgScheduledThread_")); + this.scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(new EventMeshThreadFactory("ConsumeMessageScheduledThread_")); + this.cleanExpireMsgExecutors = Executors.newSingleThreadScheduledExecutor(new EventMeshThreadFactory("CleanExpireMsgScheduledThread_")); log.info("new ConsumeMessageConcurrentlyService instance for eventMesh has been created "); } public void start() { if (this.defaultMQPushConsumer.getConsumeTimeout() > 0) { - this.cleanExpireMsgExecutors.scheduleAtFixedRate(new Runnable() { - - @Override - public void run() { - try { - cleanExpireMsg(); - } catch (Exception e) { - log.warn("cleanExpireMsg ", e); - } + this.cleanExpireMsgExecutors.scheduleAtFixedRate(() -> { + try { + cleanExpireMsg(); + } catch (Exception e) { + log.warn("cleanExpireMsg ", e); } - }, this.defaultMQPushConsumer.getConsumeTimeout(), this.defaultMQPushConsumer.getConsumeTimeout(), TimeUnit.MINUTES); } } @@ -126,17 +121,19 @@ public ThreadPoolExecutor getConsumeExecutor() { @Override public void updateCorePoolSize(int corePoolSize) { if (corePoolSize > 0 - && corePoolSize <= Short.MAX_VALUE - && corePoolSize < this.defaultMQPushConsumer.getConsumeThreadMax()) { + && corePoolSize <= Short.MAX_VALUE + && corePoolSize < this.defaultMQPushConsumer.getConsumeThreadMax()) { this.consumeExecutor.setCorePoolSize(corePoolSize); } } @Override - public void incCorePoolSize() { } + public void incCorePoolSize() { + } @Override - public void decCorePoolSize() { } + public void decCorePoolSize() { + } @Override public int getCorePoolSize() { @@ -185,10 +182,10 @@ public ConsumeMessageDirectlyResult consumeMessageDirectly(MessageExt msg, Strin result.setRemark(RemotingHelper.exceptionSimpleDesc(e)); log.warn(String.format("consumeMessageDirectly exception: %s Group: %s Msgs: %s MQ: %s", - RemotingHelper.exceptionSimpleDesc(e), - ConsumeMessageConcurrentlyService.this.consumerGroup, - msgs, - mq), e); + RemotingHelper.exceptionSimpleDesc(e), + ConsumeMessageConcurrentlyService.this.consumerGroup, + msgs, + mq), e); } result.setSpentTimeMills(System.currentTimeMillis() - beginTime); @@ -200,10 +197,10 @@ public ConsumeMessageDirectlyResult consumeMessageDirectly(MessageExt msg, Strin @Override public void submitConsumeRequest( - final List msgs, - final ProcessQueue processQueue, - final MessageQueue messageQueue, - final boolean dispatchToConsume) { + final List msgs, + final ProcessQueue processQueue, + final MessageQueue messageQueue, + final boolean dispatchToConsume) { final int consumeBatchSize = this.defaultMQPushConsumer.getConsumeMessageBatchMaxSize(); if (msgs.size() <= consumeBatchSize) { ConsumeRequest consumeRequest = new ConsumeRequest(msgs, processQueue, messageQueue); @@ -214,7 +211,7 @@ public void submitConsumeRequest( } } else { for (int total = 0; total < msgs.size(); ) { - List msgThis = new ArrayList(consumeBatchSize); + List msgThis = new ArrayList<>(consumeBatchSize); for (int i = 0; i < consumeBatchSize; i++, total++) { if (total < msgs.size()) { msgThis.add(msgs.get(total)); @@ -248,19 +245,15 @@ public void resetRetryTopic(final List msgs) { } private void cleanExpireMsg() { - Iterator> it = - this.defaultMQPushConsumerImpl.getRebalanceImpl().getProcessQueueTable().entrySet().iterator(); - while (it.hasNext()) { - Map.Entry next = it.next(); - ProcessQueue pq = next.getValue(); + this.defaultMQPushConsumerImpl.getRebalanceImpl().getProcessQueueTable().forEach((k, pq) -> { pq.cleanExpiredMsg(this.defaultMQPushConsumer); - } + }); } public void processConsumeResult( - final ConsumeConcurrentlyStatus status, - final EventMeshConsumeConcurrentlyContext context, - final ConsumeRequest consumeRequest) { + final ConsumeConcurrentlyStatus status, + final EventMeshConsumeConcurrentlyContext context, + final ConsumeRequest consumeRequest) { int ackIndex = context.getAckIndex(); if (consumeRequest.getMsgs().isEmpty()) { @@ -280,7 +273,7 @@ public void processConsumeResult( case RECONSUME_LATER: ackIndex = -1; this.getConsumerStatsManager().incConsumeFailedTPS(consumerGroup, consumeRequest.getMessageQueue().getTopic(), - consumeRequest.getMsgs().size()); + consumeRequest.getMsgs().size()); break; default: break; @@ -343,56 +336,43 @@ public boolean sendMessageBack(final MessageExt msg, final ConsumeConcurrentlyCo this.defaultMQPushConsumerImpl.sendMessageBack(msg, delayLevel, context.getMessageQueue().getBrokerName()); return true; } catch (Exception e) { - log.error("sendMessageBack exception, group: " + this.consumerGroup + " msg: " + msg.toString(), e); + log.error("sendMessageBack exception, group: {}" + " msg: {}", this.consumerGroup, msg, e); } return false; } private void submitConsumeRequestLater( - final List msgs, - final ProcessQueue processQueue, - final MessageQueue messageQueue + final List msgs, + final ProcessQueue processQueue, + final MessageQueue messageQueue ) { - this.scheduledExecutorService.schedule(new Runnable() { - - @Override - public void run() { - ConsumeMessageConcurrentlyService.this.submitConsumeRequest(msgs, processQueue, messageQueue, true); - } - }, 5000, TimeUnit.MILLISECONDS); + this.scheduledExecutorService.schedule( + () -> ConsumeMessageConcurrentlyService.this.submitConsumeRequest(msgs, processQueue, messageQueue, true), 5000, TimeUnit.MILLISECONDS); } private void submitConsumeRequestLater(final ConsumeRequest consumeRequest) { final int times = defaultMQPushConsumerImpl.getDefaultMQPushConsumer().getMaxReconsumeTimes(); log.warn("rejected by thread pool, try resubmit {} times, consumerGroup:{}", times, - defaultMQPushConsumerImpl.getDefaultMQPushConsumer().getConsumerGroup()); - this.scheduledExecutorService.schedule(new Runnable() { - - @Override - public void run() { - boolean success = false; - for (int i = 0; i < times; i++) { - try { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - //ignore - } - ConsumeMessageConcurrentlyService.this.consumeExecutor.submit(consumeRequest); - success = true; - break; - } catch (RejectedExecutionException e) { - //ignore - } + defaultMQPushConsumerImpl.getDefaultMQPushConsumer().getConsumerGroup()); + this.scheduledExecutorService.schedule(() -> { + boolean success = false; + for (int i = 0; i < times; i++) { + try { + ThreadUtils.sleep(1, TimeUnit.SECONDS); + ConsumeMessageConcurrentlyService.this.consumeExecutor.submit(consumeRequest); + success = true; + break; + } catch (RejectedExecutionException e) { + //ignore } - if (!success) { - for (MessageExt messageExt : consumeRequest.getMsgs()) { - log.warn("discard rejected messages {} after retry {} times", messageExt, times); - } - consumeRequest.getProcessQueue().removeMessage(consumeRequest.getMsgs()); + } + if (!success) { + for (MessageExt messageExt : consumeRequest.getMsgs()) { + log.warn("discard rejected messages {} after retry {} times", messageExt, times); } + consumeRequest.getProcessQueue().removeMessage(consumeRequest.getMsgs()); } }, 1000, TimeUnit.MILLISECONDS); } @@ -420,11 +400,10 @@ public ProcessQueue getProcessQueue() { public void run() { if (this.processQueue.isDropped()) { log.info("the message queue not be able to consume, because it's dropped. group={} {}", - ConsumeMessageConcurrentlyService.this.consumerGroup, this.messageQueue); + ConsumeMessageConcurrentlyService.this.consumerGroup, this.messageQueue); return; } - MessageListenerConcurrently listener = ConsumeMessageConcurrentlyService.this.messageListener; EventMeshConsumeConcurrentlyContext context = new EventMeshConsumeConcurrentlyContext(messageQueue, processQueue); ConsumeConcurrentlyStatus status = null; @@ -432,7 +411,7 @@ public void run() { if (ConsumeMessageConcurrentlyService.this.defaultMQPushConsumerImpl.hasHook()) { consumeMessageContext = new ConsumeMessageContext(); consumeMessageContext.setConsumerGroup(defaultMQPushConsumer.getConsumerGroup()); - consumeMessageContext.setProps(new HashMap()); + consumeMessageContext.setProps(new HashMap<>()); consumeMessageContext.setMq(messageQueue); consumeMessageContext.setMsgList(msgs); consumeMessageContext.setSuccess(false); @@ -444,20 +423,20 @@ public void run() { ConsumeReturnType returnType = ConsumeReturnType.SUCCESS; try { ConsumeMessageConcurrentlyService.this.resetRetryTopic(msgs); - if (msgs != null && !msgs.isEmpty()) { + if (!msgs.isEmpty()) { for (MessageExt msg : msgs) { MessageAccessor.setConsumeStartTimeStamp(msg, String.valueOf(System.currentTimeMillis())); } } - status = listener.consumeMessage(Collections.unmodifiableList(msgs), context); + status = ConsumeMessageConcurrentlyService.this.messageListener.consumeMessage(Collections.unmodifiableList(msgs), context); } catch (Throwable e) { log.warn("consumeMessage exception: {} Group: {} Msgs: {} MQ: {}", - RemotingHelper.exceptionSimpleDesc(e), - ConsumeMessageConcurrentlyService.this.consumerGroup, - msgs, - messageQueue); + RemotingHelper.exceptionSimpleDesc(e), + ConsumeMessageConcurrentlyService.this.consumerGroup, + msgs, + messageQueue); hasException = true; } long consumeRT = System.currentTimeMillis() - beginTimestamp; @@ -471,30 +450,28 @@ public void run() { returnType = ConsumeReturnType.TIME_OUT; } else if (ConsumeConcurrentlyStatus.RECONSUME_LATER == status) { returnType = ConsumeReturnType.FAILED; - } else if (ConsumeConcurrentlyStatus.CONSUME_SUCCESS == status) { - returnType = ConsumeReturnType.SUCCESS; } if (ConsumeMessageConcurrentlyService.this.defaultMQPushConsumerImpl.hasHook()) { - consumeMessageContext.getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name()); + Objects.requireNonNull(consumeMessageContext).getProps().put(MixAll.CONSUME_CONTEXT_TYPE, returnType.name()); } if (null == status) { log.warn("consumeMessage return null, Group: {} Msgs: {} MQ: {}", - ConsumeMessageConcurrentlyService.this.consumerGroup, - msgs, - messageQueue); + ConsumeMessageConcurrentlyService.this.consumerGroup, + msgs, + messageQueue); status = ConsumeConcurrentlyStatus.RECONSUME_LATER; } if (ConsumeMessageConcurrentlyService.this.defaultMQPushConsumerImpl.hasHook()) { - consumeMessageContext.setStatus(status.toString()); + Objects.requireNonNull(consumeMessageContext).setStatus(status.toString()); consumeMessageContext.setSuccess(ConsumeConcurrentlyStatus.CONSUME_SUCCESS == status); ConsumeMessageConcurrentlyService.this.defaultMQPushConsumerImpl.executeHookAfter(consumeMessageContext); } ConsumeMessageConcurrentlyService.this.getConsumerStatsManager() - .incConsumeRT(ConsumeMessageConcurrentlyService.this.consumerGroup, messageQueue.getTopic(), consumeRT); + .incConsumeRT(ConsumeMessageConcurrentlyService.this.consumerGroup, messageQueue.getTopic(), consumeRT); ConsumeMessageConcurrentlyService.this.processConsumeResult(status, context, this); } @@ -504,4 +481,4 @@ public MessageQueue getMessageQueue() { } } -} \ No newline at end of file +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.admin.Admin b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.admin.Admin new file mode 100644 index 0000000000..c76b692524 --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.admin.Admin @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +rocketmq=org.apache.eventmesh.connector.rocketmq.admin.RocketMQAdminAdaptor \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfigurationTest.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfigurationTest.java new file mode 100644 index 0000000000..e2a4eba287 --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/eventmesh/connector/rocketmq/config/ClientConfigurationTest.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.eventmesh.connector.rocketmq.config; + +import org.apache.eventmesh.api.factory.ConnectorPluginFactory; +import org.apache.eventmesh.connector.rocketmq.consumer.RocketMQConsumerImpl; +import org.apache.eventmesh.connector.rocketmq.producer.RocketMQProducerImpl; + +import org.junit.Assert; +import org.junit.Test; + +public class ClientConfigurationTest { + + @Test + public void getConfigWhenRocketMQConsumerInit() { + RocketMQConsumerImpl consumer = + (RocketMQConsumerImpl) ConnectorPluginFactory.getMeshMQPushConsumer("rocketmq"); + + ClientConfiguration config = consumer.getClientConfiguration(); + assertConfig(config); + } + + @Test + public void getConfigWhenRocketMQProducerInit() { + RocketMQProducerImpl producer = + (RocketMQProducerImpl) ConnectorPluginFactory.getMeshMQProducer("rocketmq"); + + ClientConfiguration config = producer.getClientConfiguration(); + assertConfig(config); + } + + private void assertConfig(ClientConfiguration config) { + Assert.assertEquals(config.namesrvAddr, "127.0.0.1:9876;127.0.0.1:9876"); + Assert.assertEquals(config.clientUserName, "username-succeed!!!"); + Assert.assertEquals(config.clientPass, "password-succeed!!!"); + Assert.assertEquals(config.consumeThreadMin, Integer.valueOf(1816)); + Assert.assertEquals(config.consumeThreadMax, Integer.valueOf(2816)); + Assert.assertEquals(config.consumeQueueSize, Integer.valueOf(3816)); + Assert.assertEquals(config.pullBatchSize, Integer.valueOf(4816)); + Assert.assertEquals(config.ackWindow, Integer.valueOf(5816)); + Assert.assertEquals(config.pubWindow, Integer.valueOf(6816)); + Assert.assertEquals(config.consumeTimeout, 7816); + Assert.assertEquals(config.pollNameServerInterval, Integer.valueOf(8816)); + Assert.assertEquals(config.heartbeatBrokerInterval, Integer.valueOf(9816)); + Assert.assertEquals(config.rebalanceInterval, Integer.valueOf(11816)); + Assert.assertEquals(config.clusterName, "cluster-succeed!!!"); + Assert.assertEquals(config.accessKey, "accessKey-succeed!!!"); + Assert.assertEquals(config.secretKey, "secretKey-succeed!!!"); + } +} \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/consumer/PushConsumerImplTest.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/consumer/PushConsumerImplTest.java index 683183bc21..104ef58b5a 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/consumer/PushConsumerImplTest.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/consumer/PushConsumerImplTest.java @@ -17,10 +17,6 @@ package org.apache.rocketmq.consumer; -import static org.assertj.core.api.Assertions.assertThat; - -import org.apache.eventmesh.api.EventListener; -import org.apache.eventmesh.api.EventMeshAction; import org.apache.eventmesh.connector.rocketmq.consumer.PushConsumerImpl; import org.apache.eventmesh.connector.rocketmq.domain.NonStandardKeys; @@ -40,8 +36,6 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import io.cloudevents.CloudEvent; - @RunWith(MockitoJUnitRunner.class) public class PushConsumerImplTest { private PushConsumerImpl consumer; @@ -82,7 +76,7 @@ public void after() throws Exception { @Test public void testConsumeMessage() { - final byte[] testBody = new byte[]{'a', 'b'}; + final byte[] testBody = new byte[] {'a', 'b'}; MessageExt consumedMsg = new MessageExt(); consumedMsg.setMsgId("NewMsgId"); @@ -91,7 +85,7 @@ public void testConsumeMessage() { consumedMsg.setTopic("HELLO_QUEUE"); consumer.subscribe("HELLO_QUEUE", "*"); ((MessageListenerConcurrently) rocketmqPushConsumer - .getMessageListener()).consumeMessage(Collections.singletonList(consumedMsg), null); + .getMessageListener()).consumeMessage(Collections.singletonList(consumedMsg), null); } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/resources/rocketmq-client.properties b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/resources/rocketmq-client.properties index 1261f30e2c..e9e78992d0 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/resources/rocketmq-client.properties +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/resources/rocketmq-client.properties @@ -16,3 +16,18 @@ # #######################rocketmq-client################## eventMesh.server.rocketmq.namesrvAddr=127.0.0.1:9876;127.0.0.1:9876 +eventMesh.server.rocketmq.username=username-succeed!!! +eventMesh.server.rocketmq.password=password-succeed!!! +eventMesh.server.rocketmq.client.consumeThreadMin=1816 +eventMesh.server.rocketmq.client.consumeThreadMax=2816 +eventMesh.server.rocketmq.client.consumeThreadPoolQueueSize=3816 +eventMesh.server.rocketmq.client.pullBatchSize=4816 +eventMesh.server.rocketmq.client.ackwindow=5816 +eventMesh.server.rocketmq.client.pubwindow=6816 +eventMesh.server.rocketmq.client.comsumeTimeoutInMin=7816 +eventMesh.server.rocketmq.client.pollNameServerInterval=8816 +eventMesh.server.rocketmq.client.heartbeatBrokerInterval=9816 +eventMesh.server.rocketmq.client.rebalanceInterval=11816 +eventMesh.server.rocketmq.cluster=cluster-succeed!!! +eventMesh.server.rocketmq.accessKey=accessKey-succeed!!! +eventMesh.server.rocketmq.secretKey=secretKey-succeed!!! \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-standalone/build.gradle index c178f455a1..9521925797 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/build.gradle +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/build.gradle @@ -18,4 +18,7 @@ dependencies { implementation project(":eventmesh-common") implementation project(":eventmesh-connector-plugin:eventmesh-connector-api") -} \ No newline at end of file + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/gradle.properties b/eventmesh-connector-plugin/eventmesh-connector-standalone/gradle.properties index 9499e382cb..d2e986bcd9 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/gradle.properties +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/gradle.properties @@ -13,6 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. # - pluginType=connector pluginName=standalone \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/admin/StandaloneAdmin.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/admin/StandaloneAdmin.java new file mode 100644 index 0000000000..6daaf8e639 --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/admin/StandaloneAdmin.java @@ -0,0 +1,120 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.eventmesh.connector.standalone.admin; + +import org.apache.eventmesh.api.admin.Admin; +import org.apache.eventmesh.api.admin.TopicProperties; +import org.apache.eventmesh.connector.standalone.broker.MessageQueue; +import org.apache.eventmesh.connector.standalone.broker.StandaloneBroker; +import org.apache.eventmesh.connector.standalone.broker.model.TopicMetadata; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicBoolean; + +import io.cloudevents.CloudEvent; + +public class StandaloneAdmin implements Admin { + private final AtomicBoolean isStarted; + + private final StandaloneBroker standaloneBroker; + + public StandaloneAdmin(Properties properties) { + this.standaloneBroker = StandaloneBroker.getInstance(); + this.isStarted = new AtomicBoolean(false); + } + + @Override + public boolean isStarted() { + return isStarted.get(); + } + + @Override + public boolean isClosed() { + return !isStarted.get(); + } + + @Override + public void start() { + isStarted.compareAndSet(false, true); + } + + @Override + public void shutdown() { + isStarted.compareAndSet(true, false); + } + + @Override + public void init(Properties keyValue) throws Exception { + } + + @Override + public List getTopic() throws Exception { + ConcurrentHashMap messageContainer = this.standaloneBroker.getMessageContainer(); + List topicList = new ArrayList<>(); + for (TopicMetadata topicMetadata : messageContainer.keySet()) { + MessageQueue messageQueue = messageContainer.get(topicMetadata); + topicList.add(new TopicProperties( + topicMetadata.getTopicName(), + messageQueue.getPutIndex() - messageQueue.getTakeIndex() + )); + } + topicList.sort(Comparator.comparing(t -> t.name)); + return topicList; + } + + @Override + public void createTopic(String topicName) { + standaloneBroker.createTopicIfAbsent(topicName); + } + + @Override + public void deleteTopic(String topicName) { + standaloneBroker.deleteTopicIfExist(topicName); + } + + @Override + public List getEvent(String topicName, int offset, int length) throws Exception { + if (!this.standaloneBroker.checkTopicExist(topicName)) { + throw new Exception("The topic name doesn't exist in the message queue"); + } + ConcurrentHashMap messageContainer = this.standaloneBroker.getMessageContainer(); + long topicOffset = messageContainer.get(new TopicMetadata(topicName)).getTakeIndex(); + + List messageList = new ArrayList<>(); + for (int index = 0; index < length; index++) { + long messageOffset = topicOffset + offset + index; + CloudEvent event = this.standaloneBroker.getMessage(topicName, messageOffset); + if (event == null) { + break; + } + messageList.add(event); + } + return messageList; + } + + @Override + public void publish(CloudEvent cloudEvent) throws Exception { + this.standaloneBroker.putMessage(cloudEvent.getSubject(), cloudEvent); + } +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/admin/StandaloneAdminAdaptor.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/admin/StandaloneAdminAdaptor.java new file mode 100644 index 0000000000..f3dfdd4f8a --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/admin/StandaloneAdminAdaptor.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.eventmesh.connector.standalone.admin; + +import org.apache.eventmesh.api.admin.Admin; +import org.apache.eventmesh.api.admin.TopicProperties; + +import java.util.List; +import java.util.Properties; + +import io.cloudevents.CloudEvent; + +public class StandaloneAdminAdaptor implements Admin { + + private StandaloneAdmin admin; + + public StandaloneAdminAdaptor() { + } + + @Override + public boolean isStarted() { + return admin.isStarted(); + } + + @Override + public boolean isClosed() { + return admin.isClosed(); + } + + @Override + public void start() { + admin.start(); + } + + @Override + public void shutdown() { + admin.shutdown(); + } + + @Override + public void init(Properties keyValue) throws Exception { + admin = new StandaloneAdmin(keyValue); + } + + @Override + public List getTopic() throws Exception { + return admin.getTopic(); + } + + @Override + public void createTopic(String topicName) throws Exception { + admin.createTopic(topicName); + } + + @Override + public void deleteTopic(String topicName) throws Exception { + admin.deleteTopic(topicName); + } + + @Override + public List getEvent(String topicName, int offset, int length) throws Exception { + return admin.getEvent(topicName, offset, length); + } + + @Override + public void publish(CloudEvent cloudEvent) throws Exception { + admin.publish(cloudEvent); + } +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/MessageQueue.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/MessageQueue.java index ddac489d4d..ac21af14ec 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/MessageQueue.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/MessageQueue.java @@ -188,7 +188,7 @@ public void removeHead() { if (takeIndex == items.length) { takeIndex = 0; } - notFull.signal(); + notFull.signalAll(); } finally { lock.unlock(); } @@ -209,7 +209,7 @@ private void enqueue(MessageEntity messageEntity) { putIndex = 0; } count++; - notEmpty.signal(); + notEmpty.signalAll(); } private MessageEntity dequeue() { @@ -217,8 +217,15 @@ private MessageEntity dequeue() { if (takeIndex == items.length) { takeIndex = 0; } - notFull.signal(); + notFull.signalAll(); return item; } + public int getTakeIndex() { + return takeIndex; + } + + public int getPutIndex() { + return putIndex; + } } \ No newline at end of file diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBroker.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBroker.java index 2e715e35b5..677ac46dd3 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBroker.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBroker.java @@ -44,6 +44,14 @@ private StandaloneBroker() { startHistoryMessageCleanTask(); } + public ConcurrentHashMap getMessageContainer() { + return this.messageContainer; + } + + public ConcurrentHashMap getOffsetMap() { + return this.offsetMap; + } + public static StandaloneBroker getInstance() { return StandaloneBrokerInstanceHolder.instance; } @@ -61,7 +69,7 @@ public MessageEntity putMessage(String topicName, CloudEvent message) throws Int MessageQueue messageQueue = pair.getLeft(); MessageEntity messageEntity = new MessageEntity( - new TopicMetadata(topicName), message, topicOffset.getAndIncrement(), System.currentTimeMillis()); + new TopicMetadata(topicName), message, topicOffset.getAndIncrement(), System.currentTimeMillis()); messageQueue.put(messageEntity); return messageEntity; @@ -107,7 +115,6 @@ public CloudEvent getMessage(String topicName, long offset) { return messageEntity.getMessage(); } - private void startHistoryMessageCleanTask() { Thread thread = new Thread(new HistoryMessageClearTask(messageContainer)); thread.setDaemon(true); @@ -120,7 +127,7 @@ public boolean checkTopicExist(String topicName) { } /** - * if topic not exist, create a topic + * if the topic does not exist, create the topic * * @param topicName topicName * @return messageQueue and offset @@ -132,6 +139,16 @@ public Pair createTopicIfAbsent(String topicName) { return Pair.of(messageQueue, offset); } + /** + * if the topic exists, delete the topic + * + * @param topicName topicName + */ + public void deleteTopicIfExist(String topicName) { + TopicMetadata topicMetadata = new TopicMetadata(topicName); + messageContainer.remove(topicMetadata); + } + public void updateOffset(TopicMetadata topicMetadata, long offset) { offsetMap.computeIfPresent(topicMetadata, (k, v) -> { v.set(offset); diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/model/TopicMetadata.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/model/TopicMetadata.java index 9b6c673e3a..bf4a249a01 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/model/TopicMetadata.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/model/TopicMetadata.java @@ -31,6 +31,9 @@ public TopicMetadata(String topicName) { this.topicName = topicName; } + public String getTopicName() { + return this.topicName; + } @Override public boolean equals(Object o) { @@ -52,9 +55,9 @@ public int hashCode() { @Override public String toString() { return "TopicMetadata{" - + - "topic='" + topicName + '\'' - + - '}'; + + + "topic='" + topicName + '\'' + + + '}'; } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/HistoryMessageClearTask.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/HistoryMessageClearTask.java index 5499f331f2..9b1b33df58 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/HistoryMessageClearTask.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/HistoryMessageClearTask.java @@ -17,6 +17,7 @@ package org.apache.eventmesh.connector.standalone.broker.task; +import org.apache.eventmesh.common.utils.ThreadUtils; import org.apache.eventmesh.connector.standalone.broker.MessageQueue; import org.apache.eventmesh.connector.standalone.broker.model.MessageEntity; import org.apache.eventmesh.connector.standalone.broker.model.TopicMetadata; @@ -24,17 +25,15 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import lombok.extern.slf4j.Slf4j; /** * This task used to clear the history message, the element in message queue can only be cleaned by this task. */ +@Slf4j public class HistoryMessageClearTask implements Runnable { - - private final Logger logger = LoggerFactory.getLogger(HistoryMessageClearTask.class); - private final ConcurrentHashMap messageContainer; /** @@ -60,9 +59,9 @@ public void run() { } }); try { - Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + ThreadUtils.sleepWithThrowException(1, TimeUnit.SECONDS); } catch (InterruptedException e) { - logger.error("Thread is interrupted, thread name: {}", Thread.currentThread().getName(), e); + log.error("Thread is interrupted, thread name: {}", Thread.currentThread().getName(), e); Thread.currentThread().interrupt(); } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/SubScribeTask.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/SubScribeTask.java index 81f1e2bfc7..9e3715b68a 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/SubScribeTask.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/broker/task/SubScribeTask.java @@ -20,15 +20,18 @@ import org.apache.eventmesh.api.EventListener; import org.apache.eventmesh.api.EventMeshAction; import org.apache.eventmesh.api.EventMeshAsyncConsumeContext; +import org.apache.eventmesh.common.utils.ThreadUtils; import org.apache.eventmesh.connector.standalone.broker.StandaloneBroker; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import io.cloudevents.CloudEvent; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class SubScribeTask implements Runnable { private String topicName; @@ -38,8 +41,6 @@ public class SubScribeTask implements Runnable { private AtomicInteger offset; - private final Logger logger = LoggerFactory.getLogger(SubScribeTask.class); - public SubScribeTask(String topicName, StandaloneBroker standaloneBroker, EventListener listener) { @@ -53,12 +54,13 @@ public SubScribeTask(String topicName, public void run() { while (isRunning) { try { - logger.debug("execute subscribe task, topic: {}, offset: {}", topicName, offset); + log.debug("execute subscribe task, topic: {}, offset: {}", topicName, offset); if (offset == null) { CloudEvent message = standaloneBroker.getMessage(topicName); if (message != null) { - if (message.getExtension("offset") != null) { - offset = new AtomicInteger((int) message.getExtension("offset")); + Object tmpOffset = message.getExtension("offset"); + if (tmpOffset instanceof Integer) { + offset = new AtomicInteger(Integer.parseInt(tmpOffset.toString())); } else { offset = new AtomicInteger(0); } @@ -74,8 +76,8 @@ public void commit(EventMeshAction action) { switch (action) { case CommitMessage: // update offset - logger.info("message commit, topic: {}, current offset:{}", topicName, - offset.get()); + log.info("message commit, topic: {}, current offset:{}", topicName, + offset.get()); break; case ReconsumeLater: // don't update offset @@ -83,8 +85,8 @@ public void commit(EventMeshAction action) { case ManualAck: // update offset offset.incrementAndGet(); - logger - .info("message ack, topic: {}, current offset:{}", topicName, offset.get()); + log + .info("message ack, topic: {}, current offset:{}", topicName, offset.get()); break; default: @@ -96,14 +98,14 @@ public void commit(EventMeshAction action) { } } catch (Exception ex) { - logger.error("consumer error, topic: {}, offset: {}", topicName, offset == null ? null : offset.get(), - ex); + log.error("consumer error, topic: {}, offset: {}", topicName, offset == null ? null : offset.get(), + ex); } try { - Thread.sleep(1000); + ThreadUtils.sleepWithThrowException(1, TimeUnit.SECONDS); } catch (InterruptedException e) { - logger.error("Thread is interrupted, topic: {}, offset: {} thread name: {}", - topicName, offset == null ? null : offset.get(), Thread.currentThread().getName(), e); + log.error("Thread is interrupted, topic: {}, offset: {} thread name: {}", + topicName, offset == null ? null : offset.get(), Thread.currentThread().getName(), e); Thread.currentThread().interrupt(); } } @@ -113,4 +115,4 @@ public void shutdown() { isRunning = false; } -} \ No newline at end of file +} diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumer.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumer.java index f56fc2b20d..d6d24ffdf9 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumer.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumer.java @@ -26,6 +26,7 @@ import org.apache.eventmesh.connector.standalone.broker.task.SubScribeTask; import java.util.List; +import java.util.Objects; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -35,15 +36,15 @@ public class StandaloneConsumer implements Consumer { - private StandaloneBroker standaloneBroker; + private final StandaloneBroker standaloneBroker; private EventListener listener; - private AtomicBoolean isStarted; + private final AtomicBoolean isStarted; private final ConcurrentHashMap subscribeTaskTable; - private ExecutorService consumeExecutorService; + private final ExecutorService consumeExecutorService; public StandaloneConsumer(Properties properties) { this.standaloneBroker = StandaloneBroker.getInstance(); @@ -86,7 +87,7 @@ public void init(Properties keyValue) throws Exception { @Override public void updateOffset(List cloudEvents, AbstractContext context) { cloudEvents.forEach(cloudEvent -> standaloneBroker.updateOffset( - new TopicMetadata(cloudEvent.getSubject()), (Long) cloudEvent.getExtension("offset")) + new TopicMetadata(cloudEvent.getSubject()), Objects.requireNonNull((Long) cloudEvent.getExtension("offset"))) ); } diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumerAdaptor.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumerAdaptor.java index 79c5aadd5e..1fe3eb19b6 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumerAdaptor.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/consumer/StandaloneConsumerAdaptor.java @@ -24,9 +24,6 @@ import java.util.List; import java.util.Properties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import io.cloudevents.CloudEvent; public class StandaloneConsumerAdaptor implements Consumer { diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneProducer.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneProducer.java index c6aaf43a32..b09c8ba247 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneProducer.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneProducer.java @@ -28,16 +28,14 @@ import java.util.Properties; import java.util.concurrent.atomic.AtomicBoolean; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import io.cloudevents.CloudEvent; import com.google.common.base.Preconditions; -public class StandaloneProducer { +import lombok.extern.slf4j.Slf4j; - private Logger logger = LoggerFactory.getLogger(StandaloneProducer.class); +@Slf4j +public class StandaloneProducer { private StandaloneBroker standaloneBroker; @@ -77,9 +75,9 @@ public SendResult publish(CloudEvent cloudEvent) { sendResult.setMessageId(String.valueOf(messageEntity.getOffset())); return sendResult; } catch (Exception e) { - logger.error("send message error, topic: {}", cloudEvent.getSubject(), e); + log.error("send message error, topic: {}", cloudEvent.getSubject(), e); throw new ConnectorRuntimeException( - String.format("Send message error, topic: %s", cloudEvent.getSubject())); + String.format("Send message error, topic: %s", cloudEvent.getSubject())); } } @@ -92,10 +90,10 @@ public void publish(CloudEvent cloudEvent, SendCallback sendCallback) throws Exc sendCallback.onSuccess(sendResult); } catch (Exception ex) { OnExceptionContext onExceptionContext = OnExceptionContext.builder() - .messageId(cloudEvent.getId()) - .topic(cloudEvent.getSubject()) - .exception(new ConnectorRuntimeException(ex)) - .build(); + .messageId(cloudEvent.getId()) + .topic(cloudEvent.getSubject()) + .exception(new ConnectorRuntimeException(ex)) + .build(); sendCallback.onException(onExceptionContext); } } @@ -113,10 +111,10 @@ public void sendAsync(CloudEvent cloudEvent, SendCallback sendCallback) { sendCallback.onSuccess(sendResult); } catch (Exception ex) { OnExceptionContext onExceptionContext = OnExceptionContext.builder() - .messageId(cloudEvent.getId()) - .topic(cloudEvent.getSubject()) - .exception(new ConnectorRuntimeException(ex)) - .build(); + .messageId(cloudEvent.getId()) + .topic(cloudEvent.getSubject()) + .exception(new ConnectorRuntimeException(ex)) + .build(); sendCallback.onException(onExceptionContext); } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.admin.Admin b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.admin.Admin new file mode 100644 index 0000000000..2cfd20933a --- /dev/null +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/resources/META-INF/eventmesh/org.apache.eventmesh.api.admin.Admin @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +standalone=org.apache.eventmesh.connector.standalone.admin.StandaloneAdminAdaptor diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/test/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBrokerTest.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/test/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBrokerTest.java index 1e66b0fffd..651b18d749 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/test/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBrokerTest.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/test/java/org/apache/eventmesh/connector/standalone/broker/StandaloneBrokerTest.java @@ -38,10 +38,10 @@ public void getInstance() { public void putMessage() throws InterruptedException { StandaloneBroker instance = StandaloneBroker.getInstance(); CloudEvent cloudEvent = CloudEventBuilder.v1() - .withId("test") - .withSource(URI.create("testsource")) - .withType("testType") - .build(); + .withId("test") + .withSource(URI.create("testsource")) + .withType("testType") + .build(); MessageEntity messageEntity = instance.putMessage("test-topic", cloudEvent); Assert.assertNotNull(messageEntity); } @@ -50,10 +50,10 @@ public void putMessage() throws InterruptedException { public void takeMessage() throws InterruptedException { StandaloneBroker instance = StandaloneBroker.getInstance(); CloudEvent cloudEvent = CloudEventBuilder.v1() - .withId("test") - .withSource(URI.create("testsource")) - .withType("testType") - .build(); + .withId("test") + .withSource(URI.create("testsource")) + .withType("testType") + .build(); instance.putMessage("test-topic", cloudEvent); CloudEvent message = instance.takeMessage("test-topic"); Assert.assertNotNull(message); diff --git a/eventmesh-dashboard/.env.development b/eventmesh-dashboard/.env.development new file mode 100644 index 0000000000..7e0621fb80 --- /dev/null +++ b/eventmesh-dashboard/.env.development @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +NEXT_PUBLIC_WORKFLOW_API_ROOT=http://175.27.131.65:11022 +NEXT_PUBLIC_EVENTCATALOG_API_ROOT=http://175.27.131.65:12013 \ No newline at end of file diff --git a/eventmesh-dashboard/.env.production b/eventmesh-dashboard/.env.production new file mode 100644 index 0000000000..e8887c5ffc --- /dev/null +++ b/eventmesh-dashboard/.env.production @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +NEXT_PUBLIC_WORKFLOW_API_ROOT=http://localhost:11022 +NEXT_PUBLIC_EVENTCATALOG_API_ROOT=http://localhost:12013 \ No newline at end of file diff --git a/eventmesh-dashboard/.eslintrc.js b/eventmesh-dashboard/.eslintrc.js new file mode 100644 index 0000000000..120b007375 --- /dev/null +++ b/eventmesh-dashboard/.eslintrc.js @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +module.exports = { + env: { + browser: true, + es2021: true, + }, + extends: [ + 'plugin:react/recommended', + 'airbnb', + 'airbnb-typescript', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + ecmaVersion: 13, + sourceType: 'module', + project: 'tsconfig.json', + }, + plugins: [ + 'react', + '@typescript-eslint', + ], + rules: { + 'react/react-in-jsx-scope': 'off', + 'react/function-component-definition': [ + 'error', + { + namedComponents: 'arrow-function', + }, + ], + 'no-param-reassign': 'off' + }, +}; diff --git a/eventmesh-dashboard/.gitignore b/eventmesh-dashboard/.gitignore new file mode 100644 index 0000000000..8453b69998 --- /dev/null +++ b/eventmesh-dashboard/.gitignore @@ -0,0 +1,132 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist +next-env.d.ts + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel + +# VS code settings +.vscode + +# Yarn lock +yarn.lock \ No newline at end of file diff --git a/eventmesh-dashboard/README.md b/eventmesh-dashboard/README.md new file mode 100644 index 0000000000..c87e0421d2 --- /dev/null +++ b/eventmesh-dashboard/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/eventmesh-dashboard/components/client/GrpcClientTable.tsx b/eventmesh-dashboard/components/client/GrpcClientTable.tsx new file mode 100644 index 0000000000..1ffdfeaa6f --- /dev/null +++ b/eventmesh-dashboard/components/client/GrpcClientTable.tsx @@ -0,0 +1,217 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + HStack, + Select, + Input, + Table, + Thead, + Tbody, + Tr, + Th, + Td, + TableContainer, + useToast, + Box, + Button, +} from '@chakra-ui/react'; +import axios from 'axios'; +import { useContext, useEffect, useState } from 'react'; +import { AppContext } from '../../context/context'; + +interface GrpcClient { + env: string, + subsystem: string, + url: string, + pid: number, + host: string, + port: number, + version: string, + idc: string, + group: string, + purpose: string, + protocol: string, +} + +interface GrpcClientProps { + url: string, + group: string, +} + +interface RemoveGrpcClientRequest { + url: string, +} + +const GrpcClientRow = ({ + url, group, +}: GrpcClientProps) => { + const { state } = useContext(AppContext); + + const toast = useToast(); + const [loading, setLoading] = useState(false); + const onRemoveClick = async () => { + try { + setLoading(true); + await axios.delete(`${state.endpoint}/client/grpc`, { + data: { + url, + }, + }); + setLoading(false); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to remove the gRPC Client', + description: error.message, + status: 'error', + duration: 3000, + isClosable: true, + }); + } + } + }; + + return ( + + {url} + {group} + + + + + + + ); +}; + +const GrpcClientTable = () => { + const { state } = useContext(AppContext); + + const [searchInput, setSearchInput] = useState(''); + const handleSearchInputChange = (event: React.FormEvent) => { + setSearchInput(event.currentTarget.value); + }; + + const [groupSet, setGroupSet] = useState>(new Set()); + const [groupFilter, setGroupFilter] = useState(''); + const handleGroupSelectChange = (event: React.FormEvent) => { + setGroupFilter(event.currentTarget.value); + }; + + const [GrpcClientList, setGrpcClientList] = useState([]); + const toast = useToast(); + useEffect(() => { + const fetch = async () => { + try { + const { data } = await axios.get(`${state.endpoint}/client/grpc`); + setGrpcClientList(data); + + const nextGroupSet = new Set(); + data.forEach(({ group }) => { + nextGroupSet.add(group); + }); + setGroupSet(nextGroupSet); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to fetch the list of gRPC Clients', + description: 'Unable to connect to the EventMesh daemon', + status: 'error', + duration: 3000, + isClosable: true, + }); + setGrpcClientList([]); + } + } + }; + + fetch(); + }, []); + + return ( + + + + + + + + + + + + + + + + + {GrpcClientList && GrpcClientList.filter(({ + url, group, + }) => { + if (searchInput && !url.includes(searchInput)) { + return false; + } + if (groupFilter && groupFilter !== group) { + return false; + } + return true; + }).map(({ + url, group, + }) => ( + + ))} + +
URLGroupAction
+
+
+ ); +}; + +export default GrpcClientTable; diff --git a/eventmesh-dashboard/components/client/HTTPClientTable.tsx b/eventmesh-dashboard/components/client/HTTPClientTable.tsx new file mode 100644 index 0000000000..832ea91bdc --- /dev/null +++ b/eventmesh-dashboard/components/client/HTTPClientTable.tsx @@ -0,0 +1,217 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + HStack, + Select, + Input, + Table, + Thead, + Tbody, + Tr, + Th, + Td, + TableContainer, + useToast, + Box, + Button, +} from '@chakra-ui/react'; +import axios from 'axios'; +import { useContext, useEffect, useState } from 'react'; +import { AppContext } from '../../context/context'; + +interface HTTPClient { + env: string, + subsystem: string, + url: string, + pid: number, + host: string, + port: number, + version: string, + idc: string, + group: string, + purpose: string, + protocol: string, +} + +interface HTTPClientProps { + url: string, + group: string, +} + +interface RemoveHTTPClientRequest { + url: string, +} + +const HTTPClientRow = ({ + url, group, +}: HTTPClientProps) => { + const { state } = useContext(AppContext); + + const toast = useToast(); + const [loading, setLoading] = useState(false); + const onRemoveClick = async () => { + try { + setLoading(true); + await axios.delete(`${state.endpoint}/client/http`, { + data: { + url, + }, + }); + setLoading(false); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to remove the HTTP Client', + description: error.message, + status: 'error', + duration: 3000, + isClosable: true, + }); + } + } + }; + + return ( + + {url} + {group} + + + + + + + ); +}; + +const HTTPClientTable = () => { + const { state } = useContext(AppContext); + + const [searchInput, setSearchInput] = useState(''); + const handleSearchInputChange = (event: React.FormEvent) => { + setSearchInput(event.currentTarget.value); + }; + + const [groupSet, setGroupSet] = useState>(new Set()); + const [groupFilter, setGroupFilter] = useState(''); + const handleGroupSelectChange = (event: React.FormEvent) => { + setGroupFilter(event.currentTarget.value); + }; + + const [HTTPClientList, setHTTPClientList] = useState([]); + const toast = useToast(); + useEffect(() => { + const fetch = async () => { + try { + const { data } = await axios.get(`${state.endpoint}/client/http`); + setHTTPClientList(data); + + const nextGroupSet = new Set(); + data.forEach(({ group }) => { + nextGroupSet.add(group); + }); + setGroupSet(nextGroupSet); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to fetch the list of HTTP Clients', + description: 'Unable to connect to the EventMesh daemon', + status: 'error', + duration: 3000, + isClosable: true, + }); + setHTTPClientList([]); + } + } + }; + + fetch(); + }, []); + + return ( + + + + + + + + + + + + + + + + + {HTTPClientList && HTTPClientList.filter(({ + url, group, + }) => { + if (searchInput && !url.includes(searchInput)) { + return false; + } + if (groupFilter && groupFilter !== group) { + return false; + } + return true; + }).map(({ + url, group, + }) => ( + + ))} + +
URLGroupAction
+
+
+ ); +}; + +export default HTTPClientTable; diff --git a/eventmesh-dashboard/components/client/TCPClientTable.tsx b/eventmesh-dashboard/components/client/TCPClientTable.tsx new file mode 100644 index 0000000000..dc2458901d --- /dev/null +++ b/eventmesh-dashboard/components/client/TCPClientTable.tsx @@ -0,0 +1,223 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + HStack, + Select, + Input, + Table, + Thead, + Tbody, + Tr, + Th, + Td, + TableContainer, + useToast, + Box, + Button, +} from '@chakra-ui/react'; +import axios from 'axios'; +import { useContext, useEffect, useState } from 'react'; +import { AppContext } from '../../context/context'; + +interface TCPClient { + env: string, + subsystem: string, + url: string, + pid: number, + host: string, + port: number, + version: string, + idc: string, + group: string, + purpose: string, + protocol: string, +} + +interface TCPClientProps { + host: string, + port: number, + group: string, +} + +interface RemoveTCPClientRequest { + host: string, + port: number, +} + +const TCPClientRow = ({ + host, port, group, +}: TCPClientProps) => { + const { state } = useContext(AppContext); + + const toast = useToast(); + const [loading, setLoading] = useState(false); + const onRemoveClick = async () => { + try { + setLoading(true); + await axios.delete(`${state.endpoint}/client/tcp`, { + data: { + host, + port, + }, + }); + setLoading(false); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to remove the TCP Client', + description: error.message, + status: 'error', + duration: 3000, + isClosable: true, + }); + } + } + }; + + return ( + + {`${host}:${port}`} + {group} + + + + + + + ); +}; + +const TCPClientTable = () => { + const { state } = useContext(AppContext); + + const [searchInput, setSearchInput] = useState(''); + const handleSearchInputChange = (event: React.FormEvent) => { + setSearchInput(event.currentTarget.value); + }; + + const [groupSet, setGroupSet] = useState>(new Set()); + const [groupFilter, setGroupFilter] = useState(''); + const handleGroupSelectChange = (event: React.FormEvent) => { + setGroupFilter(event.currentTarget.value); + }; + + const [TCPClientList, setTCPClientList] = useState([]); + const toast = useToast(); + useEffect(() => { + const fetch = async () => { + try { + const { data } = await axios.get(`${state.endpoint}/client/tcp`); + setTCPClientList(data); + + const nextGroupSet = new Set(); + data.forEach(({ group }) => { + nextGroupSet.add(group); + }); + setGroupSet(nextGroupSet); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to fetch the list of TCP Clients', + description: 'Unable to connect to the EventMesh daemon', + status: 'error', + duration: 3000, + isClosable: true, + }); + setTCPClientList([]); + } + } + }; + + fetch(); + }, []); + + return ( + + + + + + + + + + + + + + + + + + {TCPClientList && TCPClientList.filter(({ + host, port, group, + }) => { + const address = `${host}:${port}`; + if (searchInput && !address.includes(searchInput)) { + return false; + } + if (groupFilter && groupFilter !== group) { + return false; + } + return true; + }).map(({ + host, port, group, + }) => ( + + ))} + +
HostHostGroupAction
+
+
+ ); +}; + +export default TCPClientTable; diff --git a/eventmesh-dashboard/components/event/EventTable.tsx b/eventmesh-dashboard/components/event/EventTable.tsx new file mode 100644 index 0000000000..b0d0a13df9 --- /dev/null +++ b/eventmesh-dashboard/components/event/EventTable.tsx @@ -0,0 +1,371 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + HStack, + Input, + Table, + Thead, + Tbody, + Tr, + Th, + Td, + TableContainer, + useToast, + Box, + Button, + Modal, + ModalBody, + ModalCloseButton, + ModalContent, + ModalFooter, + ModalHeader, + ModalOverlay, + useDisclosure, + Select, + VStack, + Textarea, +} from '@chakra-ui/react'; +import axios from 'axios'; +import { useContext, useEffect, useState } from 'react'; +import { CloudEvent } from 'cloudevents'; +import { AppContext } from '../../context/context'; + +interface Topic { + name: string, + messageCount: number, +} + +interface EventProps { + event: CloudEvent, +} + +interface CreateEventRequest { + event: CloudEvent, +} + +const CreateEventModal = () => { + const { state } = useContext(AppContext); + + const { isOpen, onOpen, onClose } = useDisclosure(); + + const [id, setId] = useState(''); + const handleIdChange = (event: React.FormEvent) => { + setId(event.currentTarget.value); + }; + + const [source, setSource] = useState(''); + const handleSourceChange = (event: React.FormEvent) => { + setSource(event.currentTarget.value); + }; + + const [subject, setSubject] = useState(''); + const handleSubjectChange = (event: React.FormEvent) => { + setSubject(event.currentTarget.value); + }; + + const [type, setType] = useState(''); + const handleTypeChange = (event: React.FormEvent) => { + setType(event.currentTarget.value); + }; + + const [data, setData] = useState(''); + const handleDataChange = (event: React.FormEvent) => { + setData(event.currentTarget.value); + }; + + const toast = useToast(); + const [loading, setLoading] = useState(false); + const onCreateClick = async () => { + try { + setLoading(true); + await axios.post(`${state.endpoint}/event`, new CloudEvent({ + source, + subject, + type, + data, + specversion: '1.0', + })); + onClose(); + } catch (error) { + if (axios.isAxiosError(error)) { + toast({ + title: 'Failed to publish the event', + description: error.message, + status: 'error', + duration: 3000, + isClosable: true, + }); + } + } finally { + setLoading(false); + } + }; + + return ( + <> + + + + + Create Event + + + + + + + + + + + + + + + + + + + ); +}; + +const EventRow = ({ + event, +}: EventProps) => { + const { isOpen, onOpen, onClose } = useDisclosure(); + const eventDataBase64 = event.data_base64 || ''; + const eventData = Buffer.from(eventDataBase64, 'base64').toString('utf-8'); + + return ( + <> + + + + Event Data + + + +