Examples of TopicFilter


Examples of kafka.consumer.TopicFilter

        final int numThreads = configuration.getInt(CK_THREADS);
        final ConsumerConfig consumerConfig = new ConsumerConfig(props);
        cc = Consumer.createJavaConsumerConnector(consumerConfig);

        final TopicFilter filter = new Whitelist(configuration.getString(CK_TOPIC_FILTER));

        final List<KafkaStream<byte[], byte[]>> streams = cc.createMessageStreamsByFilter(filter, numThreads);
        final ExecutorService executor = new InstrumentedExecutorService(Executors.newFixedThreadPool(numThreads), metricRegistry);

        // this is being used during shutdown to first stop all submitted jobs before committing the offsets back to zookeeper
View Full Code Here

Examples of kafka.consumer.TopicFilter

        mConfig = config;
        mOffsetTracker = offsetTracker;

        mConsumerConnector = Consumer.createJavaConsumerConnector(createConsumerConfig());

        TopicFilter topicFilter = new Whitelist(mConfig.getKafkaTopicFilter());
        List<KafkaStream<byte[], byte[]>> streams =
            mConsumerConnector.createMessageStreamsByFilter(topicFilter);
        KafkaStream<byte[], byte[]> stream = streams.get(0);
        mIterator = stream.iterator();
        mLastAccessTime = new HashMap<TopicPartition, Long>();
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.TopicFilter

            EndpointReference epr = new EndpointReference(eprXML);
           
            NotificationProducer wsn =
                (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
           
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_CREATION_TOPIC), null, null);
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC), null, null);
        }
    }
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.TopicFilter

            EndpointReference epr = new EndpointReference(eprXML);
           
            NotificationProducer wsn =
                (NotificationProducer)getResource().getCapability(WsnConstants.PRODUCER_URI);
           
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_CREATION_TOPIC), null, null);
            wsn.subscribe(epr, new TopicFilter(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC), null, null);
        }
    }
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.TopicFilter

  private void topicSubscriptionWithoutTerminationTime(EndpointReference producer, EndpointReference consumer) throws SoapFault
  {
    NotificationProducerClient producerClient = new NotificationProducerClient(producer);
        producerClient.setTrace(true);

    TopicFilter filter = new TopicFilter(Names.EVENTS_LIFECYLE_TOPIC_NAME);

        producerClient.subscribe(
            consumer,  // Consumer Endpoint reference
            filter,      // Topic Filter
            null);      // Termination Time : if null the subscription will never expire.
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.TopicFilter

  private void topicSubscriptionWithTerminationTime(EndpointReference producer, EndpointReference consumer) throws SoapFault
  {
    NotificationProducerClient producerClient = new NotificationProducerClient(producer);
        producerClient.setTrace(true);

    TopicFilter filter = new TopicFilter(Names.EVENTS_LIFECYLE_TOPIC_NAME);

        producerClient.subscribe(
            consumer,  // Consumer Endpoint reference
            filter,      // Topic Filter
            new Date(System.currentTimeMillis() + 10000))// Termination Time
View Full Code Here

Examples of org.apache.muse.ws.notification.impl.TopicFilter

    NotificationProducerClient producerClient = new NotificationProducerClient(producer);
        producerClient.setTrace(true);

        FilterCollection filter = new FilterCollection();
       
    TopicFilter topicFilter = new TopicFilter(Names.EVENTS_LIFECYLE_TOPIC_NAME);
        MessagePatternFilter messageFilter= new MessagePatternFilter(
            "/wsnt:NotificationMessage/wsnt:Message/qman:LifeCycleEvent/qman:Resource/qman:Name/text()='connection'", // expression (XPath)
            XPathUtils.NAMESPACE_URI); // Dialect : the only supported dialect is XPath 1.0

        ProducerPropertiesFilter producerFilter = new ProducerPropertiesFilter(
View Full Code Here

Examples of org.apache.ws.pubsub.TopicFilter

    }

    public Subscription subscribe(SubscriptionListModel sl, NotificationListModel nl, String xpath, Topic t, java.util.Calendar termtime, boolean  subend){
        try{
            TopicFilter tf = null;
            XPathFilter xf = null;
            if(xpath!=null)
                xf= new XPathFilter(xpath);
            if(t!=null)
                tf= new TopicFilter(t);

            NotificationConsumer c = new GUIConsumer("http://localhost:"+inportL+"/axis/services/NotificationPort",nl);
            SubscriptionEndConsumer ec = new GUIEndConsumer("http://localhost:"+inportL+"/axis/services/SubscriptionEndPort",sl);

            org.apache.ws.pubsub.Subscription s =  nprod.subscribe(c,ec,tf,xf,termtime,true);
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.