Examples of TopicMetadata


Examples of kafka.javaapi.TopicMetadata

            TopicMetadataResponse response = consumer.send(request);
            if (response.topicsMetadata().size() != 1) {
                throw new RuntimeException("Expected one metadata for topic " + topic + " found " +
                    response.topicsMetadata().size());
            }
            TopicMetadata topicMetadata = response.topicsMetadata().get(0);
            return topicMetadata.partitionsMetadata().size();
        } finally {
            if (consumer != null) {
                consumer.close();
            }
        }
View Full Code Here

Examples of org.projectodd.polyglot.messaging.destinations.TopicMetaData

        MockDeploymentUnit unit = deployResourceAs( "rootless-topics-knob.yml", "rootless-topics-knob.yml" );
        List<TopicMetaData> allMetaData = unit.getAttachmentList( TopicMetaData.ATTACHMENTS_KEY );

        assertEquals( 3, allMetaData.size() );

        TopicMetaData topicWorker = getMetaData( allMetaData, "/topics/worker" );
        assertNotNull( topicWorker );

        TopicMetaData topicParasite = getMetaData( allMetaData, "/topics/parasite" );
        assertNotNull( topicParasite );
       
        TopicMetaData topicFission = getMetaData( allMetaData, "/topics/smilin_joe_fission" );
        assertNotNull( topicFission );
       
    }
View Full Code Here

Examples of org.projectodd.polyglot.messaging.destinations.TopicMetaData

       
        List<TopicMetaData> allMetaData = unit.getAttachmentList( TopicMetaData.ATTACHMENTS_KEY );

        assertEquals( 2, allMetaData.size() );

        TopicMetaData topicFoo = getMetaData( allMetaData, "/topics/foo" );
        assertNotNull( topicFoo );

        TopicMetaData topicBar = getMetaData( allMetaData, "/topics/bar" );
        assertNotNull( topicBar );

    }
View Full Code Here

Examples of org.projectodd.polyglot.messaging.destinations.TopicMetaData

        assertFalse( allMetaData.isEmpty() );

        assertEquals( 2, allMetaData.size() );

        TopicMetaData topicFoo = getMetaData( allMetaData, "/topics/tbyaml/foo" );
        assertNotNull( topicFoo );

        TopicMetaData topicBar = getMetaData( allMetaData, "/topics/tbyaml/bar" );
        assertNotNull( topicBar );
    }
View Full Code Here

Examples of org.projectodd.polyglot.messaging.destinations.TopicMetaData

    @SuppressWarnings("unchecked")
    public void parse(DeploymentUnit unit, Object dataObject) throws DeploymentUnitProcessingException {
        Map<String, Map<String, Object>> data = (Map<String, Map<String, Object>>) dataObject;

        for (String topicName : data.keySet()) {
            TopicMetaData topicMetaData = new TopicMetaData( topicName );

            Map<String, Object> topicOptions = data.get(topicName);

            if (topicOptions != null) {
                if (topicOptions.containsKey("exported")) {
                    topicMetaData.setExported((Boolean) topicOptions.get("exported"));
                }

                parseRemote(topicMetaData, topicOptions.get("remote"));
            }
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.