You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by sh...@apache.org on 2022/06/07 07:01:03 UTC

[rocketmq-eventbridge] branch main updated: feat:upgrade the rocketmq version and Improve documentation (#19)

This is an automated email from the ASF dual-hosted git repository.

shenlin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/rocketmq-eventbridge.git


The following commit(s) were added to refs/heads/main by this push:
     new 06f3310  feat:upgrade the rocketmq version and Improve documentation (#19)
06f3310 is described below

commit 06f33100d7839ae627983a4c5e3b4beb62d8a008
Author: shenlin <20...@gmail.com>
AuthorDate: Tue Jun 7 15:00:59 2022 +0800

    feat:upgrade the rocketmq version and Improve documentation (#19)
    
    feat:upgrade the rocketmq version and Improve the documentation
---
 README.md                                          | 246 ++++++++++++++++-----
 adapter/api/pom.xml                                |  10 +-
 .../repository/RocketMQEventDataRepository.java    |  21 +-
 .../rocketmq/repository/RocketMQMetaService.java   |  93 ++++++++
 .../migration/V2__change_target_transform_type.sql |   2 +
 .../adapter/rpc/impl/AccountAPIImpl.java           |   2 +-
 application/README-CN.md                           |   4 -
 application/pom.xml                                |  19 --
 pom.xml                                            |   1 -
 9 files changed, 303 insertions(+), 95 deletions(-)

diff --git a/README.md b/README.md
index 201d646..c8efeca 100644
--- a/README.md
+++ b/README.md
@@ -5,76 +5,219 @@ RocketMQ EventBridge is a subproject of rocketmq to make it easier to build even
 ## Architecture
 Events are sent to the event bus in two ways: 1) Push events through the SDK or Webhook actively; 2) Pulled events by eventbridge passively. Events obtained in both ways will be stored on the event bus. EventBus is the core concept in EventBridge, which allows you to subscribe to the events, filter the events, and push to the specified target by creating the event rule. The event on the event bus is stored by rocketmq. Through rocketmq-connect, we can pull the event from the register sou [...]
 
-- `application`  应用服务模块, 定义Application Service
-- `adapter` 适配层
-    - `persistence` 持久化相关, 一般存放Repository的实现(包含DO对象)
-    - `api` 暴露给外部的api接口提供者
-    - `rpc` 添加自己反转依赖的SPI, 以及SPI的实现适配
-- `domain` 领域设计的核心模块
-    - 每个聚合通过package隔离,定义于`model`package下
-    - org.apache.rocketmq.eventbridge.domain.service` 存放当前子域下的所有领域服务
-- `start` 启动入口(多个子域被打包在同一个应用jar包中时, start模块会被排除)
+- `adapter` Adapt to different operating environments
+    - `persistence` Implement the repository API in the domain layer and persist the model data.
+    - `api` The open API provided by EventBridge.
+    - `rpc` Implement the rpc API in the domain layer to adapter the run environment.
+- `common` The common code of all modules.
+- `domain` The core code of EventBridge.
+    - model:The core properties and behaviors of model on EventBridge.
+    - service: The domain services which across multiple domains.
+- `start` 
 
+## Quick Start
+RocketMQ EventBridge rely on a message service to store the event, and needs one connect service to collect or forward events.Here, we choose the Apache RocketMQ as our message service, and choose the Apache RocketMQ Connect as our connect service.Of course, you can also choose other alternative services. Eventbridge do not limit it. You only need to provide the relevant adapter API implementation.
+#### Apache RocketMQ
+Apache RocketMQ is a great messaging service,and we choose it as our message service.You can deploy the apache rocketmq according to the manual: [RocketMQ Quick Start](https://rocketmq.apache.org/docs/quick-start/)
 
-## Demo
-#### Dependencies
-* rocketmq-connect
-  
-* Mysql 
+#### Apache RocketMQ Connect
+Apache RocketMQ Connect can connect the external upstream and downstream services,and You can deploy it according to the manual: [RocketMQ Connect Quick Start](https://github.com/apache/rocketmq-connect)
+. Before deploy the Apache RocketMQ Connect, you should download the plugins below and put it to the "pluginPaths" which defined on rocketmq-connect.
 
-#### 
+* [rocketmq-connect-eventbridge-0.0.1-SNAPSHOT-jar-with-dependencies.jar](https://cn-hangzhou-eventbridge.oss-cn-hangzhou.aliyuncs.com/rocketmq-connect-eventbridge-0.0.1-SNAPSHOT-jar-with-dependencies.jar)
+* [rocketmq-connect-dingtalk-1.0-SNAPSHOT-jar-with-dependencies.jar](https://cn-hangzhou-eventbridge.oss-cn-hangzhou.aliyuncs.com/rocketmq-connect-dingtalk-1.0-SNAPSHOT-jar-with-dependencies.jar)
+* [connect-cloudevent-transform-1.0.0-SNAPSHOT-jar-with-dependencies.jar](https://cn-hangzhou-eventbridge.oss-cn-hangzhou.aliyuncs.com/connect-cloudevent-transform-1.0.0-SNAPSHOT-jar-with-dependencies.jar)
+* [connect-filter-transform-1.0.0-SNAPSHOT-jar-with-dependencies.jar](https://cn-hangzhou-eventbridge.oss-cn-hangzhou.aliyuncs.com/connect-filter-transform-1.0.0-SNAPSHOT-jar-with-dependencies.jar)
+* [connect-eventbridge-transform-1.0.0-SNAPSHOT-jar-with-dependencies.jar](https://cn-hangzhou-eventbridge.oss-cn-hangzhou.aliyuncs.com/connect-eventbridge-transform-1.0.0-SNAPSHOT-jar-with-dependencies.jar)
 
-* Create EventBus
+#### Apache RocketMQ EventBridge
+
+Before run the project,configure the following properties which :
 ```
-http://127.0.0.1:7001/bus/createEventBus
+# The config of mysql databse.
+spring.datasource.url=jdbc:mysql://xxxx:3306/xxxx?characterEncoding=utf8
+spring.datasource.username=xxx
+spring.datasource.password=xxxx
+
+# The endpoint of rocketmq nameserver.
+rocketmq.namesrvAddr=xxxxx:9876
+
+# The cluster name of rocketmq.
+rocketmq.cluster.name=DefaultCluster
+
+# The endpoint of rocketmq-connect.
+rocketmq.connect.endpoint=xxxxxx:8082
+
 ```
+After that ,you should register the targets which you want to create, into the 'event_target_class' table.
+
+| key                                             | description | 
+| ----------------------------------------------- | -------- | 
+| name | the target class name     |  
+|api_params  | the required params when create target.     |  
+|target_transform   |the default transform with target data.     |  
+|required_params |the required params of connect.  |
+
+
+* register the "acs.eventbridge" target.
+
+api_params:
 ```json
 {
-"eventBusName":"demo",
-"description":"a demo bus."
+    "RegionId":{
+        "type":"String",
+        "desc":"the region of aliyun eventbridge.",
+        "required":true
+    },
+    "AliyunEventBus":{
+        "type":"String",
+        "desc":"the bus of aliyun eventbridge.",
+        "required":true
+    }
 }
 ```
 
+target_transform:
+```json
+{
+  "data":"{\"form\":\"JSONPATH\",\"value\":\"$.data\"}",
+  "id":"{\"form\":\"JSONPATH\",\"value\":\"$.id\"}",
+  "type":"{\"form\":\"JSONPATH\",\"value\":\"$.type\"}",
+  "specversion":"{\"form\":\"JSONPATH\",\"value\":\"$. specversion\"}",
+  "subject":"{\"form\":\"JSONPATH\",\"value\":\"$.subject\"}",
+  "source":"{\"form\":\"JSONPATH\",\"value\":\"$.source\"}"
+}
+```
 
-* Create EventSource
+
+target_transform:
+```json
+{
+  "aliyuneventbusname":"${AliyunEventBus}",
+  "accessKeyId":"the accessKeyId of aliyun accountId",
+  "accessKeySecret":"the accessKeySecret of aliyun accountId",
+  "accountEndpoint":"xxxx.eventbridge.${RegionId}.aliyuncs.com",
+  "class":"org.apache.rocketmq.connect.eventbridge.sink.EventBridgeSinkConnector"
+}
 ```
-http://127.0.0.1:7001/source/createEventSource
+
+* register the "acs.dingtalk" target.
+
+
+api_params:
+```json
+{
+  "WebHook":{
+    "type":"String",
+    "desc":"the webhook endpoint of dingtalk.",
+    "required":true
+  },
+  "SecretKey":{
+    "type":"String",
+    "desc":"the secret key of dingtalk webhookd.",
+    "required":true
+  },
+  "Body":{
+    "type":"boolean",
+    "desc":"the content which push to dingtalk."
+  }
+}
 ```
+
+target_transform:
 ```json
 {
-"eventBusName":"demo",
-"eventSourceName":"demo-source",
-"description":"a demo bus."
+  "data":"${Body}"
 }
 ```
 
 
-* Create EventRule
+target_transform:
+```json
+{
+  "webHook":"${WebHook}",
+  "secretKey":"${SecretKey}",
+  "class":"org.apache.rocketmq.connect.dingtalk.sink.DingTalkSinkConnector"
+}
 ```
-http://127.0.0.1:7001/rule/createEventRule
+
+
+## Demo
+####
+* Create EventBus
+
+```json
+POST /bus/createEventBus HTTP/1.1
+Host: demo.eventbridge.com
+Content-Type: application/json; charset=utf-8
+{
+"eventBusName":"demo-bus",
+"description":"a demo bus."
+}
+```
+
+
+* Create EventSource
+
+```json
+POST /source/createEventSource HTTP/1.1
+Host: demo.eventbridge.com
+Content-Type: application/json; charset=utf-8
+{
+"eventBusName":"demo-bus",
+"eventSourceName":"demo-source",
+"description":"A demo source."
+}
 ```
+
+
+* Create EventRule
 ```json
+POST /rule/createEventRule HTTP/1.1
+Host: demo.eventbridge.com
+Content-Type: application/json; charset=utf-8
 {
-  "eventBusName":"demo",
-  "eventRuleName":"demo",
-  "description":"test",
+  "eventBusName":"demo-bus",
+  "eventRuleName":"demo-rule",
+  "description":"A demo rule.",
   "filterPattern":"{}"
 }
 ```
 
 * Create Target
 
-This is a sample with DingTalk target.
-```
-http://127.0.0.1:7001/target/createEventTargets
+This is a sample with EventBridge target:
+```json
+POST /target/createEventTargets HTTP/1.1
+Host: demo.eventbridge.com
+Content-Type: application/json; charset=utf-8
+{
+"eventBusName":"demo-bus",
+"eventRuleName":"demo-rule",
+"eventTargets":[
+        {
+        "eventTargetName":"eventbridge-target",
+        "className":"acs.eventbridge",
+            "config":{
+            "RegionId":"cn-hangzhou",
+            "AliyunEventBus":"rocketmq-eventbridge"
+            }
+        }
+    ]
+}
 ```
+
+This is a sample with DingTalk target:
 ```json
+POST /target/createEventTargets HTTP/1.1
+Host: demo.eventbridge.com
+Content-Type: application/json; charset=utf-8
 {
-    "eventBusName":"demo",
-    "eventRuleName":"demo",
+    "eventBusName":"demo-bus",
+    "eventRuleName":"demo-rule",
     "eventTargetRunners":[
         {
-            "eventTargetName":"demo",
+            "eventTargetName":"dingtalk-target",
             "className":"acs.dingtalk",
             "config":{
             "WebHook":"https://oapi.dingtalk.com/robot/send?access_token=b43a54b702314415c2acdae97eda1e092528b7a9dddb31510a5b4430be2ef867",
@@ -85,24 +228,25 @@ http://127.0.0.1:7001/target/createEventTargets
     ]
 }
 ```
-* Put Events to EventBus 
-```
-URL: http://127.0.0.1:7001/putEvents
-Header: Content-Type:"application/cloudevents+json; charset=UTF-8"
-```
+
+* Put Events to EventBus
+
 ```json
+POST /putEvents HTTP/1.1
+Host: demo.eventbridge.com
+Content-Type:"application/cloudevents+json; charset=UTF-8"
 {
-    "specversion" : "1.0",
-    "type" : "com.github.pull_request.opened",
-    "source" : "https://github.com/cloudevents/spec/pull",
-    "subject" : "123",
-    "id" : "A234-1234-1234",
-    "time" : "2018-04-05T17:31:00Z",
-    "datacontenttype" : "application/json",
-    "data" : {
-        "body":"demo"
-    },
-    "aliyuneventbusname":"demo"
+  "specversion" : "1.0",
+  "type" : "com.github.pull_request.opened",
+  "source" : "https://github.com/cloudevents/spec/pull",
+  "subject" : "123",
+  "id" : "A234-1234-1234",
+  "time" : "2018-04-05T17:31:00Z",
+  "datacontenttype" : "application/json",
+  "data" : {
+    "body":"demo"
+  },
+  "aliyuneventbusname":"demo-bus"
 }
 ```
 * Use HttpSource to put events
diff --git a/adapter/api/pom.xml b/adapter/api/pom.xml
index eeac35d..3142b27 100644
--- a/adapter/api/pom.xml
+++ b/adapter/api/pom.xml
@@ -16,6 +16,7 @@
         <jakarta.version>2.1.6</jakarta.version>
         <jersey.version>2.34</jersey.version>
         <reactor.version>3.4.14</reactor.version>
+        <httpcore.version>4.4.9</httpcore.version>
     </properties>
 
     <dependencies>
@@ -24,10 +25,6 @@
             <groupId>org.apache.rocketmq</groupId>
             <artifactId>rocketmq-eventbridge-adapter-persistence</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.rocketmq</groupId>
-            <artifactId>rocketmq-eventbridge-adapter-rpc</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.apache.rocketmq</groupId>
             <artifactId>rocketmq-eventbridge-domain</artifactId>
@@ -72,6 +69,11 @@
             <artifactId>cloudevents-http-restful-ws</artifactId>
             <version>${cloudevents.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>${httpcore.version}</version>
+        </dependency>
         <!-- Test -->
         <dependency>
             <groupId>io.projectreactor</groupId>
diff --git a/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQEventDataRepository.java b/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQEventDataRepository.java
index 5ed6ace..9566f38 100644
--- a/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQEventDataRepository.java
+++ b/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQEventDataRepository.java
@@ -31,8 +31,6 @@ import org.apache.rocketmq.eventbridge.domain.model.data.PutEventCallback;
 import org.apache.rocketmq.eventbridge.domain.repository.EventDataRepository;
 import org.apache.rocketmq.eventbridge.event.EventBridgeEvent;
 import org.apache.rocketmq.eventbridge.exception.EventBridgeException;
-import org.apache.rocketmq.eventbridge.exception.code.DefaultErrorCode;
-import org.apache.rocketmq.tools.admin.DefaultMQAdminExt;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Repository;
@@ -44,39 +42,32 @@ public class RocketMQEventDataRepository implements EventDataRepository {
     private final EventDataOnRocketMQConnectAPI eventDataOnRocketMQConnectAPI;
     private final EventTopicMapper eventTopicMapper;
     private final DefaultMQProducer producer;
-    private final DefaultMQAdminExt defaultMQAdminExt;
+    private final RocketMQMetaService rocketMQMetaService;
 
     @Value("${rocketmq.cluster.name:}")
     private String clusterName;
 
     public RocketMQEventDataRepository(EventDataOnRocketMQConnectAPI eventDataOnRocketMQConnectAPI,
-        EventTopicMapper eventTopicMapper, DefaultMQProducer producer, DefaultMQAdminExt defaultMQAdminExt) {
+        EventTopicMapper eventTopicMapper, DefaultMQProducer producer, RocketMQMetaService rocketMQMetaService) {
         this.eventDataOnRocketMQConnectAPI = eventDataOnRocketMQConnectAPI;
         this.eventTopicMapper = eventTopicMapper;
         this.producer = producer;
-        this.defaultMQAdminExt = defaultMQAdminExt;
+        this.rocketMQMetaService = rocketMQMetaService;
     }
 
     @Override
     public boolean createEventBusPersistence(String accountId, String eventBusName) {
         String topicName = eventDataOnRocketMQConnectAPI.buildTopicName(accountId, eventBusName);
-        try {
-            eventTopicMapper.createTopic(accountId, eventBusName, topicName, clusterName);
-            defaultMQAdminExt.createTopic(clusterName, topicName, 1);
-        } catch (Throwable e) {
-            log.error("Create event bus persistence failed.", e);
-            throw new EventBridgeException(DefaultErrorCode.InternalError, e);
-        }
-        return true;
+        eventTopicMapper.createTopic(accountId, eventBusName, topicName, clusterName);
+        return rocketMQMetaService.createTopic(clusterName, topicName);
     }
 
     @SneakyThrows
     @Override
     public boolean deleteEventBusPersistence(String accountId, String eventBusName) {
         EventTopicDO eventTopicDO = eventTopicMapper.getTopic(accountId, eventBusName);
-        defaultMQAdminExt.deleteTopic(eventTopicDO.getName(), eventTopicDO.getCluster());
         eventTopicMapper.deleteTopic(accountId, eventBusName);
-        return true;
+        return rocketMQMetaService.deleteTopic(eventTopicDO.getCluster(), eventTopicDO.getName());
     }
 
     @Override
diff --git a/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQMetaService.java b/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQMetaService.java
new file mode 100644
index 0000000..1816650
--- /dev/null
+++ b/adapter/persistence/src/main/java/org/apache/rocketmq/eventbridge/adapter/persistence/data/rocketmq/repository/RocketMQMetaService.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.rocketmq.eventbridge.adapter.persistence.data.rocketmq.repository;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.rocketmq.client.exception.MQBrokerException;
+import org.apache.rocketmq.client.exception.MQClientException;
+import org.apache.rocketmq.common.protocol.body.ClusterInfo;
+import org.apache.rocketmq.common.protocol.route.BrokerData;
+import org.apache.rocketmq.eventbridge.exception.EventBridgeException;
+import org.apache.rocketmq.eventbridge.exception.code.DefaultErrorCode;
+import org.apache.rocketmq.remoting.exception.RemotingConnectException;
+import org.apache.rocketmq.remoting.exception.RemotingSendRequestException;
+import org.apache.rocketmq.remoting.exception.RemotingTimeoutException;
+import org.apache.rocketmq.tools.admin.DefaultMQAdminExt;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class RocketMQMetaService {
+
+    private final DefaultMQAdminExt defaultMQAdminExt;
+
+    private final int DEFAULT_QUEUE_NUM = 1;
+
+    public RocketMQMetaService(DefaultMQAdminExt defaultMQAdminExt) {
+        this.defaultMQAdminExt = defaultMQAdminExt;
+    }
+
+    public boolean createTopic(String clusterName, String topicName) {
+        try {
+            defaultMQAdminExt.createTopic(clusterName, topicName, DEFAULT_QUEUE_NUM);
+        } catch (MQClientException e) {
+            log.error("Create topic failed.", e);
+            throw new EventBridgeException(DefaultErrorCode.InternalError, e);
+        }
+        return Boolean.TRUE;
+    }
+
+    public boolean deleteTopic(String clusterName, String topicName) {
+        try {
+            Set<String> brokerAddressSet = fetchMasterAndSlaveAddrByClusterName(clusterName);
+            defaultMQAdminExt.deleteTopicInBroker(brokerAddressSet, topicName);
+            List<String> nameServerList = defaultMQAdminExt.getNameServerAddressList();
+            defaultMQAdminExt.deleteTopicInNameServer(new HashSet<String>(nameServerList), topicName);
+        } catch (Throwable e) {
+            log.error("Delete topic failed.", e);
+            throw new EventBridgeException(DefaultErrorCode.InternalError, e);
+        }
+        return Boolean.TRUE;
+    }
+
+    private Set<String> fetchMasterAndSlaveAddrByClusterName(String clusterName)
+        throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException,
+        MQBrokerException {
+        Set<String> brokerAddressSet = new HashSet<String>();
+        ClusterInfo clusterInfoSerializeWrapper = defaultMQAdminExt.examineBrokerClusterInfo();
+        Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable()
+            .get(clusterName);
+        if (brokerNameSet != null) {
+            for (String brokerName : brokerNameSet) {
+                BrokerData brokerData = clusterInfoSerializeWrapper.getBrokerAddrTable()
+                    .get(brokerName);
+                if (brokerData != null) {
+                    final Collection<String> addrs = brokerData.getBrokerAddrs()
+                        .values();
+                    brokerAddressSet.addAll(addrs);
+                }
+            }
+        }
+        return brokerAddressSet;
+    }
+}
diff --git a/adapter/persistence/src/main/resources/db/migration/V2__change_target_transform_type.sql b/adapter/persistence/src/main/resources/db/migration/V2__change_target_transform_type.sql
new file mode 100644
index 0000000..741ee69
--- /dev/null
+++ b/adapter/persistence/src/main/resources/db/migration/V2__change_target_transform_type.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `event_target_class`
+CHANGE COLUMN `target_transform` `target_transform` TEXT NULL DEFAULT NULL ;
diff --git a/adapter/rpc/src/main/java/org/apache/rocketmq/eventbridge/adapter/rpc/impl/AccountAPIImpl.java b/adapter/rpc/src/main/java/org/apache/rocketmq/eventbridge/adapter/rpc/impl/AccountAPIImpl.java
index b3a4fac..b4a28e6 100644
--- a/adapter/rpc/src/main/java/org/apache/rocketmq/eventbridge/adapter/rpc/impl/AccountAPIImpl.java
+++ b/adapter/rpc/src/main/java/org/apache/rocketmq/eventbridge/adapter/rpc/impl/AccountAPIImpl.java
@@ -38,7 +38,7 @@ public class AccountAPIImpl implements AccountAPI {
 
     @Override
     public String getResourceOwnerAccountId() {
-        return "1439989007797786";
+        return "Admin";
     }
 
     @Override
diff --git a/application/README-CN.md b/application/README-CN.md
deleted file mode 100644
index 544e7bc..0000000
--- a/application/README-CN.md
+++ /dev/null
@@ -1,4 +0,0 @@
-###  模块职责
-用于存放开源与内部API交互需求不同的部分,相同部分则放在domain核心层。
-* 从原先的链路: api -> domain 
-* 升级为:api -> application -> domain
\ No newline at end of file
diff --git a/application/pom.xml b/application/pom.xml
deleted file mode 100644
index 6859714..0000000
--- a/application/pom.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>rocketmq-eventbridge</artifactId>
-        <groupId>org.apache.rocketmq</groupId>
-        <version>1.0.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>rocketmq-eventbridge-application</artifactId>
-
-    <properties>
-        <maven.compiler.source>8</maven.compiler.source>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
-
-</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a1d42b2..d9be3d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,6 @@
         <module>start</module>
         <module>adapter</module>
         <module>domain</module>
-        <module>application</module>
         <module>common</module>
     </modules>