Here you can find the source of getMessageId()
public static String getMessageId()
//package com.java2s; //License from project: Apache License import java.util.concurrent.atomic.AtomicLong; public class Main { private static AtomicLong sequence = new AtomicLong(0); public static String getMessageId() { return String.valueOf(sequence.getAndIncrement()); }//from ww w .j a v a 2s . c o m }