kafka streaming config

      props.put(StreamsConfig.APPLICATION_ID_CONFIG, "streams-pipe" + taskID)
      props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG,ids(Random.nextInt(ids.size)))
      props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass())
      props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass())
      props.put(StreamsConfig.REQUEST_TIMEOUT_MS_CONFIG,"360000")
      props.put(StreamsConfig.RETRY_BACKOFF_MS_CONFIG,"500")
      props.put(StreamsConfig.RECONNECT_BACKOFF_MS_CONFIG,"5000")
      props.put(ProducerConfig.RETRIES_CONFIG,"5")
      props.put(StreamsConfig.POLL_MS_CONFIG, "100")
      props.put(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, "500")
      props.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "300000")
      props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "5000")
      props.put(ConsumerConfig.FETCH_MAX_WAIT_MS_CONFIG, "1000")
      props.put(ConsumerConfig.CONNECTIONS_MAX_IDLE_MS_CONFIG, "600000")
      props.put("auto.offset.reset", "latest")
      props.put("enable.auto.commit", "false")

猜你喜欢

转载自blog.csdn.net/templarzq/article/details/83068390