Package org.hornetq.core.server

Examples of org.hornetq.core.server.MessageReference


      try
      {

         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (ref.getMessage().getMessageID() == messageID)
            {
               deliveringCount.incrementAndGet();
               expire(ref);
               iter.remove();
               refRemoved(ref);
View Full Code Here


      try
      {

         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (filter == null || filter.match(ref.getMessage()))
            {
               deliveringCount.incrementAndGet();
               expire(tx, ref);
               iter.remove();
               refRemoved(ref);
View Full Code Here

  
               try
               {
                  while (iter.hasNext())
                  {
                     MessageReference ref = iter.next();
                     try
                     {
                        if (ref.getMessage().isExpired())
                        {
                           deliveringCount.incrementAndGet();
                           expire(ref);
                           iter.remove();
                           refRemoved(ref);
View Full Code Here

      try
      {
         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (ref.getMessage().getMessageID() == messageID)
            {
               deliveringCount.incrementAndGet();
               sendToDeadLetterAddress(ref);
               iter.remove();
               refRemoved(ref);
View Full Code Here

      try
      {
         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (filter == null || filter.match(ref.getMessage()))
            {
               deliveringCount.incrementAndGet();
               sendToDeadLetterAddress(ref);
               iter.remove();
               refRemoved(ref);
View Full Code Here

      try
      {
         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (ref.getMessage().getMessageID() == messageID)
            {
               iter.remove();
               refRemoved(ref);
               deliveringCount.incrementAndGet();
               try
View Full Code Here

            DuplicateIDCache targetDuplicateCache = postOffice.getDuplicateIDCache(toAddress);

            while (iter.hasNext())
            {
               MessageReference ref = iter.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  boolean ignored = false;

                  deliveringCount.incrementAndGet();
                  count++;

                  if (rejectDuplicates)
                  {
                     byte[] duplicateBytes = ref.getMessage().getDuplicateIDBytes();
                     if (duplicateBytes != null)
                     {
                        if (targetDuplicateCache.contains(duplicateBytes))
                        {
                           log.info("Message with duplicate ID " + ref.getMessage().getDuplicateProperty() +
                                    " was already set at " +
                                    toAddress +
                                    ". Move from " +
                                    this.address +
                                    " being ignored and message removed from " +
                                    this.address);
                           acknowledge(tx, ref);
                           ignored = true;
                        }
                     }
                  }

                  if (!ignored)
                  {
                     move(toAddress, tx, ref, false, rejectDuplicates);
                  }
                  iter.remove();
               }
            }

            List<MessageReference> cancelled = scheduledDeliveryHandler.cancel(filter);
            for (MessageReference ref : cancelled)
            {
               byte[] duplicateBytes = ref.getMessage().getDuplicateIDBytes();
               if (duplicateBytes != null)
               {
                  if (targetDuplicateCache.contains(duplicateBytes))
                  {
                     log.info("Message with duplicate ID " + ref.getMessage().getDuplicateProperty() +
                              " was already set at " +
                              toAddress +
                              ". Move from " +
                              this.address +
                              " being ignored");
View Full Code Here

      try
      {

         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (ref.getMessage().getMessageID() == messageID)
            {
               iter.remove();
               refRemoved(ref);
               ref.getMessage().setPriority(newPriority);
               addTail(ref, false);
               return true;
            }
         }
View Full Code Here

      try
      {
         int count = 0;
         while (iter.hasNext())
         {
            MessageReference ref = iter.next();
            if (filter == null || filter.match(ref.getMessage()))
            {
               count++;
               iter.remove();
               refRemoved(ref);
               ref.getMessage().setPriority(newPriority);
               addTail(ref, false);
            }
         }
         return count;
      }
View Full Code Here

      messageReferences.addHead(ref, ref.getMessage().getPriority());
   }

   private synchronized void doPoll()
   {
      MessageReference ref = intermediateMessageReferences.poll();

      if (ref != null)
      {
         internalAddTail(ref);
View Full Code Here

TOP

Related Classes of org.hornetq.core.server.MessageReference

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.