p.config=sarama.NewConfig()// Instantiate a sarama Config
p.config=sarama.NewConfig()// Instantiate a sarama Config
p.config.Producer.Return.Successes=true// Whether to enable the successes channel to be notified after the message is sent successfully
p.config.Producer.Return.Successes=true// Whether to enable the successes channel to be notified after the message is sent successfully
p.config.Producer.Return.Errors=true
p.config.Producer.Return.Errors=true
p.config.Producer.RequiredAcks=sarama.WaitForAll// Set producer Message Reply level 0 1 all
p.config.Producer.Partitioner=sarama.NewHashPartitioner// Set the hash-key automatic hash partition. When sending a message, you must specify the key value of the message. If there is no key, the partition will be selected randomly
p.config.Producer.Partitioner=sarama.NewHashPartitioner// Set the hash-key automatic hash partition. When sending a message, you must specify the key value of the message. If there is no key, the partition will be selected randomly