Closed joestein closed 10 years ago
Now resource uses a single instance of producer. From kafka sources (kafka.producer.Producer#send) it seems that its safe to use one producer per several threads. Producer now operates always in async mode. In other case one HTTP produce request will block others. Remove POST async parameter.
Just a note: it is safe to use a single producer across threads because it is threadsafe but, depending on your load, you'll hit a bottleneck if you don't use a pool. At least, that's what I found.
have one instance of a producer and then for the different topic names and partition key something like /producer// and then make the body (like you are saying) be the message.