Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
誰でも知っていますか
kafka.javaapi.producer.Producer
いくつかのメソッド呼び出し (たとえば、いくつかの send(...)) の間で再利用できますか、それとも毎回閉じる必要がありますか?
はい、もちろん再利用可能です。Producerすべてのパーティション (およびおそらく Zookeeper) への接続を確立する必要があるため、作成はかなり遅い操作です。そのため、プロデューサーは可能な限り再利用する必要があります。
Producer