code: public MessageId newMessageId() {
          /*
           * use database sequence convert into hex representation or if not using
           * database using random
           */
          try {
              synchronized (random) {
                  return new MessageId(Integer.toString(random.nextInt(Integer.MAX_VALUE), 16));
              }
          } catch (PDUStringException e) {
              throw new RuntimeException("Failed creating message id", e);
          }
      }
docs: /* (non-Javadoc)
  @see org.jsmpp.util.MessageIDGenerator#newMessageId()