You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2019/06/04 09:32:54 UTC

[rocketmq-spring] branch master updated: Set the correct transaction id identification key for subsequent operations. (#82)

This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-spring.git


The following commit(s) were added to refs/heads/master by this push:
     new 813f0d8  Set the correct transaction id identification key for subsequent operations. (#82)
813f0d8 is described below

commit 813f0d8100f9da98e12b947d7ff43062afe4e3eb
Author: lookcoder <19...@users.noreply.github.com>
AuthorDate: Tue Jun 4 04:32:49 2019 -0500

    Set the correct transaction id identification key for subsequent operations. (#82)
    
    * Set the correct transaction id identification key for subsequent operations.
---
 .../org/apache/rocketmq/samples/springboot/ProducerACLApplication.java  | 2 +-
 .../org/apache/rocketmq/samples/springboot/ProducerApplication.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rocketmq-spring-boot-samples/rocketmq-produce-acl-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerACLApplication.java b/rocketmq-spring-boot-samples/rocketmq-produce-acl-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerACLApplication.java
index 1c40354..498c2e1 100644
--- a/rocketmq-spring-boot-samples/rocketmq-produce-acl-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerACLApplication.java
+++ b/rocketmq-spring-boot-samples/rocketmq-produce-acl-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerACLApplication.java
@@ -74,7 +74,7 @@ public class ProducerACLApplication implements CommandLineRunner {
             try {
 
                 Message msg = MessageBuilder.withPayload("Hello RocketMQ " + i).
-                    setHeader(RocketMQHeaders.KEYS, "KEY_" + i).build();
+                    setHeader(RocketMQHeaders.TRANSACTION_ID, "KEY_" + i).build();
                 SendResult sendResult = rocketMQTemplate.sendMessageInTransaction(TX_PGROUP_NAME,
                     springTransTopic + ":" + tags[i % tags.length], msg, null);
                 System.out.printf("------ send Transactional msg body = %s , sendResult=%s %n",
diff --git a/rocketmq-spring-boot-samples/rocketmq-produce-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerApplication.java b/rocketmq-spring-boot-samples/rocketmq-produce-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerApplication.java
index 9e49170..8ab42e1 100644
--- a/rocketmq-spring-boot-samples/rocketmq-produce-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerApplication.java
+++ b/rocketmq-spring-boot-samples/rocketmq-produce-demo/src/main/java/org/apache/rocketmq/samples/springboot/ProducerApplication.java
@@ -122,7 +122,7 @@ public class ProducerApplication implements CommandLineRunner {
             try {
 
                 Message msg = MessageBuilder.withPayload("Hello RocketMQ " + i).
-                    setHeader(RocketMQHeaders.KEYS, "KEY_" + i).build();
+                    setHeader(RocketMQHeaders.TRANSACTION_ID, "KEY_" + i).build();
                 SendResult sendResult = rocketMQTemplate.sendMessageInTransaction(TX_PGROUP_NAME,
                     springTransTopic + ":" + tags[i % tags.length], msg, null);
                 System.out.printf("------ send Transactional msg body = %s , sendResult=%s %n",