private void handleRegularMessage(ClientMessageInternal message) { if (message.getAddress() == null) { message.setAddressTransient(queueInfo.getAddress()); } message.onReceipt(this); if (!ackIndividually && message.getPriority() != 4 && !message.containsProperty(ClientConsumerImpl.FORCED_DELIVERY_MESSAGE)) { // We have messages of different priorities so we need to ack them individually since the // order // of them in the ServerConsumerImpl delivery list might not be the same as the order they are // consumed in, which means that acking all up to won't work ackIndividually = true; } // Add it to the buffer buffer.addTail(message, message.getPriority()); if (handler != null) { // Execute using executor if (!stopped) { queueExecutor(); } } else { notify(); } }
public void retrieveExistingData(ClientMessageInternal clMessage) { this.messageID = clMessage.getMessageID(); this.address = clMessage.getAddress(); this.setUserID(clMessage.getUserID()); this.setFlowControlSize(clMessage.getFlowControlSize()); this.setDeliveryCount(clMessage.getDeliveryCount()); this.type = clMessage.getType(); this.durable = clMessage.isDurable(); this.setExpiration(clMessage.getExpiration()); this.timestamp = clMessage.getTimestamp(); this.priority = clMessage.getPriority(); this.properties = clMessage.getProperties(); this.largeMessageSize = clMessage.getLongProperty(HDR_LARGE_BODY_SIZE); }