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

   ### Is Your Feature Request Related to a Problem?
   
   spring boot :
   `   @Bean
       public Consumer getCommonConsumer()  {
           Consumer consumer;
           try {
               Properties consumerProperties = rocketConfig.getProperties();
               consumerProperties.setProperty(PropertyKeyConst.GROUP_ID, 
rocketConfig.getCommonGroupId());
               log.info("rocketConfig{}",rocketConfig);
               consumer = ONSFactory.createConsumer(consumerProperties);
               String tags = ConsumerTags.getTags();
               consumer.subscribe(rocketConfig.getTopicsCommon(), tags, 
commonConsumeListenerHandle);
               consumer.start();
           }catch (Exception e){
               log.error("consumer is fail !!! 
condumerId:{},topics:{},namesrvAddr:{}",rocketConfig.getCommonGroupId(),rocketConfig.getONSAddress(),e);
               throw new RuntimeException(e);
           }
           return consumer;
       }`
   
   `  RocketConfig
       @Value("${ali.access.key.id}")
       private String aliAccessKeyId;
       @Value("${ali.access.key.secret}")
       private String aliAccessKeySecret;
   
      public Properties getProperties(){
           Properties producerProperties = new Properties();
           producerProperties.setProperty(PropertyKeyConst.AccessKey, 
this.aliAccessKeyId);
           producerProperties.setProperty(PropertyKeyConst.SecretKey, 
this.aliAccessKeySecret);
           producerProperties.setProperty(PropertyKeyConst.NAMESRV_ADDR, 
this.ONSAddress);
           return producerProperties;
       }
   `
   Why does spring boot not verify AccessKey and aliAccessKeySecret during 
startup? It will cause the groupId of Alibaba Cloud rocket console.
   
   Can't find the registered consumer, cause the producer to push the message, 
the message will always be in mq, will be checked when sent, or am I wrong?
   
    
   
   
   ### Describe the Solution You'd Like
   
   Check AccessKey and SecretKey at startup to throw an exception ahead of time
   
   ### Describe Alternatives You've Considered
   
   Check AccessKey and SecretKey at startup to throw an exception ahead of time
   
   ### 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