diff --git a/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/RocketMQConfigUtils.java b/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/RocketMQConfigUtils.java deleted file mode 100644 index e69244f33d125874c48562badf58feab89d300b9..0000000000000000000000000000000000000000 --- a/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/RocketMQConfigUtils.java +++ /dev/null @@ -1,29 +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.rocketmq.spring.starter; - -public class RocketMQConfigUtils { - /** - * The bean name of the internally managed RocketMQ transaction annotation processor. - */ - public static final String ROCKETMQ_TRANSACTION_ANNOTATION_PROCESSOR_BEAN_NAME = - "org.springframework.rocketmq.spring.starter.internalRocketMQTransAnnotationProcessor"; - - public static final String ROCKETMQ_TRANSACTION_DEFAULT_GLOBAL_NAME = - "rocketmq_transaction_default_global_name"; -} diff --git a/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/annotation/RocketMQTransactionListener.java b/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/annotation/RocketMQTransactionListener.java deleted file mode 100644 index 1646091bea03d0563ff08465652c73b5d61f8451..0000000000000000000000000000000000000000 --- a/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/annotation/RocketMQTransactionListener.java +++ /dev/null @@ -1,69 +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.rocketmq.spring.starter.annotation; - -import org.apache.rocketmq.spring.starter.RocketMQConfigUtils; -import org.springframework.stereotype.Component; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * This annotation is used over a class which implements interface - * org.apache.rocketmq.client.producer.TransactionListener. The class implements - * two methods for process callback events after the txProducer sends a transactional message. - *

Note: The annotation is used only on RocketMQ client producer side, it can not be used - * on consumer side. - */ -@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Component -public @interface RocketMQTransactionListener { - - /** - * Declare the txProducerGroup that is used to relate callback event to the listener, rocketMQTemplate must send a - * transactional message with the declared txProducerGroup. - *

- *

It is suggested to use the default txProducerGroup if your system only needs to define a TransactionListener class. - */ - String txProducerGroup() default RocketMQConfigUtils.ROCKETMQ_TRANSACTION_DEFAULT_GLOBAL_NAME; - - /** - * Set ExecutorService params -- corePoolSize - */ - int corePoolSize() default 1; - - /** - * Set ExecutorService params -- maximumPoolSize - */ - int maximumPoolSize() default 1; - - /** - * Set ExecutorService params -- keepAliveTime - */ - long keepAliveTime() default 1000 * 60; //60ms - - /** - * Set ExecutorService params -- blockingQueueSize - */ - int blockingQueueSize() default 2000; -} diff --git a/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/core/RocketMQTemplate.java b/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/core/RocketMQTemplate.java index b67fdedf2cd771be41ccaa94b9b4f3b39e7a71af..348863ba9600b33eecf52e367970522369b41fe3 100644 --- a/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/core/RocketMQTemplate.java +++ b/whatsmars-mq/rocketmq-spring-boot-starter/src/main/java/org/apache/rocketmq/spring/starter/core/RocketMQTemplate.java @@ -22,7 +22,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import java.nio.charset.Charset; import java.util.Map; import java.util.Objects; -import java.util.concurrent.ConcurrentHashMap; import lombok.Getter; import lombok.Setter; @@ -33,7 +32,6 @@ import org.apache.rocketmq.client.producer.SendCallback; import org.apache.rocketmq.client.producer.SendResult; import org.apache.rocketmq.client.producer.selector.SelectMessageQueueByHash; import org.apache.rocketmq.common.message.MessageConst; -import org.apache.rocketmq.spring.starter.RocketMQConfigUtils; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.messaging.Message;