Here you can find the source of generateClientId()
static String generateClientId()
//package com.java2s; //License from project: Amazon Software License import java.util.UUID; public class Main { /**/* w w w .ja v a2 s . c om*/ * Generates a random UUID suitable for use as MQTT client ID. MQTT clients * in the same AWS account require a unique client ID for each * simulataneously connected client. This routine generates UUIDs which can * be considered "practically unique". See: * https://en.wikipedia.org/wiki/Universally_unique_identifier Each call to * this routine will return a different UUID. * * @return 36 character UUID string. */ static String generateClientId() { return UUID.randomUUID().toString(); } }