Skip to content
Permalink
Browse files

Upgrade rocketmq to 4.5.1

  • Loading branch information...
javahongxi committed Jun 10, 2019
1 parent 038efe1 commit bebad20ed3fb2e6cd3bc580ab617e0e02b0d37b7
@@ -52,7 +52,7 @@
<javassist.version>3.24.1-GA</javassist.version>
<mybatis.version>3.4.5</mybatis.version>
<mybatis-spring.version>1.3.1</mybatis-spring.version>
<rocketmq.version>4.3.2</rocketmq.version>
<rocketmq.version>4.5.1</rocketmq.version>
<swagger2.version>2.5.0</swagger2.version>
<zkclient.version>0.9</zkclient.version>
</properties>
@@ -9,6 +9,7 @@
@Service
@RocketMQMessageListener(topic = "test-topic-1", consumerGroup = "my-consumer_test-topic-1")
public class MyConsumer implements RocketMQListener<String> {
@Override
public void onMessage(String message) {
log.info("received message: " + message);
}
@@ -10,6 +10,7 @@
@Service
@RocketMQMessageListener(topic = "test-topic-2", consumerGroup = "my-consumer_test-topic-2")
public class MyConsumer2 implements RocketMQListener<OrderPaidEvent> {
@Override
public void onMessage(OrderPaidEvent orderPaidEvent) {
log.info("received orderPaidEvent: " + orderPaidEvent);
}
@@ -15,6 +15,7 @@
@Service
@RocketMQMessageListener(nameServer = "${trade.mq.nameServer}", instanceName = "${trade.mq.clusterName}", topic = "test-topic-3", consumerGroup = "my-consumer_test-topic-3")
public class MyConsumer3 implements RocketMQListener<String> {
@Override
public void onMessage(String message) {
log.info("received message: " + message);
}
@@ -14,6 +14,7 @@
@RocketMQMessageListener(topic = "test-topic-4", consumerGroup = "my-consumer_test-topic-4",
consumeMode = ConsumeMode.ORDERLY)
public class MyConsumer4 implements RocketMQListener<String> {
@Override
public void onMessage(String message) {
log.info("received message: " + message);
int a = 1 / 0;
@@ -15,6 +15,7 @@
@RocketMQMessageListener(topic = "test-topic-4", consumerGroup = "my-consumer_test-topic-5",
consumeMode = ConsumeMode.ORDERLY, reconsumeTimes = 3)
public class MyConsumer5 implements RocketMQListener<MessageExt> {
@Override
public void onMessage(MessageExt messageExt) {
log.info("received message: " + messageExt);
int a = 1 / 0;
@@ -29,6 +29,7 @@ public void run(String... args) throws Exception {
for (int i = 0; i < 5; i++) {
try {
rocketMQTemplate.convertAndSend("test-topic-1", "Hello, World!");
System.out.println("Send OK!");
} catch (Exception e) {
e.printStackTrace();
}

0 comments on commit bebad20

Please sign in to comment.
You can’t perform that action at this time.