Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientSession.createBytesMessage()


                  MessageProducer messageProducer = session.createProducer(HornetQDestination.createQueue("queue"));
                  messageProducer.setDeliveryMode(DeliveryMode.PERSISTENT);

                  for (int i = 0; i < numberOfMessages; i++)
                  {
                     BytesMessage message = session.createBytesMessage();
                     message.writeBytes(new byte[3000]);
                     message.setStringProperty("Service", "LoadShedService");
                     message.setStringProperty("Action", "testAction");

                     messageProducer.send(message);
View Full Code Here


                     BytesMessage message = (BytesMessage)consumer.receive(5000);
                     if (message == null)
                     {
                        return;
                     }
                     message = session.createBytesMessage();
                     message.writeBytes(new byte[3000]);
                     message.setStringProperty("Service", "LoadShedService");
                     message.setStringProperty("Action", "testAction");
                     messageProducer.send(message);
                     session.commit();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.