Examples of createConsumer()


Examples of com.consol.citrus.endpoint.Endpoint.createConsumer()

     * Receives the message with respective message receiver implementation.
     * @return
     */
    private Message receive(TestContext context) {
        Endpoint messageEndpoint = getOrCreateEndpoint(context);
        return receiveTimeout > 0 ? messageEndpoint.createConsumer().receive(context, receiveTimeout) :
                messageEndpoint.createConsumer().receive(context, messageEndpoint.getEndpointConfiguration().getTimeout());
    }

    /**
     * Receives the message with the respective message receiver implementation
View Full Code Here

Examples of com.netflix.astyanax.recipes.queue.ShardedDistributedMessageQueue.createConsumer()

                .withShardLockManager(slm)
                .build();

        queue.createQueue();
        MessageProducer producer = queue.createProducer();
        MessageConsumer consumer = queue.createConsumer();

        // Enqueue a recurring message
        final String key = "RepeatingMessageWithTimeout";
        final Message message = new Message()
                .setUniqueKey(key)
View Full Code Here

Examples of com.pinterest.secor.common.KafkaClient.createConsumer()

        Map<TopicPartition, Long> lastOffsets = Maps.newHashMap();
        for (String topic : topics) {
            for (int i = 0; i < num_partitions; i++) {
                TopicAndPartition topicAndPartition = new TopicAndPartition(
                        topic, i);
                SimpleConsumer consumer = mKafkaClient
                        .createConsumer(new TopicPartition(topic, i));
                Map<TopicAndPartition, PartitionOffsetRequestInfo> requestInfo = new HashMap<TopicAndPartition, PartitionOffsetRequestInfo>();
                requestInfo.put(topicAndPartition,
                        new PartitionOffsetRequestInfo(-1, 1));
                kafka.javaapi.OffsetRequest request = new kafka.javaapi.OffsetRequest(
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.data.handlers.ConsumerHandler.createConsumer()

      {
          if (acc)
              checkAccessPermission(PacketType.ADD_CONSUMER, d, con);
          ConsumerHandler handler = (ConsumerHandler)
                      pr.getHandler(PacketType.ADD_CONSUMER);
          Consumer[] c = handler.createConsumer(d.getDestinationUID(), con,
                       session, selector, clientid, durablename,
                       nolocal, size, shared, creator_uid, false, useFlowControl);
          if (c[2] != null)
              c[2].resume("Resuming from protocol");
          if (c[1] != null)
View Full Code Here

Examples of com.taobao.metamorphosis.client.MessageSessionFactory.createConsumer()

        // subscribed topic
        final String topic = "meta-test";
        // consumer group
        final String group = "meta-example";
        // create consumer,ǿ�ҽ���ʹ�õ���
        final MessageConsumer consumer = sessionFactory.createConsumer(new ConsumerConfig(group));
        // subscribe topic
        consumer.subscribe(topic, 1024 * 1024, new MessageListener() {

            private int count = 0;

View Full Code Here

Examples of com.taobao.metamorphosis.client.MetaMessageSessionFactory.createConsumer()

            final int count = 100;
            this.sendMessage(count, "hello", this.topic);

            for (int i = 0; i < 6; i++) {
                MetaMessageSessionFactory createdSessionFactory = new MetaMessageSessionFactory(this.metaClientConfig);
                MessageConsumer createdConsumer = createdSessionFactory.createConsumer(new ConsumerConfig("group"));
                this.subscribe(latch, count, createdConsumer);
                sessionFactories.add(createdSessionFactory);
                latch.countDown();
            }
View Full Code Here

Examples of javax.jms.JMSContext.createConsumer()

        assertNotNull(factory4);
        assertNotNull(factory5);
        assertNotNull(factory6);

        JMSContext context = factory3.createContext("guest", "guest", AUTO_ACKNOWLEDGE);
        JMSConsumer consumer = context.createConsumer(queue4);
        assertNotNull(consumer);
        consumer.close();
    }

    public void checkAnnotationBasedDefinitionsWithVaultedAttributes() {
View Full Code Here

Examples of javax.jms.QueueSession.createConsumer()

            consumerThread.join();
            assertNull(sessionRunnable.error);

            // Drain the queue
            QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = session.createConsumer(queue);
            while (consumer.receiveNoWait() != null);
            session.close();
         }
      }
      finally
View Full Code Here

Examples of javax.jms.Session.createConsumer()

    System.out.println("Trace2");

    Connection cnx = cf.createConnection();
    Session sess = cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageConsumer cons = sess.createConsumer(queue);

    System.out.println("Listens to the MailQueue...");
    System.out.println("hit a key to stop.");

    cons.setMessageListener(new MsgListener("Queue listener"));
View Full Code Here

Examples of javax.jms.Session.createConsumer()

    ConnectionFactory cf = (ConnectionFactory) ictx.lookup("cf");
    ictx.close();

    Connection cnx = cf.createConnection();
    Session sess = cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageConsumer recv = sess.createConsumer(queue);
    // MessageConsumer subs = sess.createConsumer(topic);

    recv.setMessageListener(new MsgListener("Collector Queue listener"));
    // subs.setMessageListener(new MsgListener("Colector Topic listener"));
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.