}
private static RedeliveryProcessor populateRedeliveryProcessor(OMElement element,
MessageStore messageStore) {
RedeliveryProcessor redeliveryProcessor = new RedeliveryProcessor(messageStore);
OMElement intervalElm = element.getFirstChildWithName(DELAY_Q);
if (intervalElm != null) {
int delay = 1000 * Integer.parseInt(intervalElm.getText());
redeliveryProcessor.setRedeliveryDelay(delay);
}
OMElement maxRedeliveryElm = element.getFirstChildWithName(MAX_REDELIVERIES);
if (maxRedeliveryElm != null) {
int maxRedeliveries = Integer.parseInt(maxRedeliveryElm.getText());
redeliveryProcessor.setMaxRedeleveries(maxRedeliveries);
}
OMElement expBOElm = element.getFirstChildWithName(ENABLE_EXPONENTIAL_BACKOFF);
if (expBOElm != null) {
if (JavaUtils.isTrueExplicitly(expBOElm.getText())) {
redeliveryProcessor.setExponentialBackoff(true);
OMElement multiplierElm = element.getFirstChildWithName(BACKOFF_MULTIPLIER);
if (multiplierElm != null) {
int mulp = Integer.parseInt(multiplierElm.getText());
redeliveryProcessor.setBackOffMultiplier(mulp);
}
}
}
return redeliveryProcessor;