├── static
└── img
│ ├── img.png
│ ├── logo.png
│ └── wx.jpg
├── mq-idempotent-core
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ ├── wh
│ │ │ │ └── com.mq.idempotent.core.alert.strategy.AlertStrategy
│ │ │ │ └── spring.factories
│ │ └── java
│ │ │ └── com
│ │ │ └── mq
│ │ │ └── idempotent
│ │ │ └── core
│ │ │ ├── constants
│ │ │ └── RedisConstants.java
│ │ │ ├── utils
│ │ │ ├── Matcher.java
│ │ │ ├── Func0.java
│ │ │ ├── ThreadFactoryImpl.java
│ │ │ ├── TransactionUtil.java
│ │ │ ├── ReflectUtil.java
│ │ │ ├── SimpleCache.java
│ │ │ └── ArrayUtil.java
│ │ │ ├── exception
│ │ │ └── MessageConcurrencyException.java
│ │ │ ├── alert
│ │ │ ├── strategy
│ │ │ │ ├── AlertStrategy.java
│ │ │ │ ├── AlertProperties.java
│ │ │ │ ├── AlertStrategyFactory.java
│ │ │ │ └── LarkAlarmStrategy.java
│ │ │ └── AlertDTO.java
│ │ │ ├── strategy
│ │ │ ├── IdempotentStrategy.java
│ │ │ ├── impl
│ │ │ │ ├── JDBCIdempotentStrategy.java
│ │ │ │ └── RedisIdempotentStrategy.java
│ │ │ └── AbstractIdempotentStrategy.java
│ │ │ ├── spi
│ │ │ ├── ExtensionFactory.java
│ │ │ ├── Join.java
│ │ │ ├── SpiExtensionFactory.java
│ │ │ ├── SPI.java
│ │ │ └── ExtensionLoader.java
│ │ │ ├── aop
│ │ │ ├── MessageConverter.java
│ │ │ ├── MqIdempotentAnnotationInterceptor.java
│ │ │ └── MqIdempotentAnnotationAdvisor.java
│ │ │ ├── annotation
│ │ │ └── Idempotent.java
│ │ │ ├── config
│ │ │ └── IdempotentProperties.java
│ │ │ ├── model
│ │ │ └── IdempotentConfig.java
│ │ │ └── autoconfigure
│ │ │ └── MqIdempotentAutoConfiguration.java
│ └── test
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── wh
│ │ │ └── com.mq.idempotent.core.alert.strategy.AlertStrategy
│ │ └── java
│ │ └── com
│ │ └── mq
│ │ └── idempotent
│ │ └── core
│ │ └── alert
│ │ └── strategy
│ │ ├── AlertStrategyFactoryTest.java
│ │ └── LarkAlarmStrategyTests.java
└── pom.xml
├── mq-idempotent-spring-boot-starter
├── mq-idempotent-spring-boot-starter-rabbitmq
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── mq
│ │ │ └── idempotent
│ │ │ └── rabbitmq
│ │ │ └── converter
│ │ │ └── RabbitMQConverter.java
│ └── pom.xml
├── mq-idempotent-spring-boot-starter-rocketmq
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── mq
│ │ │ └── idempotent
│ │ │ └── rocketmq
│ │ │ └── converter
│ │ │ └── RocketMQMessageConverter.java
│ └── pom.xml
├── mq-idempotent-spring-boot-starter-aliyun-rocketmq
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── spring.factories
│ │ │ └── java
│ │ │ └── com
│ │ │ └── mq
│ │ │ └── idempotent
│ │ │ └── aliyun
│ │ │ └── rocketmq
│ │ │ └── converter
│ │ │ └── AliYunRocketMQMessageConverter.java
│ └── pom.xml
└── pom.xml
├── mq-idempotent-samples
├── springboot-aliyun-rocketmq
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ ├── test.sql
│ │ │ ├── mybatis
│ │ │ │ └── TestMapper.xml
│ │ │ └── application.yml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── samples
│ │ │ ├── mapper
│ │ │ └── TestMapper.java
│ │ │ ├── Application.java
│ │ │ ├── entity
│ │ │ └── TestDO.java
│ │ │ ├── config
│ │ │ ├── RedisConfig.java
│ │ │ ├── AliyunMQConfig.java
│ │ │ └── MybatisPlusConfig.java
│ │ │ └── consumer
│ │ │ └── MessageEventHandler.java
│ └── pom.xml
├── springboot-rabbitmq
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── application.yml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── rabbitmq
│ │ │ ├── message
│ │ │ └── TestMessage.java
│ │ │ ├── Application.java
│ │ │ ├── constants
│ │ │ └── RabbitMQConstants.java
│ │ │ ├── consumer
│ │ │ └── RabbitMQConsumer.java
│ │ │ ├── config
│ │ │ ├── DirectRabbitConfig.java
│ │ │ └── RedisConfig.java
│ │ │ └── controller
│ │ │ └── SendMessageController.java
│ └── pom.xml
├── springboot-rocketmq
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ └── application.yml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── samples
│ │ │ ├── Application.java
│ │ │ ├── consumer
│ │ │ └── MessageEventHandler.java
│ │ │ ├── config
│ │ │ ├── RedisConfig.java
│ │ │ └── MQConfig.java
│ │ │ └── controller
│ │ │ └── SendMessageController.java
│ └── pom.xml
└── pom.xml
├── dev-support
├── license-header
└── spotless_mq-idempotent_formatter.xml
├── .gitignore
├── README.md
├── README_en.md
├── pom.xml
├── mq-idempotent-dependencies
└── pom.xml
└── LICENSE
/static/img/img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weihubeats/mq-idempotent/HEAD/static/img/img.png
--------------------------------------------------------------------------------
/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weihubeats/mq-idempotent/HEAD/static/img/logo.png
--------------------------------------------------------------------------------
/static/img/wx.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weihubeats/mq-idempotent/HEAD/static/img/wx.jpg
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/resources/META-INF/wh/com.mq.idempotent.core.alert.strategy.AlertStrategy:
--------------------------------------------------------------------------------
1 | lark = com.mq.idempotent.core.alert.strategy.LarkAlarmStrategy
--------------------------------------------------------------------------------
/mq-idempotent-core/src/test/resources/META-INF/wh/com.mq.idempotent.core.alert.strategy.AlertStrategy:
--------------------------------------------------------------------------------
1 | lark = com.mq.idempotent.core.alert.strategy.LarkAlarmStrategy
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.mq.idempotent.core.autoconfigure.MqIdempotentAutoConfiguration
3 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-rabbitmq/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.mq.idempotent.rabbitmq.converter.RabbitMQConverter
3 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-rocketmq/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.mq.idempotent.rocketmq.converter.RocketMQMessageConverter
3 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/src/main/resources/test.sql:
--------------------------------------------------------------------------------
1 | create table test
2 | (
3 | id bigserial
4 | constraint test_pk
5 | primary key,
6 | msg text,
7 | add_time timestamp default CURRENT_TIMESTAMP not null
8 | );
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rabbitmq/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8080
3 | spring:
4 | application:
5 | name: rabbitmq
6 | rabbitmq:
7 | host: 192.168.111.117
8 | port: 5672
9 | username: guest
10 | password: guest
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-aliyun-rocketmq/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | com.mq.idempotent.aliyun.rocketmq.converter.AliYunRocketMQMessageConverter
3 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rocketmq/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: rocketmq
4 |
5 | server:
6 | port: 9001
7 |
8 |
9 |
10 | idempotent:
11 | redisKey: "mq::unique::"
12 | redisValue : "ss"
13 | tryLockTime: 2
14 | redisTimeOut: 3
15 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/src/main/resources/mybatis/TestMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | application:
3 | name: idempotent
4 | profiles:
5 | active: dev
6 |
7 | db:
8 | pg:
9 | connectionTestQuery: select 1
10 | jdbcUrl: 127.0.0.1:1921/plutus
11 | password: test
12 | username: 123456
13 |
14 |
--------------------------------------------------------------------------------
/dev-support/license-header:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | io.github.weihubeats
8 | mq-idempotent
9 | ${revision}
10 | ../pom.xml
11 |
12 |
13 | mq-idempotent-spring-boot-starter
14 | pom
15 |
16 |
17 | mq-idempotent-spring-boot-starter-rocketmq
18 | mq-idempotent-spring-boot-starter-aliyun-rocketmq
19 | mq-idempotent-spring-boot-starter-rabbitmq
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | io.github.weihubeats
8 | mq-idempotent
9 | ${revision}
10 | ../pom.xml
11 |
12 |
13 | mq-idempotent-samples
14 | pom
15 |
16 |
17 | springboot-aliyun-rocketmq
18 | springboot-rocketmq
19 | springboot-rabbitmq
20 |
21 |
22 |
23 | true
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-rocketmq/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | io.github.weihubeats
7 | mq-idempotent-spring-boot-starter
8 | ${revision}
9 | ../pom.xml
10 |
11 |
12 | mq-idempotent-spring-boot-starter-rocketmq
13 |
14 |
15 |
16 | org.apache.rocketmq
17 | rocketmq-client
18 |
19 |
20 | io.github.weihubeats
21 | mq-idempotent-core
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-rabbitmq/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | io.github.weihubeats
7 | mq-idempotent-spring-boot-starter
8 | ${revision}
9 | ../pom.xml
10 |
11 |
12 | mq-idempotent-spring-boot-starter-rabbitmq
13 |
14 |
15 | 11
16 | 11
17 |
18 |
19 |
20 |
21 | io.github.weihubeats
22 | mq-idempotent-core
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-aliyun-rocketmq/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | io.github.weihubeats
7 | mq-idempotent-spring-boot-starter
8 | ${revision}
9 | ../pom.xml
10 |
11 |
12 | mq-idempotent-spring-boot-starter-aliyun-rocketmq
13 |
14 |
15 |
16 | com.aliyun.openservices
17 | ons-client
18 |
19 |
20 | io.github.weihubeats
21 | mq-idempotent-core
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/constants/RedisConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.constants;
19 |
20 | /**
21 | * @author : wh
22 | * @date : 2021/11/4 16:06
23 | * @description: redis常量
24 | */
25 | public interface RedisConstants {
26 |
27 | String KEY = "mq:unique:";
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rocketmq/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | io.github.weihubeats
7 | mq-idempotent-samples
8 | ${revision}
9 |
10 |
11 | springboot-rocketmq
12 |
13 |
14 | 8
15 | 8
16 |
17 |
18 |
19 |
20 | io.github.weihubeats
21 | mq-idempotent-spring-boot-starter-rocketmq
22 |
23 |
24 | org.springframework.boot
25 | spring-boot-starter-web
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 |
11 | # Packages #
12 | ############
13 | # it's better to unpack these files and commit the raw source
14 | # git has its own built in compression methods
15 | *.7z
16 | *.dmg
17 | *.gz
18 | *.iso
19 | *.jar
20 | *.rar
21 | *.tar
22 | *.zip
23 | *.war
24 | *.del
25 | *.pmd
26 | .tern-project
27 |
28 |
29 | # Logs and databases #
30 | ######################
31 | *.log
32 | *.log.*
33 | # OS generated files #
34 | ######################
35 | .DS_Store*
36 | ehthumbs.db
37 | Icon?
38 | Thumbs.db
39 |
40 |
41 | # Editor Files #
42 | ################
43 | *~
44 | *.swp
45 |
46 |
47 | # Gradle Files #
48 | ################
49 | .gradle
50 |
51 |
52 | # Build output directies
53 | /target
54 | */target
55 | /build
56 | */build
57 |
58 |
59 | # IntelliJ specific files/directories
60 | out
61 | .idea
62 | *.ipr
63 | *.iws
64 | *.iml
65 | atlassian-ide-plugin.xml
66 |
67 |
68 | # Eclipse specific files/directories
69 | .classpath
70 | .project
71 | .settings
72 | .metadata
73 | .myeclipse
74 |
75 |
76 | # NetBeans specific files/directories
77 | .nbattrs
78 |
79 | *.mymetadata
80 | /logs
81 | */logs
82 | /cache
83 | */cache
84 |
85 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/utils/Matcher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.utils;
19 |
20 | /**
21 | * @author : wh
22 | * @date : 2022/1/12 11:52
23 | * @description:
24 | */
25 | @FunctionalInterface
26 | public interface Matcher {
27 |
28 | /**
29 | * 给定对象是否匹配
30 | *
31 | * @param t 对象
32 | * @return 是否匹配
33 | */
34 | boolean match(T t);
35 | }
36 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/exception/MessageConcurrencyException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.exception;
19 |
20 | /**
21 | * @author : wh
22 | * @date : 2022/3/12 17:50
23 | * @description:
24 | */
25 | public class MessageConcurrencyException extends RuntimeException {
26 |
27 | public MessageConcurrencyException(String message) {
28 | super(message);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rabbitmq/src/main/java/com/rabbitmq/message/TestMessage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.rabbitmq.message;
19 |
20 | import lombok.Data;
21 |
22 | import java.io.Serializable;
23 |
24 | /**
25 | * @author : wh
26 | * @date : 2022/1/12 13:44
27 | * @description:
28 | */
29 | @Data
30 | public class TestMessage implements Serializable {
31 |
32 | private Integer id;
33 |
34 | private String msg;
35 | }
36 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/alert/strategy/AlertStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.alert.strategy;
19 |
20 | import com.mq.idempotent.core.alert.AlertDTO;
21 | import com.mq.idempotent.core.spi.SPI;
22 |
23 | /**
24 | * @author : wh
25 | * @date : 2022/6/15 18:04
26 | * @description:
27 | */
28 | @SPI
29 | public interface AlertStrategy {
30 |
31 | boolean sendMsg(AlertDTO alertDTO);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/src/main/java/com/samples/mapper/TestMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.samples.mapper;
19 |
20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
21 | import com.samples.entity.TestDO;
22 | import org.apache.ibatis.annotations.Mapper;
23 |
24 | /**
25 | *@author : wh
26 | *@date : 2022/7/20 14:27
27 | *@description:
28 | */
29 | @Mapper
30 | public interface TestMapper extends BaseMapper {
31 | }
32 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rabbitmq/src/main/java/com/rabbitmq/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.rabbitmq;
19 |
20 | import org.springframework.boot.SpringApplication;
21 | import org.springframework.boot.autoconfigure.SpringBootApplication;
22 |
23 | @SpringBootApplication
24 | public class Application {
25 |
26 | public static void main(String[] args) {
27 | SpringApplication.run(Application.class, args);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rocketmq/src/main/java/com/samples/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.samples;
19 |
20 | import org.springframework.boot.SpringApplication;
21 | import org.springframework.boot.autoconfigure.SpringBootApplication;
22 |
23 | @SpringBootApplication
24 | public class Application {
25 |
26 | public static void main(String[] args) {
27 | SpringApplication.run(Application.class, args);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/src/main/java/com/samples/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.samples;
19 |
20 | import org.springframework.boot.SpringApplication;
21 | import org.springframework.boot.autoconfigure.SpringBootApplication;
22 |
23 | @SpringBootApplication
24 | public class Application {
25 |
26 | public static void main(String[] args) {
27 | SpringApplication.run(Application.class, args);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rabbitmq/src/main/java/com/rabbitmq/constants/RabbitMQConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.rabbitmq.constants;
19 |
20 | /**
21 | * @author : wh
22 | * @date : 2022/1/11 19:45
23 | * @description:
24 | */
25 | public interface RabbitMQConstants {
26 |
27 | String QUEUE_NAME = "TestQueue";
28 |
29 | String TEST_DIRECT_EXCHANGE = "TestDirectExchange";
30 |
31 | String ROUTING_KEY = "TestDirectRouting";
32 | }
33 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/strategy/IdempotentStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.strategy;
19 |
20 | /**
21 | * @author : wh
22 | * @date : 2022/3/12 18:03
23 | * @description:
24 | */
25 | public interface IdempotentStrategy {
26 |
27 | boolean lock(String lockName);
28 |
29 | void save(String uniqueKey);
30 |
31 | void unlock(String lockName);
32 |
33 | boolean exitKey(String key);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/alert/strategy/AlertProperties.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.alert.strategy;
19 |
20 | import lombok.Data;
21 |
22 | /**
23 | * @author : wh
24 | * @date : 2022/6/16 17:12
25 | * @description:
26 | */
27 | @Data
28 | public class AlertProperties {
29 |
30 | private String webHook;
31 |
32 | private String template;
33 |
34 | /**
35 | * 是否@所有人
36 | */
37 | private boolean atAll;
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/alert/strategy/AlertStrategyFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.alert.strategy;
19 |
20 | import com.mq.idempotent.core.spi.ExtensionLoader;
21 |
22 | /**
23 | * @author : wh
24 | * @date : 2022/6/15 18:07
25 | * @description:
26 | */
27 | public class AlertStrategyFactory {
28 |
29 | public static AlertStrategy newInstance(final String alertStrategyName) {
30 | return ExtensionLoader.getExtensionLoader(AlertStrategy.class).getJoin(alertStrategyName);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/spi/ExtensionFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.spi;
19 |
20 | /**
21 | * @author : wh
22 | * @date : 2022/6/15 15:52
23 | * @description:
24 | */
25 | @SPI("spi")
26 | public interface ExtensionFactory {
27 |
28 | /**
29 | * Gets Extension.
30 | *
31 | * @param the type parameter
32 | * @param key the key
33 | * @param clazz the clazz
34 | * @return the extension
35 | */
36 | T getExtension(String key, Class clazz);
37 | }
38 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/spi/Join.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.spi;
19 |
20 | import java.lang.annotation.Documented;
21 | import java.lang.annotation.ElementType;
22 | import java.lang.annotation.Retention;
23 | import java.lang.annotation.RetentionPolicy;
24 | import java.lang.annotation.Target;
25 |
26 | /**
27 | * Join
28 | * Adding this annotation to a class indicates joining the extension mechanism.
29 | *
30 | */
31 | @Documented
32 | @Retention(RetentionPolicy.RUNTIME)
33 | @Target(ElementType.TYPE)
34 | public @interface Join {
35 | }
36 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/aop/MessageConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.aop;
19 |
20 | import java.lang.reflect.Method;
21 |
22 | /**
23 | * @author : wh
24 | * @date : 2021/11/15 13:51
25 | * @description: 消息转换器
26 | */
27 | public interface MessageConverter {
28 |
29 | /**
30 | *
31 | * @param t 消息
32 | * @param field 注解 Idempotent 中的 field值
33 | * @param method 被拦截方法
34 | * @param args 被拦截方法参数
35 | * @return
36 | */
37 | String getUniqueKey(T t, String field, Method method, Object[] args);
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/src/main/java/com/samples/entity/TestDO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.samples.entity;
19 |
20 | import com.baomidou.mybatisplus.annotation.IdType;
21 | import com.baomidou.mybatisplus.annotation.TableId;
22 | import com.baomidou.mybatisplus.annotation.TableName;
23 | import lombok.Data;
24 |
25 | /**
26 | *@author : wh
27 | *@date : 2022/7/20 14:26
28 | *@description:
29 | */
30 | @TableName("test")
31 | @Data
32 | public class TestDO {
33 |
34 | @TableId(type = IdType.AUTO)
35 | private Long id;
36 |
37 | private String msg;
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/test/java/com/mq/idempotent/core/alert/strategy/AlertStrategyFactoryTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.alert.strategy;
19 |
20 | import org.junit.jupiter.api.Test;
21 |
22 | import static org.junit.jupiter.api.Assertions.assertTrue;
23 |
24 | /**
25 | * @author : wh
26 | * @date : 2022/6/15 18:17
27 | * @description:
28 | */
29 | public class AlertStrategyFactoryTest {
30 |
31 | @Test
32 | public void test() {
33 | AlertStrategy lark = AlertStrategyFactory.newInstance("lark");
34 | assertTrue(lark instanceof LarkAlarmStrategy);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-rabbitmq/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | io.github.weihubeats
7 | mq-idempotent-samples
8 | ${revision}
9 |
10 |
11 | springboot-rabbitmq
12 |
13 |
14 | 8
15 | 8
16 |
17 |
18 |
19 |
20 | org.springframework.boot
21 | spring-boot-starter-amqp
22 |
23 |
24 | org.springframework.boot
25 | spring-boot-starter-web
26 |
27 |
28 | com.alibaba
29 | fastjson
30 | 1.2.83
31 |
32 |
33 |
34 | io.github.weihubeats
35 | mq-idempotent-spring-boot-starter-rabbitmq
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/mq-idempotent-samples/springboot-aliyun-rocketmq/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | 4.0.0
6 |
7 | io.github.weihubeats
8 | mq-idempotent-samples
9 | ${revision}
10 |
11 |
12 | springboot-aliyun-rocketmq
13 |
14 |
15 |
16 | org.springframework.boot
17 | spring-boot-starter-web
18 | true
19 |
20 |
21 | org.springframework.boot
22 | spring-boot-starter
23 |
24 |
25 |
26 | io.github.weihubeats
27 | mq-idempotent-spring-boot-starter-aliyun-rocketmq
28 |
29 |
30 |
31 | org.postgresql
32 | postgresql
33 |
34 |
35 |
36 | com.baomidou
37 | mybatis-plus-boot-starter
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/annotation/Idempotent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.annotation;
19 |
20 | import java.lang.annotation.*;
21 |
22 | /**
23 | * @author : wh
24 | * @date : 2021/11/12 11:27
25 | * @description:
26 | */
27 | @Target({ElementType.METHOD})
28 | @Retention(RetentionPolicy.RUNTIME)
29 | @Documented
30 | public @interface Idempotent {
31 |
32 | /**
33 | * idempotent property
34 | * @return
35 | */
36 | String field() default "msgId";
37 |
38 | /**
39 | * 是否开启并发锁控制
40 | * @return
41 | */
42 | boolean lock() default true;
43 |
44 | /**
45 | * 是否开启事务
46 | * @return
47 | */
48 | boolean transactional() default false;
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/mq-idempotent-core/src/main/java/com/mq/idempotent/core/alert/AlertDTO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.core.alert;
19 |
20 | import java.lang.reflect.Method;
21 |
22 | import lombok.AllArgsConstructor;
23 | import lombok.Data;
24 | import lombok.NoArgsConstructor;
25 |
26 | /**
27 | *@author : wh
28 | *@date : 2022/7/19 14:27
29 | *@description:
30 | */
31 | @Data
32 | @AllArgsConstructor
33 | @NoArgsConstructor
34 | public class AlertDTO {
35 |
36 | /**
37 | * 唯一key
38 | */
39 | private String key;
40 |
41 | /**
42 | * 方法
43 | */
44 | private Method method;
45 |
46 | /**
47 | * 异常
48 | */
49 | private Throwable throwable;
50 |
51 | /**
52 | * 报警url
53 | */
54 | private String webHook;
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/mq-idempotent-spring-boot-starter/mq-idempotent-spring-boot-starter-rabbitmq/src/main/java/com/mq/idempotent/rabbitmq/converter/RabbitMQConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.mq.idempotent.rabbitmq.converter;
19 |
20 | import java.lang.reflect.Method;
21 |
22 | import com.mq.idempotent.core.aop.MessageConverter;
23 | import com.mq.idempotent.core.utils.ReflectUtil;
24 |
25 | /**
26 | * @author : wh
27 | * @date : 2022/1/12 11:11
28 | * @description:
29 | */
30 | public class RabbitMQConverter implements MessageConverter