ActiveMQConnection connection = null;
try {
connection = (ActiveMQConnection) connectionFactory.createConnection();
RedeliveryPolicy policy = connection.getRedeliveryPolicy();
policy.setMaximumRedeliveries(6);
policy.setInitialRedeliveryDelay(1000);
policy.setUseCollisionAvoidance(false);
policy.setCollisionAvoidancePercent((short) 15);
policy.setUseExponentialBackOff(false);
policy.setBackOffMultiplier((short) 5);
connection.setClientID(getClientId());
connection.setExceptionListener(this);
connection.start();