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.


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

The Javadoc is located here.