Examples of createConsumer()


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

               message.putStringProperty(propName, "Hello sent at " + new Date());
               System.out.println("Sending the message.");

               producer.send(message);

               ClientConsumer messageConsumer = session.createConsumer(queueName);
               session.start();

               ClientMessage messageReceived = messageConsumer.receive(1000);
               System.out.println("Received TextMessage:" + messageReceived.getStringProperty(propName));
            } finally {
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionInternal.createConsumer()

         server.start();
         ClientSessionFactory cf = createInVMFactory();
         ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
         clientSession.createQueue(queueName, queueName, false);
         ClientProducer producer = clientSession.createProducer();
         ClientConsumer consumer = clientSession.createConsumer(queueName);

         Assert.assertEquals(1, server.getRemotingService().getConnections().size());

         RemotingConnection rc = clientSession.getConnection();
View Full Code Here

Examples of org.jboss.jms.client.JBossSession.createConsumer()

         Transaction trans = tm.getTransaction();
         trans.enlistResource(res1);
         trans.delistResource(res1, XAResource.TMSUCCESS);
         MessageProducer p = sess1.createProducer(queue1);
         MessageConsumer cons = sess1.createConsumer(queue1);
         conn.start();
         // send 10 messages
         for (int i = 0; i < 10; i++)
         {
            TextMessage message = sess1.createTextMessage("delistedwork" + i);
View Full Code Here

Examples of org.mule.transport.jms.JmsSupport.createConsumer()

    {
        InboundEndpoint endpoint = muleContext.getEndpointFactory().getInboundEndpoint("jms://out");
        JmsConnector jmsConnector = (JmsConnector) muleContext.getRegistry().lookupConnector(
            "outPersistentConnector");
        JmsSupport jmsSupport = jmsConnector.getJmsSupport();
        MessageConsumer consumer = jmsSupport.createConsumer(jmsConnector.getSession(endpoint),
            jmsSupport.createDestination(jmsConnector.getSession(endpoint), endpoint), false, endpoint);
        return consumer;
    }

    protected int getOutSize() throws Exception
View Full Code Here

Examples of org.objectweb.joram.client.connector.OutboundSession.createConsumer()

      final OutboundProducer prod = (OutboundProducer) os.createProducer(queue);
      final OutboundProducer prod1 = (OutboundProducer) os.createProducer(topic);

      System.out.println("OutboundProducer ok");

      OutboundConsumer cons = (OutboundConsumer) os.createConsumer(queue);
      OutboundConsumer cons1 = (OutboundConsumer) os.createConsumer(topic)
      System.out.println("OutboundConsumer ok");

      oc.start();
      System.out.println();
View Full Code Here

Examples of org.objectweb.joram.client.connector.OutboundSession.createConsumer()

      final OutboundProducer prod1 = (OutboundProducer) os.createProducer(topic);

      System.out.println("OutboundProducer ok");

      OutboundConsumer cons = (OutboundConsumer) os.createConsumer(queue);
      OutboundConsumer cons1 = (OutboundConsumer) os.createConsumer(topic)
      System.out.println("OutboundConsumer ok");

      oc.start();
      System.out.println();
      System.out.println("Without MessageListener");
View Full Code Here

Examples of org.objectweb.joram.client.jms.Session.createConsumer()

   
    Connection cnx = cf.createConnection();
    Session session = (Session) cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
//    session.setImplicitAck(true);
    session.setQueueMessageReadMax(100);
    MessageConsumer consumer = (MessageConsumer) session.createConsumer(queue);
    consumer.setMessageListener(new MyListener());
    cnx.start();
   
    System.in.read();
   
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.