Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. def get(): Properties = {
  2. val config = new Properties();
  3. config.put("client.id", InetAddress.getLocalHost().getHostName());
  4. config.put("bootstrap.servers", "YOUR_BOOT_STRAP_SERVER:9092");
  5. config.put("acks", "all");
  6. config.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, classOf[StringSerializer]);
  7. config.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, classOf[io.confluent.kafka.serial
  8. config.put("schema.registry.url", "YOUR_SCHEMA_REGISTRY:8081");
  9.  
  10.  
  11. config.put("max.request.size", "15728640")
  12. config
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement