protected MessageAck convertToNonRangedAck(MessageAck ack, MessageReference node) { // the original ack may be a ranged ack, but we are trying to delete // a specific // message store here so we need to convert to a non ranged ack. if (ack.getMessageCount() > 0) { // Dup the ack MessageAck a = new MessageAck(); ack.copy(a); ack = a; // Convert to non-ranged. ack.setMessageCount(1); } // always use node messageId so we can access entry/data Location ack.setFirstMessageId(node.getMessageId()); ack.setLastMessageId(node.getMessageId()); return ack; }
public MessageAckWithLocation(MessageAck ack, Location location) { ack.copy(this); this.location = location; } }
protected MessageAck convertToNonRangedAck(MessageAck ack, MessageReference node) { // the original ack may be a ranged ack, but we are trying to delete // a specific // message store here so we need to convert to a non ranged ack. if (ack.getMessageCount() > 0) { // Dup the ack MessageAck a = new MessageAck(); ack.copy(a); ack = a; // Convert to non-ranged. ack.setMessageCount(1); } // always use node messageId so we can access entry/data Location ack.setFirstMessageId(node.getMessageId()); ack.setLastMessageId(node.getMessageId()); return ack; }
protected MessageAck convertToNonRangedAck(MessageAck ack, MessageReference node) { // the original ack may be a ranged ack, but we are trying to delete // a specific // message store here so we need to convert to a non ranged ack. if (ack.getMessageCount() > 0) { // Dup the ack MessageAck a = new MessageAck(); ack.copy(a); ack = a; // Convert to non-ranged. ack.setMessageCount(1); } // always use node messageId so we can access entry/data Location ack.setFirstMessageId(node.getMessageId()); ack.setLastMessageId(node.getMessageId()); return ack; }
protected MessageAck convertToNonRangedAck(MessageAck ack, MessageReference node) { // the original ack may be a ranged ack, but we are trying to delete // a specific // message store here so we need to convert to a non ranged ack. if (ack.getMessageCount() > 0) { // Dup the ack MessageAck a = new MessageAck(); ack.copy(a); ack = a; // Convert to non-ranged. ack.setMessageCount(1); } // always use node messageId so we can access entry/data Location ack.setFirstMessageId(node.getMessageId()); ack.setLastMessageId(node.getMessageId()); return ack; }
@Override public Response processMessageAck(MessageAck messageAck) throws Exception { MessageAck copy = new MessageAck(); messageAck.copy(copy); copy.setMessageCount(messageAck.getMessageCount()); copy.setTransactionId(getMultiplexTransactionId(messageAck.getTransactionId())); ConsumerId consumerId = messageAck.getConsumerId(); ConsumerId multiplexerConsumerId = getMultiplexConsumerId(consumerId); if (multiplexerConsumerId != null) { copy.setConsumerId(multiplexerConsumerId); multiplexer.sendOut(this, copy.getDestination(), copy); } return null; }
public void acknowledge(ConnectionContext context, Subscription sub, MessageAck ack, MessageReference node) throws IOException { messageConsumed(context, node); if (store != null && node.isPersistent()) { // the original ack may be a ranged ack, but we are trying to delete // a specific // message store here so we need to convert to a non ranged ack. if (ack.getMessageCount() > 0) { // Dup the ack MessageAck a = new MessageAck(); ack.copy(a); ack = a; // Convert to non-ranged. ack.setFirstMessageId(node.getMessageId()); ack.setLastMessageId(node.getMessageId()); ack.setMessageCount(1); } store.removeAsyncMessage(context, ack); } }
@Override public Response processMessageAck(MessageAck messageAck) throws Exception { MessageAck copy = new MessageAck(); messageAck.copy(copy); copy.setMessageCount(messageAck.getMessageCount()); copy.setTransactionId(getMultiplexTransactionId(messageAck.getTransactionId())); ConsumerId consumerId = messageAck.getConsumerId(); ConsumerId multiplexerConsumerId = getMultiplexConsumerId(consumerId); if (multiplexerConsumerId != null) { if (model.canDispatch(messageAck.getDestination())) { copy.setConsumerId(multiplexerConsumerId); multiplexer.sendOut(this, copy.getDestination(), copy); } } model.acked(this, messageAck.getDestination()); return null; }