TextMessage msg = (TextMessage)message; try { System.out.println("Message Received:" + msg.getText()); } catch (JMSException e) { System.out.println(e.getMessage()); }