@Override public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception { Subscription sub = consumerExchange.getSubscription(); if (sub == null) { sub = subscriptions.get(ack.getConsumerId()); if (sub == null) { if (!consumerExchange.getConnectionContext().isInRecoveryMode()) { LOG.warn("Ack for non existent subscription, ack: {}", ack); throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId()); } else { LOG.debug("Ack for non existent subscription in recovery, ack: {}", ack); return; } } consumerExchange.setSubscription(sub); } sub.acknowledge(consumerExchange.getConnectionContext(), ack); }
@Override public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception { Subscription sub = consumerExchange.getSubscription(); if (sub == null) { sub = subscriptions.get(ack.getConsumerId()); if (sub == null) { if (!consumerExchange.getConnectionContext().isInRecoveryMode()) { LOG.warn("Ack for non existent subscription, ack: {}", ack); throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId()); } else { LOG.debug("Ack for non existent subscription in recovery, ack: {}", ack); return; } } consumerExchange.setSubscription(sub); } sub.acknowledge(consumerExchange.getConnectionContext(), ack); }
public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception { Subscription sub = consumerExchange.getSubscription(); if (sub == null) { sub = subscriptions.get(ack.getConsumerId()); if (sub == null) { if (!consumerExchange.getConnectionContext().isInRecoveryMode()) { LOG.warn("Ack for non existent subscription, ack:" + ack); throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId()); } else { LOG.debug("Ack for non existent subscription in recovery, ack:" + ack); return; } } consumerExchange.setSubscription(sub); } sub.acknowledge(consumerExchange.getConnectionContext(), ack); }
@Override public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception { Subscription sub = consumerExchange.getSubscription(); if (sub == null) { sub = subscriptions.get(ack.getConsumerId()); if (sub == null) { if (!consumerExchange.getConnectionContext().isInRecoveryMode()) { LOG.warn("Ack for non existent subscription, ack: {}", ack); throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId()); } else { LOG.debug("Ack for non existent subscription in recovery, ack: {}", ack); return; } } consumerExchange.setSubscription(sub); } sub.acknowledge(consumerExchange.getConnectionContext(), ack); }
@Override public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception { Subscription sub = consumerExchange.getSubscription(); if (sub == null) { sub = subscriptions.get(ack.getConsumerId()); if (sub == null) { if (!consumerExchange.getConnectionContext().isInRecoveryMode()) { LOG.warn("Ack for non existent subscription, ack: {}", ack); throw new IllegalArgumentException("The subscription does not exist: " + ack.getConsumerId()); } else { LOG.debug("Ack for non existent subscription in recovery, ack: {}", ack); return; } } consumerExchange.setSubscription(sub); } sub.acknowledge(consumerExchange.getConnectionContext(), ack); }