Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.MessageAckWriter


        ack.setMessageRead(this.messageRead);
        ack.setPersistent(persistent);
        ack.setXaTransacted(xaTransacted);
        ack.setDestination(destination);

    MessageAckWriter writer = new MessageAckWriter();
    MessageAckReader reader = new MessageAckReader();
    try {
      byte[] data = writer.writePacketToByteArray(ack);
      MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);

      assertTrue(mack.getId().equals(this.id));
      assertTrue(mack.getConsumerId().equals(this.consumerId));
            assertTrue(mack.getTransactionId().equals(this.transactedId));
View Full Code Here


        ack.setMessageRead(this.messageRead);
        ack.setPersistent(persistent);
        ack.setXaTransacted(xaTransacted);
        ack.setDestination(destination);

    MessageAckWriter writer = new MessageAckWriter();
    MessageAckReader reader = new MessageAckReader();
    try {
      int count = 100000;
      long startTime = System.currentTimeMillis();
      for (int i = 0; i < count; i++) {
        byte[] data = writer.writePacketToByteArray(ack);
        MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);
      }
      long finishTime = System.currentTimeMillis();
      long totalTime = finishTime - startTime;
      long ps = (count * 1000) / totalTime;
View Full Code Here

        ack.setConsumerId(this.consumerId);
    ack.setTransactionId(this.transactedId);
        ack.setMessageID(messageId);
        ack.setMessageRead(this.messageRead);

    MessageAckWriter writer = new MessageAckWriter();
    MessageAckReader reader = new MessageAckReader();
    try {
      byte[] data = writer.writePacketToByteArray(ack);
      MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);

      assertTrue(mack.getId().equals(this.id));
      assertTrue(mack.getConsumerId().equals(this.consumerId));
            assertTrue(mack.getTransactionId().equals(this.transactedId));
View Full Code Here

        ack.setConsumerId(this.consumerId);
        ack.setTransactionId(this.transactedId);
        ack.setMessageID(messageId);
        ack.setMessageRead(this.messageRead);

    MessageAckWriter writer = new MessageAckWriter();
    MessageAckReader reader = new MessageAckReader();
    try {
      int count = 100000;
      long startTime = System.currentTimeMillis();
      for (int i = 0; i < count; i++) {
        byte[] data = writer.writePacketToByteArray(ack);
        MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);
      }
      long finishTime = System.currentTimeMillis();
      long totalTime = finishTime - startTime;
      long ps = (count * 1000) / totalTime;
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.MessageAckWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.