Sunw730 opened a new issue, #9195:
URL: https://github.com/apache/rocketmq/issues/9195

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [x] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [x] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   生产端:Windows11
   消费端:Windows11
   服务端:CentOS Linux 7 (Core)
   
   ### RocketMQ version
   
   生产端/消费端:org.apache.rocketmq:rocketmq-client:4.7.1
   服务端:rocketmq server 4.7.1
   
   ### JDK Version
   
   OpenJDK:zulu-11
   
   ### Describe the Bug
   
   生产端发送批量消息 MessageBatch 时,通过 putUserProperty 方法设置了属性值(内部的 List<Message> 
都设置了相同的属性值),
   消费端接收到的消息中没有获取到自定义的属性值。
   
   ### Steps to Reproduce
   
   1. 生产端:
   ```java
   // step 1
   messageBatch.putUserProperty("name", "value");
   messageBatch.forEach(message -> message.putUserProperty("name", "value"));
   producer.send(messageBatch);
   ``` 
   
   2. 消费端:
   ```java
   consumer.registerMessageListener((MessageListenerConcurrently) (messages, 
context) -> {
       messages.forEach(message -> {
           // step 2
           System.out.println(message.getUserProperty("name"));
       });
   });
   ```
   
   ### What Did You Expect to See?
   
   我希望 step 2 能输出字符串 `value`
   
   ### What Did You See Instead?
   
   目前 step 2 处实际输出的是 `null`
   
   ### Additional Context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to