Hi,

I'm testing Kafka 0.8 and I encounter an error when accessing a Producer
from mutliple threads.

I've always thought Producer was thread safe but it seems this is no longer
the case. This is the stack trace of the error I'm getting:

java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
    at java.util.ArrayList$Itr.next(ArrayList.java:791)
    at
scala.collection.JavaConversions$JIteratorWrapper.next(JavaConversions.scala:575)
    at scala.collection.Iterator$class.foreach(Iterator.scala:772)
    at
scala.collection.JavaConversions$JIteratorWrapper.foreach(JavaConversions.scala:573)
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
    at
scala.collection.JavaConversions$JListWrapper.foreach(JavaConversions.scala:615)
    at kafka.producer.Producer.recordStats(Producer.scala:80)
    at kafka.producer.Producer.send(Producer.scala:72)
    at kafka.javaapi.producer.Producer.send(Producer.scala:41)

Mathias.

Reply via email to