in ons-core/ons-client/src/main/java/org/apache/rocketmq/ons/api/impl/rocketmq/ONSClientAbstract.java [208:225]
protected void checkONSProducerServiceState(DefaultMQProducerImpl producer) {
switch (producer.getServiceState()) {
case CREATE_JUST:
throw new ONSClientException(
FAQ.errorMessage(String.format("You do not have start the producer[" + getPid() + "], %s", producer.getServiceState()),
FAQ.SERVICE_STATE_WRONG));
case SHUTDOWN_ALREADY:
throw new ONSClientException(FAQ.errorMessage(String.format("Your producer has been shut down, %s", producer.getServiceState()),
FAQ.SERVICE_STATE_WRONG));
case START_FAILED:
throw new ONSClientException(FAQ.errorMessage(
String.format("When you start your service throws an exception, %s", producer.getServiceState()), FAQ.SERVICE_STATE_WRONG));
case RUNNING:
break;
default:
break;
}
}