Source:
<code>private void startConsumer() throws ShutdownSignalException, IOException { connection = getConnection(); if (channel == null || !channel.isOpen()) { channel = connection.createChannel(); log.debug("Channel is not open. Creating a new channel for inbound " + inboundName); } if (queueingConsumer == null) { workerState = STATE_STOPPED; return; } while (isActive()) { RabbitMQMessage message; try { if (!channel.isOpen()) { channel = queueingConsumer.getChannel(); } message = getConsumerDelivery(queueingConsumer); } catch (InterruptedException | ShutdownSignalException | ConsumerCancelledException e) { log.warn("Exception occurred while consuming the message", e); continue; } if (message != null) { idle = false; RabbitMQAckStates ackState = RabbitMQAckStates.REJECT_AND_REQUEUE; boolean mediationError = false; try { ackState = injectHandler.invokeAndReturnAckState(message, inboundName); } catch (Exception e) { <START> ackState = RabbitMQAckStates.REJECT_AND_REQUEUE; <END> mediationError = true; log.error("Error while mediating message", e); } finally { if (!autoAck) { if (ackState == RabbitMQAckStates.ACK) { try { channel.basicAck(message.getDeliveryTag(), false); } catch (IOException e) { log.error("Error while sending an ack to the message", e); } } else { try { channel.basicReject(message.getDeliveryTag(), ackState == RabbitMQAckStates.REJECT_AND_REQUEUE); } catch (IOException e) { log.error("Error while rejecting the unacked message", e); } } } } if (mediationError) { try { Thread.sleep(2000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { idle = true; } } }</code><technical_language>need evaluate of property, 'SET_REQUEUE_ON_ROLLBACK'. WDYT</technical_language>

Target:
private void startConsumer() throws ShutdownSignalException, IOException { connection = getConnection(); if (channel == null || !channel.isOpen()) { channel = connection.createChannel(); log.debug("Channel is not open. Creating a new channel for inbound " + inboundName); } if (queueingConsumer == null) { workerState = STATE_STOPPED; return; } while (isActive()) { RabbitMQMessage message; try { if (!channel.isOpen()) { channel = queueingConsumer.getChannel(); } message = getConsumerDelivery(queueingConsumer); } catch (InterruptedException | ShutdownSignalException | ConsumerCancelledException e) { log.warn("Exception occurred while consuming the message", e); continue; } if (message != null) { idle = false; RabbitMQAckStates ackState = RabbitMQAckStates.REJECT_AND_REQUEUE; States states; boolean mediationError; try { states = injectHandler.invokeAndReturnAckState(message, inboundName); ackState = states.ackState; mediationError = states.mediationError; } finally { if (!autoAck) { if (ackState == RabbitMQAckStates.ACK) { try { channel.basicAck(message.getDeliveryTag(), false); } catch (IOException e) { log.error("Error while acknowledging the message", e); } } else { try { channel.basicReject(message.getDeliveryTag(), ackState == RabbitMQAckStates.REJECT_AND_REQUEUE); } catch (IOException e) { log.error("Error while rejecting the unacked message", e); } } } } if (mediationError) { try { Thread.sleep(2000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { idle = true; } } }