0 Replies Latest reply on Apr 24, 2009 1:42 AM by Yong Hao Gao

    queue-message-redistribution minor change

    Yong Hao Gao Master

      I got NullPointerException when run all examples together. The problem lies between
      line 146 -- line 151:

      for (int i = 0; i < numMessages; i += 2)
      {
      message0 = (TextMessage)consumer0.receive(5000); //--> possible got null message due to time delay over 5 sec.

      System.out.println("Got message: " + message0.getText() + " from node 0"); //--> NPE
      }

      So I will change the receive(5000) to receive().