You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by R Krishna <kr...@gmail.com> on 2016/06/15 21:03:19 UTC

Re: Configuring client-side timeouts in the Java Producer so that send() doesn't block

Any luck trying to figure out this problem?

On Wed, May 18, 2016 at 10:53 AM, Samuel Chase <sa...@gmail.com> wrote:

> Hello Ismael,
>
> On Wed, May 18, 2016 at 5:54 PM, Ismael Juma <is...@juma.me.uk> wrote:
> > Your second example should work as well. Can you please include the code
> > you are using to test the scenario and what Kafka version you are using
> > (0.9.0.0 or 0.9.0.1, I guess)?
>
> This is the code I'm using:
>
> ```
> (with-open [p (producer {"bootstrap.servers" "192.168.33.20:9091"
>                          "max.block.ms" "500"
>                          "request.timeout.ms" "1000"
>                          "metadata.fetch.timeout.ms" "10000"}
>                         (byte-array-serializer)
>                         (byte-array-serializer))]
>   (.get (send p (record "test" (.getBytes "Kafka Up."))))
>   (Thread/sleep 10000) ; While it sleeps, I shut down Kafka.
>   (.get (send p (record "test" (.getBytes "Kafka Down")))))
>
> ```
>
> Kafka version: 0.9.0.0
> clj-kafka version: 0.3.4
>
> Samuel
>



-- 
Radha Krishna, Proddaturi
253-234-5657