Counting the Topics that are in a Stream

Call the Admin.countTopics(String streamPathAndName) method.

Example

public int countTopicsUtilFunction(String streamPathAndName){
	Admin streamAdmin = Streams.newAdmin(conf);
	int count = streamAdmin.countTopics(streamPathAndName);
	streamAdmin.close();
	return count;
}

The Javadoc is located here.