It's better to use single producer.
closing() and recreating only result in unnecessary overhead and does
not give you any advantages.
-Matthias
On 12/18/17 3:12 AM, Shubham Dhoble wrote:
> I am accessing kafka through java code. The use case is, I want to publish
> stream of messages on two ka
I am accessing kafka through java code. The use case is, I want to publish
stream of messages on two kafka topic, which would be in a transaction.
My point of concern is would it be better to use one single global kafka
producer for all messages or invoking and deleting a new kafkaPoducer for
ever