Here you can find the source of genMsgId()
public static String genMsgId()
//package com.java2s; import java.util.Random; import java.util.UUID; public class Main { private static Random r = new Random(); public static String genMsgId() { return UUID.randomUUID().toString() + r.nextInt(10); }//from w w w . ja va2 s . c o m }