赞
踩
- Properties props=new Properties();
- props.put("bootstrap.servers", "192.168.1.1:9092");
- props.put("acks", "all");
- props.put("retries", 0);
- props.put("batch.size", 16384);
- props.put("linger.ms", 1);
- props.put("buffer.memory", 33554432);
- props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
- props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-
-
- props.put("security.protocol", "SASL_PLAINTEXT");
- props.put("sasl.mechanism", "SCRAM-SHA-256");
- props.put(SaslConfigs.SASL_JAAS_CONFIG, "org.apache.kafka.common.security.scram.ScramLoginModule required username=admin password=admintest;");
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。