@Override public void browseFinished() { MessageDispatch md = new MessageDispatch(); md.setConsumerId(info.getConsumerId()); md.setMessage(null); md.setDestination(null); session.deliverMessage(md); }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal( OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); MessageDispatch info = (MessageDispatch) o; info.setConsumerId( (org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination( (org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setMessage( (org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setRedeliveryCounter(dataIn.readInt()); }
public static MessageDispatch createMessageDispatch( MessageReference reference, ServerMessage message, AMQConsumer consumer) throws IOException, JMSException { ActiveMQMessage amqMessage = toAMQMessage( reference, message, consumer.getMarshaller(), consumer.getOpenwireDestination()); // we can use core message id for sequenceId amqMessage.getMessageId().setBrokerSequenceId(message.getMessageID()); MessageDispatch md = new MessageDispatch(); md.setConsumerId(consumer.getId()); md.setRedeliveryCounter(reference.getDeliveryCount() - 1); md.setDeliverySequenceId(amqMessage.getMessageId().getBrokerSequenceId()); md.setMessage(amqMessage); ActiveMQDestination destination = amqMessage.getDestination(); md.setDestination(destination); return md; }
/**