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

   ### 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
   
   Ubuntu 24.04
   
   ### RocketMQ version
   
   5.3.0
   
   ### JDK Version
   
   1.8.0
   
   ### Describe the Bug
   
   Start the DefaultMQPushConsumer with wrong nameserver address, consumer 
threads are still running after start fail.
   
   ### Steps to Reproduce
   
   start the DefaultMQPushConsumer with wrong nameserver address:
   ```
       public static void main(String[] args) throws InterruptedException, 
MQClientException {
           DefaultMQPushConsumer consumer = new 
DefaultMQPushConsumer("consumerGroup");
           consumer.setNamesrvAddr("1.0.0.1:9876");
           consumer.subscribe("test", "*");
           consumer.registerMessageListener((MessageListenerConcurrently) 
(msgs, context) -> {
               return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
           });
           try {
               consumer.start();
           } catch (Exception e) {
               e.printStackTrace();
               System.out.printf("state: %s", 
consumer.getDefaultMQPushConsumerImpl().getServiceState());
           }
       }
   ```
   
   
   ### What Did You Expect to See?
   
   1、the consumer.start() method throws exception.
   2、the state of getDefaultMQPushConsumerImpl is running.
   3、the consumer threads "PullMessageService", "RebalaceService" are running, 
so the process will not exit after main function exits.
   
   ### What Did You See Instead?
   
   1、the consumer.start() method throws exception.
   2、the state of getDefaultMQPushConsumerImpl is not running.
   3、the consumer threads are not running.
   
   ### 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