瀏覽代碼

remove rocketmq

MaxKey 2 年之前
父節點
當前提交
f29df46ac4

+ 0 - 8
build.gradle

@@ -298,14 +298,6 @@ subprojects {
          implementation group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
          // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
          implementation group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
-         //rocketmq
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-common', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-remoting', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-logging', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-client', version: "${rocketmqclientVersion}"
-         // https://mvnrepository.com/artifact/org.apache.rocketmq/rocketmq-spring-boot
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot', version: "${rocketmqspringbootVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot-starter', version: "${rocketmqspringbootVersion}"
 
          //saml see maxkey-lib
          //implementation group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"

+ 0 - 8
config/build_docker.gradle

@@ -259,14 +259,6 @@ subprojects {
          implementation group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
          // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
          implementation group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
-         //rocketmq
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-common', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-remoting', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-logging', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-client', version: "${rocketmqclientVersion}"
-         // https://mvnrepository.com/artifact/org.apache.rocketmq/rocketmq-spring-boot
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot', version: "${rocketmqspringbootVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot-starter', version: "${rocketmqspringbootVersion}"
          
          //saml see maxkey-lib
          //implementation group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"

+ 1 - 9
config/build_jar.gradle

@@ -259,15 +259,7 @@ subprojects {
          implementation group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
          // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
          implementation group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
-         //rocketmq
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-common', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-remoting', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-logging', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-client', version: "${rocketmqclientVersion}"
-         // https://mvnrepository.com/artifact/org.apache.rocketmq/rocketmq-spring-boot
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot', version: "${rocketmqspringbootVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot-starter', version: "${rocketmqspringbootVersion}"
-         
+
          //saml see maxkey-lib
          //implementation group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"
          //implementation group: 'org.opensaml', name: 'openws', version: "${openwsVersion}"

+ 1 - 9
config/build_standard.gradle

@@ -295,15 +295,7 @@ subprojects {
          implementation group: 'org.apache.kafka', name: 'kafka-clients', version: "${kafkaclientsVersion}"
          // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
          implementation group: 'org.springframework.kafka', name: 'spring-kafka', version: "${springkafkaVersion}"
-         //rocketmq
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-common', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-remoting', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-logging', version: "${rocketmqclientVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-client', version: "${rocketmqclientVersion}"
-         // https://mvnrepository.com/artifact/org.apache.rocketmq/rocketmq-spring-boot
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot', version: "${rocketmqspringbootVersion}"
-         implementation group: 'org.apache.rocketmq', name: 'rocketmq-spring-boot-starter', version: "${rocketmqspringbootVersion}"
-         
+
          //saml see maxkey-lib
          //implementation group: 'org.opensaml', name: 'opensaml', version: "${opensamlVersion}"
          //implementation group: 'org.opensaml', name: 'openws', version: "${openwsVersion}"

+ 3 - 9
maxkey-persistence/src/main/java/org/maxkey/persistence/mq/MessageQueueService.java

@@ -19,10 +19,8 @@ package org.maxkey.persistence.mq;
 
 import java.util.UUID;
 
-import org.apache.rocketmq.spring.core.RocketMQTemplate;
 import org.maxkey.configuration.ApplicationConfig;
 import org.maxkey.persistence.mq.thread.KafkaProvisioningThread;
-import org.maxkey.persistence.mq.thread.RocketMQProvisioningThread;
 import org.maxkey.util.DateUtils;
 import org.maxkey.util.JsonUtils;
 import org.slf4j.Logger;
@@ -40,9 +38,6 @@ public class MessageQueueService {
     
     @Autowired
     protected KafkaTemplate<String, String> kafkaTemplate;
-    
-    @Autowired
-    private RocketMQTemplate rocketMQTemplate;
 
     public void setApplicationConfig(ApplicationConfig applicationConfig) {
         this.applicationConfig = applicationConfig;
@@ -63,7 +58,7 @@ public class MessageQueueService {
      * @param actionType CREATE UPDATE DELETE
      */
     public void send(String topic,Object content,String actionType) {
-        //maxkey.server.message.queue , if not none , Kafka , RocketMQ
+        //maxkey.server.message.queue , if not none , Kafka
         if(applicationConfig.isMessageQueueSupport()) {
             MqMessage message = 
             		new MqMessage(
@@ -79,9 +74,8 @@ public class MessageQueueService {
             if(applicationConfig.getMessageQueue().equalsIgnoreCase("Kafka")) {
             	_logger.trace("Kafka message...");
             	thread = new  KafkaProvisioningThread(kafkaTemplate,topic,msg);
-            }else if(applicationConfig.getMessageQueue().equalsIgnoreCase("RocketMQ")) {
-            	_logger.trace("RocketMQ message...");
-            	thread = new  RocketMQProvisioningThread(rocketMQTemplate,topic,msg);
+            }else{
+            	_logger.trace("no send message...");
             }
             thread.start();
         }

+ 0 - 54
maxkey-persistence/src/main/java/org/maxkey/persistence/mq/thread/RocketMQProvisioningThread.java

@@ -1,54 +0,0 @@
-/*
- * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
- * Licensed 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.maxkey.persistence.mq.thread;
-
-import org.apache.rocketmq.spring.core.RocketMQTemplate;
-import org.maxkey.pretty.PrettyFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.messaging.support.MessageBuilder;
-
-/**
- * RocketMQ Provisioning Thread for send message
- *
- */
-public class RocketMQProvisioningThread extends Thread{
-
-	private static final Logger _logger = LoggerFactory.getLogger(RocketMQProvisioningThread.class);
-			
-	RocketMQTemplate rocketMQTemplate;
-    
-    String topic ;
-    
-    String msg;
-    
-    public RocketMQProvisioningThread(
-    						RocketMQTemplate rocketMQTemplate, 
-                            String topic, 
-                            String msg) {
-        this.rocketMQTemplate = rocketMQTemplate;
-        this.topic = topic;
-        this.msg = msg;
-    }
-
-    @Override
-    public void run() {
-    	_logger.debug("send message \n{}" , PrettyFactory.getJsonPretty().format(msg));
-    	rocketMQTemplate.syncSend(topic, MessageBuilder.withPayload(msg).build());
-        _logger.debug("send to Message Queue finished .");
-    }
-}