List of usage examples for com.rabbitmq.client Channel clearConfirmListeners
void clearConfirmListeners();
From source file:org.mule.transport.amqp.DefaultAmqpConfirmsManager.java
License:Open Source License
public boolean awaitConfirm(Channel channel, MuleEvent event, long timeout, TimeUnit timeUnit) { try {/*from ww w.j a va2s. c o m*/ if (!handlesConfirms()) { return true; } Long seqNo = event.getFlowVariable(AmqpConstants.NEXT_PUBLISH_SEQ_NO); if (seqNo == null) { throw new IllegalStateException("Event is missing publish sequence number"); } ConfirmHandler confirmHandler = pendingConfirms.get(seqNo); if (confirmHandler != null) { return confirmHandler.awaitConfirmation(timeout, timeUnit); } else { return false; } } finally { channel.clearConfirmListeners(); } }
From source file:org.mule.transport.amqp.internal.confirm.DefaultConfirmsManager.java
License:Open Source License
public boolean awaitConfirm(Channel channel, MuleEvent event, long timeout, TimeUnit timeUnit) { try {/*from w ww. j a v a 2 s . co m*/ if (!handlesConfirms()) { return true; } Long seqNo = event.getFlowVariable(AmqpConnector.MESSAGE_PROPERTY_NEXT_PUBLISH_SEQ_NO); if (seqNo == null) { throw new IllegalStateException("Event is missing publish sequence number"); } ConfirmHandler confirmHandler = pendingConfirms.get(seqNo); if (confirmHandler != null) { return confirmHandler.awaitConfirmation(timeout, timeUnit); } else { return false; } } finally { channel.clearConfirmListeners(); } }