KevinBlandy opened a new issue #3293:
URL: https://github.com/apache/rocketmq/issues/3293


   
   
   I want to determine at the beginning of the program whether the MQ service 
is working or not.
   
   I constructed an error address message and called the `start()` method, but 
no exception was thrown and there was no hint. Everything seems to be fine.
   
   ```java
   import org.apache.rocketmq.client.exception.MQClientException;
   import org.apache.rocketmq.client.producer.DefaultMQProducer;
   
   public class MQTest {
        
        public static void main(String[] args) throws MQClientException {
                
                DefaultMQProducer producer = new DefaultMQProducer("default");
                producer.setNamesrvAddr("undefinde:-1");
                
                producer.start();               
                
        }
   }
   
   ```
   
   I didn't find any other methods like `ping()`, `createConn()` either.
   
   The current solution is to try to send a message to a Topic that does not 
exist and then determine if the service is available based on the exception 
message.
   
   But this doesn't seem elegant enough, is there a good solution?
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to