producerProps = new Properties();
producerProps.put("serializer.class", "kafka.serializer.StringEncoder");
producerProps.put("zk.connect", "localhost:8888");
consumerProps.setProperty("groupid", "group1");
consumerConfig = new ConsumerConfig(consumerProps);
producerConfig = new ProducerConfig(producerProps);
brokerProps.setProperty("topic.partition.count.map", topic+":2"+",map:2,reduce:2");
brokerProps.setProperty("num.partitions", "10");
brokerProps.setProperty("brokerid", "1");