I just went to add it to the producer and it feels even more wrong. It should be the producer's responsibility to know that its accesses must be serialized, or it should at least have Lock/Unlock methods. Locking a mutex in the producer with no direct relationship to the producer to serialize accesses to the producer smells bad.

I'm actually most inclined to stick a mutex on every concrete implementation of Partitioner and lock in their Partition methods.