@Override public Future<Object> run(ConnectionContext ctx) throws IOException { destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack); return AbstractMessageStore.FUTURE; } });
@Override public void run(ConnectionContext ctx) throws IOException { destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack); }
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { ((TopicMessageStore)delegate).acknowledge(context, clientId, subscriptionName, messageId, ack); }
public void run(ConnectionContext ctx) throws IOException { topicMessageStore.acknowledge(ctx, clientId, subscriptionName, messageId, ack); }
public void replayAcknowledge(ConnectionContext context, String clientId, String subscritionName, MessageId messageId) { try { SubscriptionInfo sub = longTermStore.lookupSubscription(clientId, subscritionName); if (sub != null) { longTermStore.acknowledge(context, clientId, subscritionName, messageId, null); } } catch (Throwable e) { LOG.debug("Could not replay acknowledge for message '" + messageId + "'. Message may have already been acknowledged. reason: " + e); } }
@Override public void execute() throws Exception { // Checkpoint the acknowledged messages. Iterator<SubscriptionKey> iterator = cpAckedLastAckLocations.keySet().iterator(); while (iterator.hasNext()) { SubscriptionKey subscriptionKey = iterator.next(); MessageId identity = cpAckedLastAckLocations.get(subscriptionKey); MessageAck ack = new MessageAck(); ack.setMessageID(identity); longTermStore.acknowledge(transactionTemplate.getContext(), subscriptionKey.clientId, subscriptionKey.subscriptionName, identity, ack); } } });
final void acknowledge(final TransactionStore transactionStore, ConnectionContext context, final TopicMessageStore destination, final String clientId, final String subscriptionName, final MessageId messageId, final MessageAck ack) throws IOException { if (ack.getTransactionId() != null) { getTx(ack.getTransactionId()).trackStore(transactionStore); } destination.acknowledge(context, clientId, subscriptionName, messageId, ack); }
final void acknowledge(ConnectionContext context, final TopicMessageStore destination, final String clientId, final String subscriptionName, final MessageId messageId, final MessageAck ack) throws IOException { if (ack.isInTransaction()) { if (ack.getTransactionId().isXATransaction() || theStore.isConcurrentStoreAndDispatchTransactions()== false) { destination.acknowledge(context, clientId, subscriptionName, messageId, ack); } else { Tx tx = getTx(ack.getTransactionId()); tx.add(new RemoveMessageCommand(context) { @Override public MessageAck getMessageAck() { return ack; } @Override public Future<Object> run(ConnectionContext ctx) throws IOException { destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack); return AbstractMessageStore.FUTURE; } }); } } else { destination.acknowledge(context, clientId, subscriptionName, messageId, ack); } }
public void acknowledge(final TopicMessageStore destination, final String clientId, final String subscriptionName, final MessageId messageId, final MessageAck ack) throws IOException { if (doingRecover) { return; } if (ack.isInTransaction()) { Tx tx = getTx(ack.getTransactionId()); tx.add(new RemoveMessageCommand() { @Override public MessageAck getMessageAck() { return ack; } @Override public void run(ConnectionContext ctx) throws IOException { destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack); } @Override public MessageStore getMessageStore() { return destination; } }); } else { destination.acknowledge(null, clientId, subscriptionName, messageId, ack); } }
@Override public void acknowledge(ConnectionContext context, Subscription sub, final MessageAck ack, final MessageReference node) throws IOException { if (topicStore != null && node.isPersistent()) { DurableTopicSubscription dsub = (DurableTopicSubscription) sub; SubscriptionKey key = dsub.getSubscriptionKey(); topicStore.acknowledge(context, key.getClientId(), key.getSubscriptionName(), node.getMessageId(), convertToNonRangedAck(ack, node)); } messageConsumed(context, node); }
topicMessageStore.acknowledge(null, clientId, subscriptionName, messageId, ack);
@Override public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException { delegate.acknowledge(context, clientId, subscriptionName, messageId, ack); }
@Override public Future<Object> run(ConnectionContext ctx) throws IOException { destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack); return AbstractMessageStore.FUTURE; } });
@Override public Future<Object> run(ConnectionContext ctx) throws IOException { destination.acknowledge(ctx, clientId, subscriptionName, messageId, ack); return AbstractMessageStore.FUTURE; } });
public void replayAcknowledge(ConnectionContext context, String clientId, String subscritionName, MessageId messageId) { try { SubscriptionInfo sub = longTermStore.lookupSubscription(clientId, subscritionName); if (sub != null) { longTermStore.acknowledge(context, clientId, subscritionName, messageId, null); } } catch (Throwable e) { LOG.debug("Could not replay acknowledge for message '" + messageId + "'. Message may have already been acknowledged. reason: " + e); } }
@Override public void execute() throws Exception { // Checkpoint the acknowledged messages. Iterator<SubscriptionKey> iterator = cpAckedLastAckLocations.keySet().iterator(); while (iterator.hasNext()) { SubscriptionKey subscriptionKey = iterator.next(); MessageId identity = cpAckedLastAckLocations.get(subscriptionKey); longTermStore.acknowledge(transactionTemplate.getContext(), subscriptionKey.clientId, subscriptionKey.subscriptionName, identity, null); } } });
@Override public void execute() throws Exception { // Checkpoint the acknowledged messages. Iterator<SubscriptionKey> iterator = cpAckedLastAckLocations.keySet().iterator(); while (iterator.hasNext()) { SubscriptionKey subscriptionKey = iterator.next(); MessageId identity = cpAckedLastAckLocations.get(subscriptionKey); longTermStore.acknowledge(transactionTemplate.getContext(), subscriptionKey.clientId, subscriptionKey.subscriptionName, identity, null); } } });
public void replayAcknowledge(ConnectionContext context, String clientId, String subscritionName, MessageId messageId) { try { SubscriptionInfo sub = longTermStore.lookupSubscription(clientId, subscritionName); if (sub != null) { longTermStore.acknowledge(context, clientId, subscritionName, messageId, null); } } catch (Throwable e) { LOG.debug("Could not replay acknowledge for message '" + messageId + "'. Message may have already been acknowledged. reason: " + e); } }
@Override public void acknowledge(ConnectionContext context, Subscription sub, final MessageAck ack, final MessageReference node) throws IOException { if (topicStore != null && node.isPersistent()) { DurableTopicSubscription dsub = (DurableTopicSubscription) sub; SubscriptionKey key = dsub.getSubscriptionKey(); topicStore.acknowledge(context, key.getClientId(), key.getSubscriptionName(), node.getMessageId(), convertToNonRangedAck(ack, node)); } messageConsumed(context, node); }
@Override public void acknowledge(ConnectionContext context, Subscription sub, final MessageAck ack, final MessageReference node) throws IOException { if (topicStore != null && node.isPersistent()) { DurableTopicSubscription dsub = (DurableTopicSubscription) sub; SubscriptionKey key = dsub.getSubscriptionKey(); topicStore.acknowledge(context, key.getClientId(), key.getSubscriptionName(), node.getMessageId(), convertToNonRangedAck(ack, node)); } messageConsumed(context, node); }