final int NUM_MESSAGES = 10;
final int NUM_MESSAGES = 30;
   public void testRedeliveryOnTopic() throws Exception   {      Connection conn = cf.createConnection();            conn.setClientID("myclientid");            Session sess1 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);      MessageConsumer cons1 = sess1.createConsumer(topic);            Session sess2 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);      MessageConsumer cons2= sess2.createConsumer(topic);            Session sess3 = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);      MessageConsumer cons3= sess3.createDurableSubscriber(topic, "subxyz");            conn.start();            final int NUM_MESSAGES = 10;            final int NUM_RECOVERIES = 8;            Receiver r1 = new Receiver();      r1.cons = cons1;      r1.numMessages = NUM_MESSAGES;      r1.sess = sess1;      r1.numRecoveries = NUM_RECOVERIES;            Receiver r2 = new Receiver();      r2.cons = cons2;      r2.numMessages = NUM_MESSAGES;      r2.sess = sess2;      r2.numRecoveries = NUM_RECOVERIES;            Receiver r3 = new Receiver();      r3.cons = cons3;      r3.numMessages = NUM_MESSAGES;      r3.sess = sess3;      r3.numRecoveries = NUM_RECOVERIES;            Thread t1 = new Thread(r1);            Thread t2 = new Thread(r2);            Thread t3 = new Thread(r3);            t1.start();            t2.start();            t3.start();            Session sessSend = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);            MessageProducer prod = sessSend.createProducer(topic);            prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);                  for (int i = 0; i < NUM_MESSAGES; i++)      {         TextMessage tm1 = sessSend.createTextMessage("testing" + i);         prod.send(tm1);      }            t1.join();            t2.join();            t3.join();                  assertFalse(r1.failed);            assertFalse(r2.failed);            assertFalse(r3.failed);         }