Re: sync or async producer

2022-02-15 Thread frakass
Hello, I did a test with these two rb scripts which take the time almost the same. do you have the further idea? $ cat async-pub.rb require 'kafka' kafka = Kafka.new("localhost:9092", client_id: "ruby-client", resolve_seed_brokers: true) producer = kafka.async_producer(required_acks:

Re: sync or async producer

2022-02-15 Thread Luke Chen
Hi frakass, I think the most difference for sync and async send (or "publish" like you said), is the throughput. You said the performance is almost the same, and I would guess the "acks" config in your environment might be 0? Or maybe the produce rate is slow? Or

sync or async producer

2022-02-15 Thread frakass
for a producer, is there a principle that when to use sync publishing, and when to use async publishing? for the simple format messages, i have tested both, their performance are almost the same. Thank you. frakass