Package org.activemq.message

Examples of org.activemq.message.ConsumerInfo


    }

    public void testMatchConsumer(){
        String destName = "foo.bar";
        ActiveMQTopic topic = new ActiveMQTopic(destName);
        ConsumerInfo info = new ConsumerInfo();
        info.setDestination(topic);
       
        ActiveMQTopic advisoryDest = topic.getTopicForConsumerAdvisory();
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport(null);
        assertTrue(test.matchConsumer(advisory, info));
    }
View Full Code Here


        ActiveMQTopic topic = new ActiveMQTopic(destName);
        ProducerInfo info = new ProducerInfo();
        info.setDestination(topic);
       
        ActiveMQTopic advisoryDest = topic.getTopicForProducerAdvisory();
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport(null);
        assertTrue(test.matchProducer(advisory, info));
    }
View Full Code Here

       
        ConnectionInfo info = new ConnectionInfo();
       
       
        ActiveMQTopic advisoryDest = new ActiveMQTopic(ActiveMQDestination.CONNECTION_ADVISORY_PREFIX);
        ConsumerInfo advisory = new ConsumerInfo();
        advisory.setDestination(advisoryDest);
        AdvisorySupport test = new AdvisorySupport(null);
        assertTrue(test.matchConnection(advisory, info));
    }
View Full Code Here

            info.setHostName(IdGenerator.getHostName());
            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);

            consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQQueue(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
        }

        // now lets create a VM channel that the JMS client will use
        // to connect to the embedded brokerConnector
View Full Code Here

  public ConnectionConsumer createConnectionConsumer(Destination destination,
      String messageSelector, ServerSessionPool sessionPool,
      int maxMessages) throws JMSException {
    checkClosed();
    ensureClientIDInitialised();
    ConsumerInfo info = new ConsumerInfo();
    info.setConsumerId(handleIdGenerator.generateId());
    info.setDestination(ActiveMQMessageTransformation
        .transformDestination(destination));
    info.setSelector(messageSelector);
    info.setConsumerNo(handleIdGenerator.getNextShortSequence());
    return new ActiveMQConnectionConsumer(this, sessionPool, info,
        maxMessages);
  }
View Full Code Here

            String messageSelector, ServerSessionPool sessionPool,
            int maxMessages, boolean noLocal) throws JMSException {
       
        checkClosed();
        ensureClientIDInitialised();
        ConsumerInfo info = new ConsumerInfo();
        info.setConsumerId(handleIdGenerator.generateId());
        info.setDestination(ActiveMQMessageTransformation
                .transformDestination(destination));
        info.setSelector(messageSelector);
        info.setConsumerNo(handleIdGenerator.getNextShortSequence());
        info.setNoLocal(noLocal);
        return new ActiveMQConnectionConsumer(this, sessionPool, info,
                maxMessages);
    }
View Full Code Here

  public ConnectionConsumer createDurableConnectionConsumer(Topic topic,
      String subscriptionName, String messageSelector,
      ServerSessionPool sessionPool, int maxMessages) throws JMSException {
    checkClosed();
    ensureClientIDInitialised();
    ConsumerInfo info = new ConsumerInfo();
    info.setConsumerId(this.handleIdGenerator.generateId());
    info.setDestination(ActiveMQMessageTransformation
        .transformDestination(topic));
    info.setSelector(messageSelector);
    info.setConsumerName(subscriptionName);
    info.setConsumerNo(handleIdGenerator.getNextShortSequence());
    return new ActiveMQConnectionConsumer(this, sessionPool, info,
        maxMessages);
  }
View Full Code Here

    public ConnectionConsumer createDurableConnectionConsumer(Topic topic,
            String subscriptionName, String messageSelector,
            ServerSessionPool sessionPool, int maxMessages, boolean noLocal) throws JMSException {
        checkClosed();
        ensureClientIDInitialised();
        ConsumerInfo info = new ConsumerInfo();
        info.setConsumerId(this.handleIdGenerator.generateId());
        info.setDestination(ActiveMQMessageTransformation
                .transformDestination(topic));
        info.setSelector(messageSelector);
        info.setConsumerName(subscriptionName);
        info.setNoLocal(noLocal);
        info.setConsumerNo(handleIdGenerator.getNextShortSequence());
        return new ActiveMQConnectionConsumer(this, sessionPool, info,
                maxMessages);
    }
View Full Code Here

  public ConnectionConsumer createConnectionConsumer(Topic topic,
      String messageSelector, ServerSessionPool sessionPool,
      int maxMessages) throws JMSException {
    checkClosed();
    ensureClientIDInitialised();
    ConsumerInfo info = new ConsumerInfo();
    info.setConsumerId(this.handleIdGenerator.generateId());
    info.setDestination(ActiveMQMessageTransformation
        .transformDestination(topic));
    info.setSelector(messageSelector);
    info.setConsumerNo(handleIdGenerator.getNextShortSequence());
    return new ActiveMQConnectionConsumer(this, sessionPool, info,
        maxMessages);
  }
View Full Code Here

  public ConnectionConsumer createConnectionConsumer(Queue queue,
      String messageSelector, ServerSessionPool sessionPool,
      int maxMessages) throws JMSException {
    checkClosed();
    ensureClientIDInitialised();
    ConsumerInfo info = new ConsumerInfo();
    info.setConsumerId(this.handleIdGenerator.generateId());
    info.setDestination(ActiveMQMessageTransformation
        .transformDestination(queue));
    info.setSelector(messageSelector);
    info.setConsumerNo(handleIdGenerator.getNextShortSequence());
    return new ActiveMQConnectionConsumer(this, sessionPool, info,
        maxMessages);
  }
View Full Code Here

TOP

Related Classes of org.activemq.message.ConsumerInfo

Copyright © 2018 www.massapicom. 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.