How about making UUID.randomUUID.toString() the default in KeyedMessage
instead of null if not supplied

def this(topic: String, message: V) = this(topic, UUID.randomUUID.toString(),
message)

and if you want the random refresh behavior then pass in "*" on the
KeyedMessage construction which we can then later check for in
defaulteventhandler

 val partition =
      if(key =="*") {

we then throw NPE if key == null in KeyedMessage like we do topic

I believe any null flow control logic is something to shy away from

if this is wrong or too much or still not the best solution we could also
hold over and just put this in the FAQ with the JIRA and let people know
when they run into this and want to randomize in development / testing and
in many production situations where the producer count is not large enough
then they have to pass in their own continuous random key... if we can get
a consensus for what we want to-do with minimal changes then I think it is
important for 0.8 otherwise wait.

On Sun, Sep 29, 2013 at 12:14 PM, Jun Rao <[EMAIL PROTECTED]> wrote:
 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB