private String generateConsumerID() throws Exception {
        String pidName = ManagementFactory.getRuntimeMXBean().getName();
        if (pidName != null && pidName.contains("@")) {
            pidName = pidName.split("@")[0];
        }
        StringBuilder strBuffer = new StringBuilder(256)
                .append(this.consumerConfig.getConsumerGroup())
                .append("_").append(AddressUtils.getLocalAddress())
                .append("-").append(pidName)
                .append("-").append(System.nanoTime())
                .append("-").append(Math.abs(sRandom.nextInt()));
        if (this.isPullConsume) {
            strBuffer.append("-Pull-");
        } else {
            strBuffer.append("-Push-");
        }
        return strBuffer.append(TubeClientVersion.CONSUMER_VERSION).toString();
    }
Generate consumer id.

@return consumer id
@throws Exception
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/consumer/BaseMessageConsumer.java