for (int i = 0; i < count - 1; i++) {
message = consumer.receive(4000);
assertNotNull("got message", message);
assertTrue("is redelivered", message.getJMSRedelivered());
}
message.acknowledge();
session.close();
con.close();
con = createConnection(clientId);
session = con.createSession(false, Session.CLIENT_ACKNOWLEDGE);