Creating a Topic with the Default Number of Partitions

Call the Admin.createTopic(String streamPathAndName, String topicName) method.

Note: The default number of partitions is determined by the defaultPartitions attribute of a stream.

Example

public void createTopicUtilFunction(String streamPathAndName, String topicName) throws IOException{
	Admin streamAdmin = Streams.newAdmin(conf);
	streamAdmin.createTopic(streamPathAndName, topicName);
	streamAdmin.close();		
}

The Javadoc is located here.