/** * Remove all pending acknowledgement markers that are batched into the single * client acknowledge operation. * * @param subscription * The STOMP Subscription that has performed a client acknowledge. * @param msgIdsToRemove * List of message IDs that are bound to the subscription that has ack'd */ protected void afterClientAck(StompSubscription subscription, ArrayList<String> msgIdsToRemove) { int count = 0; for (Map.Entry<String,AckEntry> entry : this.pedingAcks.entrySet()){ AckEntry actEntry = entry.getValue(); if (msgIdsToRemove.contains(actEntry.messageId)) { this.pedingAcks.remove(entry.getKey()); count++; } } LOG.trace("Subscription:[{}] client acknowledged {} messages", subscription.getSubscriptionId(), count); } }
/** * Remove all pending acknowledgement markers that are batched into the single * client acknowledge operation. * * @param subscription * The STOMP Subscription that has performed a client acknowledge. * @param msgIdsToRemove * List of message IDs that are bound to the subscription that has ack'd */ protected void afterClientAck(StompSubscription subscription, ArrayList<String> msgIdsToRemove) { int count = 0; for (Map.Entry<String,AckEntry> entry : this.pedingAcks.entrySet()){ AckEntry actEntry = entry.getValue(); if (msgIdsToRemove.contains(actEntry.messageId)) { this.pedingAcks.remove(entry.getKey()); count++; } } LOG.trace("Subscription:[{}] client acknowledged {} messages", subscription.getSubscriptionId(), count); } }
/** * Remove all pending acknowledgement markers that are batched into the single * client acknowledge operation. * * @param subscription * The STOMP Subscription that has performed a client acknowledge. * @param msgIdsToRemove * List of message IDs that are bound to the subscription that has ack'd */ protected void afterClientAck(StompSubscription subscription, ArrayList<String> msgIdsToRemove) { int count = 0; for (Map.Entry<String,AckEntry> entry : this.pedingAcks.entrySet()){ AckEntry actEntry = entry.getValue(); if (msgIdsToRemove.contains(actEntry.messageId)) { this.pedingAcks.remove(entry.getKey()); count++; } } LOG.trace("Subscription:[{}] client acknowledged {} messages", subscription.getSubscriptionId(), count); } }
if ((subscriptionId != null && subscriptionId.equals(sub.getSubscriptionId())) || (destination != null && destination.equals(sub.getDestination()))) { sendToActiveMQ(sub.getConsumerInfo().createRemoveCommand(), createResponseHandler(command)); iter.remove();