confluentinc / examples

Apache Kafka and Confluent Platform examples and demos
Apache License 2.0
1.92k stars 1.12k forks source link

Example does not specify timeouts that need to be set #643

Open h5chauhan opened 4 years ago

h5chauhan commented 4 years ago

https://github.com/confluentinc/examples/blob/fccdebfd978ec5d994d39264320ba937fd589d8b/clients/cloud/ruby/c_cloud.rb#L37

In the example creating the client, there is no reference to necessary timeouts clients need to set in order for them to work on ccloud.

ybyzek commented 4 years ago

@l0n3r4n83r the default timeouts are good for most scenarios. Are there any particular settings that you have needed to adjust and why? cc: @confluentinc/clients

h5chauhan commented 4 years ago

I understand the socket timeout set in the ruby-kafka lib is 10 sec but we have been advised by confluent support to increase that timeout to up to 30 seconds.

In one case we are told to use a timeout quote

For Confluent Cloud we set connections.max.idle.ms = 600000

And if we look at the docs for configuring java clients we see

request.timeout.ms=20000
retry.backoff.ms=500

https://docs.confluent.io/current/cloud/using/config-client.html