Package org.hornetq.api.core

Examples of org.hornetq.api.core.Message


   {
      Map<String, Object>[] messages = new Map[refs.size()];
      int i = 0;
      for (MessageReference ref : refs)
      {
         Message message = ref.getMessage();
         messages[i++] = message.toMap();
      }
      return messages;
   }
View Full Code Here


            while (iterator.hasNext())
            {
               MessageReference ref = (MessageReference)iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return (Map<String, Object>[])messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here

         session.createQueue(LargeMessageTest.ADDRESS, LargeMessageTest.ADDRESS, true);

         ClientProducer producer = session.createProducer(LargeMessageTest.ADDRESS);

         Message clientFile = createLargeClientMessage(session, messageSize, true);

         clientFile.setExpiration(System.currentTimeMillis());

         producer.send(clientFile);

         Thread.sleep(500);
View Full Code Here

         ClientProducer producer = session.createProducer(LargeMessageTest.ADDRESS);

         for (int i = 0; i < 10; i++)
         {
            Message clientFile = createLargeClientMessage(session, messageSize, true);

            producer.send(clientFile);
         }
         session.commit();
View Full Code Here

         ClientProducer producer = session.createProducer(LargeMessageTest.ADDRESS);

         for (int i = 0; i < 10; i++)
         {
            Message clientFile = createLargeClientMessage(session, messageSize, true);

            producer.send(clientFile);
         }
         session.commit();
        
View Full Code Here

         session.start(xid1, XAResource.TMNOFLAGS);

         for (int i = 0; i < 10; i++)
         {
            Message clientFile = createLargeClientMessage(session, messageSize, true);
            clientFile.putIntProperty("txid", 1);
            producer.send(clientFile);
         }
         session.end(xid1, XAResource.TMSUCCESS);
        
         session.prepare(xid1);


         session.start(xid2, XAResource.TMNOFLAGS);


         for (int i = 0; i < 10; i++)
         {
            Message clientFile = createLargeClientMessage(session, messageSize, true);
            clientFile.putIntProperty("txid", 2);
            clientFile.putIntProperty("i", i);
            producer.send(clientFile);
         }
         session.end(xid2, XAResource.TMSUCCESS);
        
         session.prepare(xid2);
View Full Code Here

         {
            userId = org.hornetq.utils.UUIDGenerator.getInstance().generateUUID();
         }
      }

      Message message = session.createMessage(type, true, expiration, timestamp, priority);
      message.setUserID(userId);

      boolean endLoop = false;

      // loop through the XML and gather up all the message's data (i.e. body, properties, queues, etc.)
      while (reader.hasNext())
View Full Code Here

    {
        Map<String, Object>[] messages = new Map[refs.size()];
        int i = 0;
        for (MessageReference ref : refs)
        {
            Message message = ref.getMessage();
            messages[i++] = message.toMap();
        }
        return messages;
    }
View Full Code Here

            while (iterator.hasNext())
            {
               MessageReference ref = iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here

    {
        Map<String, Object>[] messages = new Map[refs.size()];
        int i = 0;
        for (MessageReference ref : refs)
        {
            Message message = ref.getMessage();
            messages[i++] = message.toMap();
        }
        return messages;
    }
View Full Code Here

TOP

Related Classes of org.hornetq.api.core.Message

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.