Examples of createBytesMessage()


Examples of org.apache.activemq.ActiveMQSession.createBytesMessage()

        connection.start();
        ActiveMQSession session = (ActiveMQSession) connection.createSession(transacted, authMode);
        destination = createDestination();
        MessageProducer producer = session.createProducer(destination);
        for (int i = 0; i < MESSAGE_COUNT; i++) {
            BytesMessage message = session.createBytesMessage();
            message.writeBytes(("Message: " + i).getBytes());
            message.setIntProperty("counter", i);
            message.setJMSCorrelationID("MyCorrelationID");
            message.setJMSReplyTo(new ActiveMQQueue("MyReplyTo"));
            message.setJMSType("MyType");
View Full Code Here

Examples of org.apache.qpid.client.AMQSession.createBytesMessage()

        MessageProducer producer = session.createProducer(destination, false, false, true);

        //publish at a low volume
        for(int i = 0; i < count; i++)
        {
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(data);
            msg.setStringProperty("sent-at", Long.toString(System.nanoTime()));
            producer.send(msg);
            Thread.sleep(delay);
            if(++sent % 100 == 0)
View Full Code Here

Examples of org.fcrepo.server.messaging.JMSManager.createBytesMessage()

        TextMessage textMessage = jmsMgr.createTextMessage(topic, messageText);
        jmsMgr.send(topic, textMessage);
        checkMessage(topic, DestinationType.Topic, messageText);

        BytesMessage bytesMessage = jmsMgr.createBytesMessage(topic);
        bytesMessage.writeBytes(messageText.getBytes());
        jmsMgr.send(topic, bytesMessage);
        checkMessage(topic, DestinationType.Topic, null);

        ObjectMessage objectMessage = jmsMgr.createObjectMessage(topic, messageText);
View Full Code Here

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
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.