{
// we synchronize just in case a failed request is still processing
synchronized (consumer)
{
Acknowledgement ack = consumer.getAck();
if (ack == null || ack.wasSet())
{
AcknowledgedQueueConsumer.setAcknowledgeNextLink(serviceManager.getLinkStrategy(), builder, uriInfo, uriInfo.getMatchedURIs().get(1) + "/acknowledged/" + consumer.getId(), Long.toString(consumer.getConsumeIndex()));
}
else
{