MartinDai opened a new issue #143: RocketMQLocalTransactionListener auto config 
not support placeholder value
URL: https://github.com/apache/rocketmq-spring/issues/143
 
 
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   ### Here is part of my config code and yml
   
   **ClearUserTransactionListener.java**
   ```
   @Component
   @RocketMQTransactionListener(txProducerGroup = 
"${rocketmq.producer.txGroup}")
   public class ClearUserTransactionListener implements 
RocketMQLocalTransactionListener {
   
   //other code
   
   }
   ```
   **application.yml**
   ```
   rocketmq:
     producer:
       txGroup: clearUserGroup
   ```
   
   - What did you expect to see?
   
   When the ClearUserTransactionListener is initialized,The value of field 
```txProducerGroup``` will be replaced by ```clearUserGroup```.
    
   
   - What did you see instead?
   
   **Initialization exception**
   
   ```
   Caused by: org.apache.rocketmq.client.exception.MQClientException: the 
specified group[${rocketmq.producer.txGroup}] contains illegal characters, 
allowing only ^[%|a-zA-Z0-9_-]+$
   For more information, please visit the url, 
http://rocketmq.apache.org/docs/faq/
        at org.apache.rocketmq.client.Validators.checkGroup(Validators.java:57)
        at 
org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.checkConfig(DefaultMQProducerImpl.java:217)
        at 
org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.start(DefaultMQProducerImpl.java:176)
        at 
org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.start(DefaultMQProducerImpl.java:168)
        at 
org.apache.rocketmq.client.producer.DefaultMQProducer.start(DefaultMQProducer.java:231)
        at 
org.apache.rocketmq.client.producer.TransactionMQProducer.start(TransactionMQProducer.java:48)
        at 
org.apache.rocketmq.spring.core.RocketMQTemplate.createAndStartTransactionMQProducer(RocketMQTemplate.java:584)
   ```
   
   2. Please tell us about your environment:
   spring-boot-starter-parent:2.1.4.RELEASE
   rocketmq-spring-boot-starter:2.0.2
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to