Package org.hornetq.api.core.client

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


         ClientSessionFactory sf = locator.createSessionFactory();
         ClientSession session = sf.createSession(null, null, false, true, true, false, 0);

         session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);

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

         ClientMessage message = null;

         for (int i = 0; i < numberOfMessages; i++)
         {
View Full Code Here


         session.close();

         session = sf.createSession(false, true, true);

         producer = session.createProducer(PagingTest.ADDRESS);

         for (int i = 0; i < numberOfMessages; i++)
         {
            byte[] body = new byte[1024];
View Full Code Here

         ClientSessionFactory sf = locator.createSessionFactory();
         ClientSession session = sf.createSession();

         session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);

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

         ClientMessage message = null;

         class MyHandler implements MessageHandler
         {
View Full Code Here

         for (int i = 0; i < NUMBER_OF_BINDINGS; i++)
         {
            session.createQueue(PagingTest.ADDRESS, new SimpleString("someQueue" + i), null, true);
         }

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

         ClientMessage message = null;

         byte[] body = new byte[1024];
View Full Code Here

         session.createQueue(PAGED_ADDRESS, PAGED_ADDRESS, true);

         session.createQueue(NON_PAGED_ADDRESS, NON_PAGED_ADDRESS, true);

         ClientProducer producerPaged = session.createProducer(PAGED_ADDRESS);
         ClientProducer producerNonPaged = session.createProducer(NON_PAGED_ADDRESS);

         int NUMBER_OF_MESSAGES = 100;

         for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
View Full Code Here

         session.createQueue(PAGED_ADDRESS, PAGED_ADDRESS, true);

         session.createQueue(NON_PAGED_ADDRESS, NON_PAGED_ADDRESS, true);

         ClientProducer producerPaged = session.createProducer(PAGED_ADDRESS);
         ClientProducer producerNonPaged = session.createProducer(NON_PAGED_ADDRESS);

         int NUMBER_OF_MESSAGES = 100;

         for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
         {
View Full Code Here

         ClientSessionFactory sf = locator.createSessionFactory();

         byte[] body = new byte[messageSize];

         ClientSession sessionTransacted = sf.createSession(null, null, false, false, false, false, 0);
         ClientProducer producerTransacted = sessionTransacted.createProducer(PagingTest.ADDRESS);

         ClientSession session = sf.createSession(null, null, false, true, true, false, 0);
         session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);

         ClientMessage firstMessage = sessionTransacted.createMessage(IS_DURABLE_MESSAGE);
View Full Code Here

         firstMessage.getBodyBuffer().writeBytes(body);
         firstMessage.putIntProperty(new SimpleString("id"), 0);

         producerTransacted.send(firstMessage);

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

         ClientMessage message = null;

         int numberOfMessages = 0;
         while (true)
View Full Code Here

         ClientSessionFactory sf = locator.createSessionFactory();

         byte[] body = new byte[messageSize];

         ClientSession sessionTransacted = sf.createSession(null, null, false, false, false, false, 0);
         ClientProducer producerTransacted = sessionTransacted.createProducer(PagingTest.ADDRESS);

         ClientSession sessionNonTX = sf.createSession(true, true, 0);
         sessionNonTX.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);

         ClientProducer producerNonTransacted = sessionNonTX.createProducer(PagingTest.ADDRESS);
View Full Code Here

         ClientProducer producerTransacted = sessionTransacted.createProducer(PagingTest.ADDRESS);

         ClientSession sessionNonTX = sf.createSession(true, true, 0);
         sessionNonTX.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);

         ClientProducer producerNonTransacted = sessionNonTX.createProducer(PagingTest.ADDRESS);

         sessionNonTX.start();

         for (int i = 0; i < 50; i++)
         {
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.