Package org.hornetq.api.core

Examples of org.hornetq.api.core.Message


         session.createQueue(LargeMessageTest.ADDRESS, queue[0], null, true);
         session.createQueue(LargeMessageTest.ADDRESS, queue[1], null, true);

         int numberOfBytes = 400000;

         Message clientFile = createLargeClientMessage(session, numberOfBytes);

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

         producer.close();
View Full Code Here


            session.start(xid, XAResource.TMNOFLAGS);
         }

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

         Message clientFile = createLargeClientMessage(session, 50000, durable);

         for (int i = 0; i < 1; i++)
         {
            producer.send(clientFile);
         }
View Full Code Here

         ClientConsumer consumer = session.createConsumer(LargeMessageTest.ADDRESS);

         for (int n = 0; n < 10; n++)
         {
            Message clientFile = createLargeClientMessage(session, numberOfBytes, n % 2 == 0);

            producer.send(clientFile);

            Assert.assertNull(consumer.receiveImmediate());
View Full Code Here

         session.createTemporaryQueue(LargeMessageTest.ADDRESS, LargeMessageTest.ADDRESS);

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

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

         producer.send(clientFile);

         session.commit();
View Full Code Here

         session.createTemporaryQueue(LargeMessageTest.ADDRESS, LargeMessageTest.ADDRESS);

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

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

         producer.send(clientFile);

         session.commit();
View Full Code Here

         session.createTemporaryQueue(LargeMessageTest.ADDRESS, LargeMessageTest.ADDRESS);

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

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

         producer.send(clientFile);

         session.commit();
View Full Code Here

         for (int i = 0 ; i < msgs.length; i++)
         {
            msgs[i] = RandomUtil.randomByte();
         }

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

         producer.send(clientFile);

         session.commit();
        
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

         {
            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

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.