diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4a68e32c9..fc2ca0bf0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,30 +33,17 @@ on: jobs: build: name: Build - - runs-on: ${{ matrix.os }} - strategy: fail-fast: false matrix: os: [ubuntu-latest, macOS-latest] - language: - - 'java' java: [8, 11] + runs-on: ${{ matrix.os }} steps: - name: Checkout repository uses: actions/checkout@v2 - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - 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. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - languages: ${{ matrix.language }} - - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v1 with: @@ -70,15 +57,8 @@ jobs: - name: Install plugin run: ./gradlew installPlugin - - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@v1 - - - name: Upload coverage report to codecov.io - run: bash <(curl -s https://codecov.io/bash) || echo 'Failed to upload coverage report!' - checkstyle: name: Checkstyle - runs-on: ubuntu-latest steps: @@ -100,7 +80,6 @@ jobs: license-header-check: name: License header Check - runs-on: ubuntu-latest steps: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 16b6b6602d..f23fede553 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,15 +37,15 @@ Here are the workflow for contributors: 1. Fork to your own 2. Clone fork to local repository -```shell +```git git clone git@github.com:yourgithub/incubator-eventmesh.git ``` 3. Create a new branch and work on it -```shell +```git git checkout -b fix_patch_xx ``` 4. Keep your branch in sync -```shell +```git git remote add upstream git@github.com:apache/incubator-eventmesh.git git fetch upstream develop:upstream_develop git rebase upstream_develop @@ -65,18 +65,20 @@ EventMesh repository, and the related Issue will be closed. 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 typo in a document, find a bug in code, or want new features, or want to give suggestions, you +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. If -your PR contains large changes, e.g. component refactor or new components, please write detailed documents about its +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. -Note that a single pull request should not be too large. If heavy changes are required, it's better to separate the +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. -### Code review +### PR review All code should be well reviewed by one or more committers. Some principles: @@ -88,11 +90,18 @@ All code should be well reviewed by one or more committers. Some principles: 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, and EventMesh uses [Gradle-License-Report](https://github.com/jk1/Gradle-License-Report) plugin 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/allowed-licenses.txt, you can execute `./gradlew clean checkLicense` to judge -whether there exist dependencies have been added, and the newly added three-part libraries need to meet [ASF 3RD PARTY LICENSE POLICY](https://apache.org/legal/resolved.html). +the source file header. + +EventMesh uses [check-LICENSE.sh](tools/third-party-dependencies/check-LICENSE.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 diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 0fede22ee3..b432e0954b 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -31,15 +31,15 @@ Editor -> Code Style -> Java -> Scheme -> Import Scheme -> CheckStyle Configurat 1. Fork到您个人仓库 2. 克隆到本地存储库 -```shell +```git git clone git@github.com:yourgithub/incubator-eventmesh.git ``` 3. 创建一个新分支并对其进行处理 -```shell +```git git checkout -b fix_patch_xx ``` 4. 保持分支与主库同步 -```shell +```git git remote add upstream git@github.com:apache/incubator-eventmesh.git git fetch upstream develop:upstream_develop git rebase upstream_develop @@ -56,19 +56,20 @@ git rebase upstream_develop ### 打开问题/ PR 我们将使用Issues和Pull Requests作为跟踪器 -[GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) -[Pull Requests](https://github.com/apache/incubator-eventmesh/pulls) +- [GitHub Issues](https://github.com/apache/incubator-eventmesh/issues) +- [Pull Requests](https://github.com/apache/incubator-eventmesh/pulls) -如果您在文档中发现拼写错误,在代码中发现错误,想要新功能或提出建议, 您可以提出问题[在GitHub上打开问题](https://github.com/apache/incubator-eventmesh/issues/new) -请按照问题模板中的准则消息进行操作。 +如果您发现新的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进行良好的审查。一些原则: +所有PR应由一个或多个committer进行良好的审查。一些原则: - 可读性: 重要代码应有详细记录。符合我们的[代码风格](./style/checkStyle.xml) - 优雅: 新功能,类或组件应经过精心设计 @@ -78,10 +79,18 @@ git rebase upstream_develop 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使用[Gradle-License-Report](https://github.com/jk1/Gradle-License-Report)插件 -检查第三方依赖,当你需要添加三方依赖时,你需要将新添加的依赖注册在tool/license/allowed-licenses.txt中,你可以通过执行`./gradlew clean checkLicense`命令可以判断当前是否有license尚未添加, +对源代码文件头进行校验。 + +EventMesh使用[check-LICENSE.sh](tools/third-party-dependencies/check-LICENSE.sh)脚本 +检查第三方依赖,当你需要添加三方依赖时,你需要将新添加的依赖注册在tool/license/known-dependencies.txt中, 同时新添加的三方库需要满足[Apache对于第三方的政策](https://apache.org/legal/resolved.html)。 -非常建议在需要添加三方依赖之前与EventMesh社区进行沟通。 + +当添加依赖时遇到问题时,社区PPMC会协助解决,非常建议在需要添加三方依赖之前与EventMesh社区进行沟通。 + +### PR合并 + +PR经过至少一个committer approve之后会由committer负责合并,在合并的时候,committer可以对commits信息进行修改,要求commits信息简洁明了,不重复。 +在合并时使用Squash and merge, 要求一个PR保留一个commits。对于大型多人协助的PR,使用Merge进行合并,在合并之前通过rebase修正commits。 ## 社区 diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle index 3c2c9ede9a..8ccfa87825 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle +++ b/eventmesh-connector-plugin/eventmesh-connector-api/build.gradle @@ -16,13 +16,18 @@ */ dependencies { - implementation project(":eventmesh-spi") + api project(":eventmesh-spi") implementation project(":eventmesh-common") api 'io.cloudevents:cloudevents-core' -// api 'io.openmessaging:openmessaging-api' api 'io.dropwizard.metrics:metrics-core' api "io.dropwizard.metrics:metrics-healthchecks" 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' + + testCompileOnly 'org.projectlombok:lombok:1.18.22' + testAnnotationProcessor 'org.projectlombok:lombok:1.18.22' + } diff --git a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/exception/OnExceptionContext.java b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/exception/OnExceptionContext.java index 1237e5fe2f..d51da7a0d1 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/exception/OnExceptionContext.java +++ b/eventmesh-connector-plugin/eventmesh-connector-api/src/main/java/org/apache/eventmesh/api/exception/OnExceptionContext.java @@ -17,6 +17,15 @@ package org.apache.eventmesh.api.exception; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor public class OnExceptionContext { private String messageId; @@ -27,30 +36,4 @@ public class OnExceptionContext { * Detailed exception stack information. */ private ConnectorRuntimeException exception; - - - public String getMessageId() { - return messageId; - } - - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - public String getTopic() { - return topic; - } - - public void setTopic(String topic) { - this.topic = topic; - } - - - public ConnectorRuntimeException getException() { - return exception; - } - - public void setException(ConnectorRuntimeException exception) { - this.exception = exception; - } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle index e7b807b984..712c24447d 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/build.gradle @@ -37,8 +37,8 @@ List rocketmq = [ ] dependencies { - compileOnly project(":eventmesh-common") - compileOnly project(":eventmesh-connector-plugin:eventmesh-connector-api") + implementation project(":eventmesh-common") + implementation project(":eventmesh-connector-plugin:eventmesh-connector-api") implementation rocketmq testImplementation project(":eventmesh-connector-plugin:eventmesh-connector-api") 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 629975e44b..6936a1b6d3 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 @@ -81,7 +81,7 @@ public void put(MessageEntity messageEntity) throws InterruptedException { * Get the first message at this queue, waiting for the message is available if the queue is empty, * this method will not remove the message * - * @return + * @return MessageEntity * @throws InterruptedException */ public MessageEntity take() throws InterruptedException { @@ -100,7 +100,7 @@ public MessageEntity take() throws InterruptedException { /** * Get the first message at this queue, if the queue is empty return null immediately * - * @return + * @return MessageEntity */ public MessageEntity peek() { ReentrantLock lock = this.lock; @@ -115,7 +115,7 @@ public MessageEntity peek() { /** * Get the head in this queue * - * @return + * @return MessageEntity */ public MessageEntity getHead() { return peek(); @@ -124,7 +124,7 @@ public MessageEntity getHead() { /** * Get the tail in this queue * - * @return + * @return MessageEntity */ public MessageEntity getTail() { ReentrantLock lock = this.lock; @@ -148,7 +148,7 @@ public MessageEntity getTail() { * and calculate the index of this offset * * @param offset - * @return + * @return MessageEntity */ public MessageEntity getByOffset(long offset) { ReentrantLock lock = this.lock; 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 99135aa7e8..822d1c09ef 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 @@ -94,7 +94,7 @@ public CloudEvent getMessage(String topicName) { * * @param topicName topic name * @param offset offset - * @return + * @return CloudEvent */ public CloudEvent getMessage(String topicName, long offset) { TopicMetadata topicMetadata = new TopicMetadata(topicName); 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 b2a6122d91..e6dce1a9bb 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 @@ -22,7 +22,6 @@ 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.connector.standalone.broker.StandaloneBroker; import org.apache.eventmesh.connector.standalone.broker.model.MessageEntity; @@ -92,10 +91,11 @@ public void publish(CloudEvent cloudEvent, SendCallback sendCallback) throws Exc SendResult sendResult = publish(cloudEvent); sendCallback.onSuccess(sendResult); } catch (Exception ex) { - OnExceptionContext onExceptionContext = new OnExceptionContext(); - onExceptionContext.setMessageId(cloudEvent.getId()); - onExceptionContext.setTopic(cloudEvent.getSubject()); - onExceptionContext.setException(new ConnectorRuntimeException(ex)); + OnExceptionContext onExceptionContext = OnExceptionContext.builder() + .messageId(cloudEvent.getId()) + .topic(cloudEvent.getSubject()) + .exception(new ConnectorRuntimeException(ex)) + .build(); sendCallback.onException(onExceptionContext); } } @@ -105,26 +105,22 @@ public void sendOneway(CloudEvent cloudEvent) { } public void sendAsync(CloudEvent cloudEvent, SendCallback sendCallback) { - Preconditions.checkNotNull(cloudEvent); - Preconditions.checkNotNull(sendCallback); + Preconditions.checkNotNull(cloudEvent, "CloudEvent cannot be null"); + Preconditions.checkNotNull(sendCallback, "Callback cannot be null"); // todo: current is not async try { SendResult sendResult = publish(cloudEvent); sendCallback.onSuccess(sendResult); } catch (Exception ex) { - OnExceptionContext onExceptionContext = new OnExceptionContext(); - onExceptionContext.setMessageId(cloudEvent.getId()); - onExceptionContext.setTopic(cloudEvent.getSubject()); - onExceptionContext.setException(new ConnectorRuntimeException(ex)); + OnExceptionContext onExceptionContext = OnExceptionContext.builder() + .messageId(cloudEvent.getId()) + .topic(cloudEvent.getSubject()) + .exception(new ConnectorRuntimeException(ex)) + .build(); sendCallback.onException(onExceptionContext); } } -// @Override -// public void request(CloudEvent cloudEvent, RequestReplyCallback rrCallback, long timeout) throws Exception { -// throw new ConnectorRuntimeException("Request is not supported"); -// } - public void request(CloudEvent cloudEvent, RequestReplyCallback rrCallback, long timeout) throws Exception { throw new ConnectorRuntimeException("Request is not supported"); } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/pub/cloudevents/SyncRequest.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/pub/cloudevents/SyncRequest.java index f80add3e44..c04d2a7a6a 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/pub/cloudevents/SyncRequest.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/pub/cloudevents/SyncRequest.java @@ -25,6 +25,7 @@ import org.apache.eventmesh.common.protocol.tcp.Package; import org.apache.eventmesh.common.protocol.tcp.UserAgent; import org.apache.eventmesh.tcp.common.EventMeshTestUtils; +import org.apache.eventmesh.util.Utils; import io.cloudevents.CloudEvent; import io.cloudevents.core.provider.EventFormatProvider; @@ -32,6 +33,7 @@ import lombok.extern.slf4j.Slf4j; import java.nio.charset.StandardCharsets; +import java.util.Properties; @Slf4j public class SyncRequest { @@ -39,10 +41,13 @@ public class SyncRequest { private static EventMeshTCPClient client; public static void main(String[] agrs) throws Exception { + Properties properties = Utils.readPropertiesFile("application.properties"); + final String eventMeshIp = properties.getProperty("eventmesh.ip"); + final int eventMeshTcpPort = Integer.parseInt(properties.getProperty("eventmesh.tcp.port")); UserAgent userAgent = EventMeshTestUtils.generateClient1(); EventMeshTCPClientConfig eventMeshTcpClientConfig = EventMeshTCPClientConfig.builder() - .host("127.0.0.1") - .port(10002) + .host(eventMeshIp) + .port(eventMeshTcpPort) .userAgent(userAgent) .build(); try { diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/AsyncSubscribe.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/AsyncSubscribe.java index 6e28a363a3..91f4eda6c8 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/AsyncSubscribe.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/AsyncSubscribe.java @@ -29,6 +29,7 @@ import org.apache.eventmesh.util.Utils; import java.nio.charset.StandardCharsets; +import java.util.Optional; import java.util.Properties; import io.cloudevents.CloudEvent; @@ -72,8 +73,9 @@ public static void main(String[] agrs) throws Exception { } @Override - public void handle(CloudEvent msg, ChannelHandlerContext ctx) { + public Optional handle(CloudEvent msg) { String content = new String(msg.getData().toBytes(), StandardCharsets.UTF_8); log.info("receive async msg====================={}|{}", msg, content); + return Optional.empty(); } } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/SyncResponse.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/SyncResponse.java index 75fe42cb45..d1753233f2 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/SyncResponse.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/cloudevents/SyncResponse.java @@ -29,12 +29,15 @@ import org.apache.eventmesh.common.protocol.tcp.Package; import org.apache.eventmesh.common.protocol.tcp.UserAgent; import org.apache.eventmesh.tcp.common.EventMeshTestUtils; +import org.apache.eventmesh.util.Utils; import io.cloudevents.CloudEvent; import io.netty.channel.ChannelHandlerContext; import lombok.extern.slf4j.Slf4j; import java.nio.charset.StandardCharsets; +import java.util.Optional; +import java.util.Properties; @Slf4j public class SyncResponse implements ReceiveMsgHook { @@ -44,10 +47,13 @@ public class SyncResponse implements ReceiveMsgHook { private static EventMeshTCPClient client; public static void main(String[] agrs) throws Exception { + Properties properties = Utils.readPropertiesFile("application.properties"); + final String eventMeshIp = properties.getProperty("eventmesh.ip"); + final int eventMeshTcpPort = Integer.parseInt(properties.getProperty("eventmesh.tcp.port")); UserAgent userAgent = EventMeshTestUtils.generateClient2(); EventMeshTCPClientConfig eventMeshTcpClientConfig = EventMeshTCPClientConfig.builder() - .host("127.0.0.1") - .port(10002) + .host(eventMeshIp) + .port(eventMeshTcpPort) .userAgent(userAgent) .build(); try { @@ -67,11 +73,10 @@ public static void main(String[] agrs) throws Exception { } @Override - public void handle(CloudEvent event, ChannelHandlerContext ctx) { + public Optional handle(CloudEvent event) { String content = new String(event.getData().toBytes(), StandardCharsets.UTF_8); log.info("receive sync rr msg================{}|{}", event, content); - Package pkg = MessageUtils.buildPackage(event, Command.RESPONSE_TO_SERVER); - ctx.writeAndFlush(pkg); + return Optional.of(event); } } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribe.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribe.java index 2efbbb889b..bb99cfc7f5 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribe.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribe.java @@ -29,6 +29,7 @@ import org.apache.eventmesh.tcp.common.EventMeshTestUtils; import org.apache.eventmesh.util.Utils; +import java.util.Optional; import java.util.Properties; import io.netty.channel.ChannelHandlerContext; @@ -73,7 +74,8 @@ public static void main(String[] agrs) throws Exception { } @Override - public void handle(EventMeshMessage msg, ChannelHandlerContext ctx) { + public Optional handle(EventMeshMessage msg) { log.info("receive async msg====================={}", msg); + return Optional.empty(); } } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribeBroadcast.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribeBroadcast.java index 63e4da5fdd..dfc58a5a62 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribeBroadcast.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/AsyncSubscribeBroadcast.java @@ -28,6 +28,7 @@ import org.apache.eventmesh.tcp.common.EventMeshTestUtils; import org.apache.eventmesh.util.Utils; +import java.util.Optional; import java.util.Properties; import io.netty.channel.ChannelHandlerContext; @@ -63,8 +64,9 @@ public static void main(String[] agrs) throws Exception { } @Override - public void handle(EventMeshMessage msg, ChannelHandlerContext ctx) { + public Optional handle(EventMeshMessage msg) { log.info("receive broadcast msg==============={}", msg); + return Optional.empty(); } } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/SyncResponse.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/SyncResponse.java index c097f7ef4f..e9606fa6ce 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/SyncResponse.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/tcp/demo/sub/eventmeshmessage/SyncResponse.java @@ -34,6 +34,8 @@ import lombok.extern.slf4j.Slf4j; import static org.apache.eventmesh.common.protocol.tcp.Command.RESPONSE_TO_SERVER; +import java.util.Optional; + @Slf4j public class SyncResponse implements ReceiveMsgHook { @@ -65,10 +67,9 @@ public static void main(String[] agrs) throws Exception { } @Override - public void handle(EventMeshMessage msg, ChannelHandlerContext ctx) { + public Optional handle(EventMeshMessage msg) { log.info("receive sync rr msg================{}", msg); - Package pkg = MessageUtils.buildPackage(msg, Command.RESPONSE_TO_SERVER); - ctx.writeAndFlush(pkg); + return Optional.ofNullable(msg); } } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/util/Utils.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/util/Utils.java index a20e1dcedc..63a93ba759 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/util/Utils.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/util/Utils.java @@ -17,6 +17,8 @@ package org.apache.eventmesh.util; +import org.apache.commons.lang3.SystemUtils; + import java.io.InputStream; import java.net.InetAddress; import java.net.NetworkInterface; @@ -46,13 +48,7 @@ public static String getLocalIP() throws UnknownHostException, SocketException { * @return */ public static boolean isWindowsOS() { - boolean isWindowsOS = false; - // JRE (runtime)system,not OS - String osName = System.getProperty("os.name"); - if (osName.toLowerCase().contains("windows")) { - isWindowsOS = true; - } - return isWindowsOS; + return SystemUtils.IS_OS_WINDOWS; } /** @@ -90,7 +86,7 @@ private static String getLinuxLocalIp() throws SocketException { /** * @param fileName - * @return + * @return Properties */ public static Properties readPropertiesFile(String fileName) { try (final InputStream inputStream = Utils.class.getClassLoader().getResourceAsStream(fileName)) { diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-api/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-api/build.gradle index 94459679ff..feb34b0d2f 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-api/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-api/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - implementation project(":eventmesh-spi") + api project(":eventmesh-spi") api project(":eventmesh-common") implementation "io.cloudevents:cloudevents-core" diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle index c23f92da4d..7f77c3db21 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - compileOnly project(":eventmesh-protocol-plugin:eventmesh-protocol-api") + implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api") implementation "io.cloudevents:cloudevents-core" implementation "com.google.guava:guava" implementation "io.cloudevents:cloudevents-json-jackson" diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle index 4a82353e6e..2b0455c35b 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - compileOnly project(":eventmesh-protocol-plugin:eventmesh-protocol-api") + implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api") implementation "io.cloudevents:cloudevents-core" testImplementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api") diff --git a/eventmesh-protocol-plugin/eventmesh-protocol-openmessage/build.gradle b/eventmesh-protocol-plugin/eventmesh-protocol-openmessage/build.gradle index 27c8997a1d..86065d7342 100644 --- a/eventmesh-protocol-plugin/eventmesh-protocol-openmessage/build.gradle +++ b/eventmesh-protocol-plugin/eventmesh-protocol-openmessage/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - compileOnly project(":eventmesh-protocol-plugin:eventmesh-protocol-api") + implementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api") implementation "io.cloudevents:cloudevents-core" implementation "io.openmessaging:openmessaging-api" diff --git a/eventmesh-registry-plugin/eventmesh-registry-api/build.gradle b/eventmesh-registry-plugin/eventmesh-registry-api/build.gradle index 594503e74f..0d410425ba 100644 --- a/eventmesh-registry-plugin/eventmesh-registry-api/build.gradle +++ b/eventmesh-registry-plugin/eventmesh-registry-api/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - implementation project(":eventmesh-spi") + api project(":eventmesh-spi") testImplementation project(":eventmesh-spi") } diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshCommon.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshCommon.java index 67cb316fb5..58b3008b1c 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshCommon.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshCommon.java @@ -19,46 +19,11 @@ public class EventMeshCommon { - /** - * Interval for printing thread pool status - */ - public static int PRINTTHREADPOOLSTATE_INTEVAL = 1; - - /** - * Interval between data reporting to logServer - */ - public static int LOGSERVER_INTEVAL = 1 * 60 * 1000; - /** * CLIENT heartbeat interval */ public static int HEARTBEAT = 30 * 1000; - /** - * Obsolete RR cleanup interval - */ - public static int REQUEST_CONTEXT_CLEAN_EXPIRE = 60 * 1000; - - /** - * Obsolete METRICS cleanup interval - */ - public static int METRICS_CLEAN_EXPIRE = 2 * 1000; - - /** - * Obsolete SESSION cleanup interval - */ - public static int SESSION_CLEAN_EXPIRE = 5 * 1000; - - /** - * Username used for EventMesh verification - */ - public static String EventMesh_USER = ""; - - /** - * Password used for EventMesh verification - */ - public static String EventMesh_PASS = ""; - /** * Timeout time shared by the server */ @@ -74,53 +39,6 @@ public class EventMeshCommon { */ public static String USER_AGENT_PURPOSE_SUB = "sub"; - /** - * Consumer group prefix of clustering consumers - */ - public static String PREFIX_CONSUMER_GROUP_CLUSTERING = "clustering"; - - /** - * Consumer group prefix of broadcasting consumers - */ - public static String PREFIX_CONSUMER_GROUP_BROADCASTING = "broadcast"; - - /** - * The specific IP address and port of the cluster where the RR messages are stored - */ - public static String KEY_RR_REQ_STROE_ADDRESS = "rr_req_store_addr"; - - /** - * MSGID of RR requests stored on WEMQ - */ - public static String KEY_RR_REQ_WEMQ_MSG_ID = "rr_req_wemq_msg_id"; - - /** - * If messages in multiple TOPICs are bypass messages, they will all be sent to C according to this TOPIC. If C - * matches this bq-bypass, it will be considered as bypass, and it will be parsed by bypass. - */ - public static String KEY_BYPASS_MSG_ORIGINAL_TOPIC = "original_topic"; - - /** - * Identification KEY: Client side queries server-level statistics of the server - */ - public static String KEY_QUERY_SERVER_STATISTICS = "server-statistic"; - - /** - * Identification KEY: Client side queries session-level statistics of the server - */ - public static String KEY_QUERY_SESSION_STATISTICS = "session-statistic"; - - /** - * Used to count SESSION TPS. Use prefixes to distinguish TPS of different types of messages. - */ - public static String PREFIX_SESSION_TPS_STAT_RRSEND = "rr_send_tps_"; - - public static String PREFIX_SESSION_TPS_STAT_RRREV = "rr_rev_tps_"; - - public static String PREFIX_SESSION_TPS_STAT_EVENTSEND = "event_send_tps_"; - - public static String PREFIX_SESSION_TPS_STAT_EVENTREV = "event_rev_tps_"; - // protocol type public static String CLOUD_EVENTS_PROTOCOL_NAME = "cloudevents"; public static String EM_MESSAGE_PROTOCOL_NAME = "eventmeshmessage"; diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshThreadFactoryImpl.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshThreadFactoryImpl.java deleted file mode 100644 index 49692baa92..0000000000 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/EventMeshThreadFactoryImpl.java +++ /dev/null @@ -1,49 +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.client.tcp.common; - -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicLong; - -public class EventMeshThreadFactoryImpl implements ThreadFactory { - private final AtomicLong threadIndex = new AtomicLong(0); - private final String threadNamePrefix; - private Boolean isDaemonSpecified = null; - - public EventMeshThreadFactoryImpl(final String threadNamePrefix) { - this.threadNamePrefix = threadNamePrefix; - } - - public EventMeshThreadFactoryImpl(final String threadNamePrefix, final boolean isDaemonSpecified) { - this.threadNamePrefix = threadNamePrefix; - this.isDaemonSpecified = isDaemonSpecified; - } - - public String getThreadNamePrefix() { - return threadNamePrefix; - } - - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(r, threadNamePrefix + '-' + this.threadIndex.incrementAndGet()); - if (isDaemonSpecified != null) { - t.setDaemon(isDaemonSpecified); - } - return t; - } -} \ No newline at end of file diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java index 3110dccdb8..802f038bb2 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/common/ReceiveMsgHook.java @@ -17,7 +17,7 @@ package org.apache.eventmesh.client.tcp.common; -import io.netty.channel.ChannelHandlerContext; +import java.util.Optional; /** * ReceiveMsgHook. @@ -26,6 +26,13 @@ */ @FunctionalInterface public interface ReceiveMsgHook { - void handle(ProtocolMessage msg, ChannelHandlerContext ctx); + + /** + * Handle the received message, return the response message. + * + * @param msg + * @return + */ + Optional handle(ProtocolMessage msg); } diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPPubHandler.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPPubHandler.java index af8d1266e2..4eca20e98f 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPPubHandler.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPPubHandler.java @@ -40,7 +40,7 @@ public AbstractEventMeshTCPPubHandler(ConcurrentHashMap } @Override - protected void channelRead0(ChannelHandlerContext ctx, Package msg) throws Exception { + protected void channelRead0(ChannelHandlerContext ctx, Package msg) { log.info("SimplePubClientImpl|receive|msg={}", msg); Preconditions.checkNotNull(msg.getHeader(), "Tcp package header cannot be null"); diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPPubClient.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPPubClient.java index e30186d72a..13262d50b9 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPPubClient.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPPubClient.java @@ -33,6 +33,8 @@ import java.nio.charset.StandardCharsets; import java.util.concurrent.ConcurrentHashMap; +import com.google.common.base.Preconditions; + import io.cloudevents.CloudEvent; import io.cloudevents.core.format.EventFormat; import io.cloudevents.core.provider.EventFormatProvider; @@ -40,8 +42,6 @@ import io.netty.channel.ChannelHandlerContext; import lombok.extern.slf4j.Slf4j; -import com.google.common.base.Preconditions; - /** * A CloudEvent TCP publish client implementation. */ @@ -147,7 +147,8 @@ public CloudEventTCPPubHandler(ConcurrentHashMap context @Override public void callback(CloudEvent cloudEvent, ChannelHandlerContext ctx) { if (callback != null) { - callback.handle(cloudEvent, ctx); + callback.handle(cloudEvent) + .ifPresent(responseMessage -> ctx.writeAndFlush(MessageUtils.buildPackage(responseMessage, Command.RESPONSE_TO_SERVER))); } } diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPSubClient.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPSubClient.java index 4e86d0f970..068e86daff 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPSubClient.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPSubClient.java @@ -17,7 +17,6 @@ package org.apache.eventmesh.client.tcp.impl.cloudevent; -import org.apache.eventmesh.client.tcp.impl.AbstractEventMeshTCPSubHandler; import org.apache.eventmesh.client.tcp.EventMeshTCPSubClient; import org.apache.eventmesh.client.tcp.common.EventMeshCommon; import org.apache.eventmesh.client.tcp.common.MessageUtils; @@ -25,10 +24,12 @@ import org.apache.eventmesh.client.tcp.common.RequestContext; import org.apache.eventmesh.client.tcp.common.TcpClient; import org.apache.eventmesh.client.tcp.conf.EventMeshTCPClientConfig; +import org.apache.eventmesh.client.tcp.impl.AbstractEventMeshTCPSubHandler; import org.apache.eventmesh.common.exception.EventMeshException; import org.apache.eventmesh.common.protocol.SubscriptionItem; import org.apache.eventmesh.common.protocol.SubscriptionMode; import org.apache.eventmesh.common.protocol.SubscriptionType; +import org.apache.eventmesh.common.protocol.tcp.Command; import org.apache.eventmesh.common.protocol.tcp.Package; import org.apache.commons.collections4.CollectionUtils; @@ -155,7 +156,9 @@ public CloudEvent getProtocolMessage(Package tcpPackage) { @Override public void callback(CloudEvent cloudEvent, ChannelHandlerContext ctx) { if (callback != null) { - callback.handle(cloudEvent, ctx); + callback.handle(cloudEvent).ifPresent( + responseMessage -> ctx.writeAndFlush(MessageUtils.buildPackage(responseMessage, Command.RESPONSE_TO_SERVER)) + ); } } diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPPubClient.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPPubClient.java index 063c17bf16..ae189f252c 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPPubClient.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPPubClient.java @@ -147,7 +147,9 @@ public EventMeshTCPPubHandler(ConcurrentHashMap contexts @Override public void callback(EventMeshMessage eventMeshMessage, ChannelHandlerContext ctx) { if (callback != null) { - callback.handle(eventMeshMessage, ctx); + callback.handle(eventMeshMessage).ifPresent( + responseMessage -> ctx.writeAndFlush(MessageUtils.buildPackage(responseMessage, Command.RESPONSE_TO_SERVER)) + ); } } diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java index 276caef37b..c03894d21f 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPSubClient.java @@ -17,7 +17,6 @@ package org.apache.eventmesh.client.tcp.impl.eventmeshmessage; -import org.apache.eventmesh.client.tcp.impl.AbstractEventMeshTCPSubHandler; import org.apache.eventmesh.client.tcp.EventMeshTCPSubClient; import org.apache.eventmesh.client.tcp.common.EventMeshCommon; import org.apache.eventmesh.client.tcp.common.MessageUtils; @@ -25,10 +24,12 @@ import org.apache.eventmesh.client.tcp.common.RequestContext; import org.apache.eventmesh.client.tcp.common.TcpClient; import org.apache.eventmesh.client.tcp.conf.EventMeshTCPClientConfig; +import org.apache.eventmesh.client.tcp.impl.AbstractEventMeshTCPSubHandler; import org.apache.eventmesh.common.exception.EventMeshException; import org.apache.eventmesh.common.protocol.SubscriptionItem; import org.apache.eventmesh.common.protocol.SubscriptionMode; import org.apache.eventmesh.common.protocol.SubscriptionType; +import org.apache.eventmesh.common.protocol.tcp.Command; import org.apache.eventmesh.common.protocol.tcp.EventMeshMessage; import org.apache.eventmesh.common.protocol.tcp.Package; import org.apache.eventmesh.common.utils.JsonUtils; @@ -141,7 +142,9 @@ public EventMeshMessage getProtocolMessage(Package tcpPackage) { @Override public void callback(EventMeshMessage eventMeshMessage, ChannelHandlerContext ctx) { if (callback != null) { - callback.handle(eventMeshMessage, ctx); + callback.handle(eventMeshMessage).ifPresent( + responseMessage -> ctx.writeAndFlush(MessageUtils.buildPackage(responseMessage, Command.RESPONSE_TO_SERVER)) + ); } } diff --git a/eventmesh-security-plugin/eventmesh-security-acl/build.gradle b/eventmesh-security-plugin/eventmesh-security-acl/build.gradle index af9362ecd9..1ee3c750ab 100644 --- a/eventmesh-security-plugin/eventmesh-security-acl/build.gradle +++ b/eventmesh-security-plugin/eventmesh-security-acl/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - compileOnly project(":eventmesh-security-plugin:eventmesh-security-api") + implementation project(":eventmesh-security-plugin:eventmesh-security-api") testImplementation project(":eventmesh-security-plugin:eventmesh-security-api") } diff --git a/eventmesh-security-plugin/eventmesh-security-api/build.gradle b/eventmesh-security-plugin/eventmesh-security-api/build.gradle index 594503e74f..0d410425ba 100644 --- a/eventmesh-security-plugin/eventmesh-security-api/build.gradle +++ b/eventmesh-security-plugin/eventmesh-security-api/build.gradle @@ -16,7 +16,7 @@ */ dependencies { - implementation project(":eventmesh-spi") + api project(":eventmesh-spi") testImplementation project(":eventmesh-spi") } diff --git a/eventmesh-spi/build.gradle b/eventmesh-spi/build.gradle index 0911a87ff9..4980522b47 100644 --- a/eventmesh-spi/build.gradle +++ b/eventmesh-spi/build.gradle @@ -15,7 +15,7 @@ * limitations under the License. */ dependencies { - compileOnly project(":eventmesh-common") + implementation project(":eventmesh-common") implementation "org.apache.commons:commons-collections4" testImplementation project(":eventmesh-common") } \ No newline at end of file diff --git a/style/checkStyle.xml b/style/checkStyle.xml index 410df51a73..f3fe5630d2 100644 --- a/style/checkStyle.xml +++ b/style/checkStyle.xml @@ -314,15 +314,6 @@ - - - - - - - -