Re: KafkaProducer.send contract

2015-02-24 Thread JAmes Atwill
> Could you explain a bit more what you want to achieve through batching? > Better throughput or atomicity? Sure! I've assumed that there's per-message atomicity and a per-partition ordering guarantee with KafkaProducer.send(), but nothing beyond that. My hopes are to reduce latency from when my

Re: KafkaProducer.send contract

2015-02-23 Thread Jun Rao
Could you explain a bit more what you want to achieve through batching? Better throughput or atomicity? Thanks, Jun On Thu, Feb 19, 2015 at 4:09 PM, JAmes Atwill wrote: > Hey Jun, > > That's what I've got right now, semaphore before send() and release in the > callback. Am I correct in underst

Re: KafkaProducer.send contract

2015-02-19 Thread JAmes Atwill
Hey Jun, That's what I've got right now, semaphore before send() and release in the callback. Am I correct in understanding that there's no way to do any batching with KafkaProducer itself (other than have a "bulk" message which would just be a single message with multiple messages for a particula

Re: KafkaProducer.send contract

2015-02-19 Thread Jun Rao
You can register a callback for each message sent. The callback will be called when the message is sent successfully or failed. Thanks, Jun On Tue, Feb 17, 2015 at 4:11 PM, JAmes Atwill wrote: > Hi! > > I'm using the new KafkaProducer in 0.8.2.0. > > I have thousands of "Nodes" which receive m

KafkaProducer.send contract

2015-02-17 Thread JAmes Atwill
Hi! I'm using the new KafkaProducer in 0.8.2.0. I have thousands of "Nodes" which receive messages. Each message idempotently mutates the state of the Node, so while duplicate messages are fine, missed messages are not. I'm writing these messages into a topic with dozens of partitions. Am I cor