// NewWriter create new configured kafka writer
NewWriter create new configured kafka writer
// NewWriter create new configured kafka writer
func NewWriter(brokers []string, errLogger kafka.Logger) *kafka.Writer {
	w := &kafka.Writer{
		Addr:         kafka.TCP(brokers...),
		Balancer:     &kafka.LeastBytes{},
		RequiredAcks: writerRequiredAcks,
		MaxAttempts:  writerMaxAttempts,
		ErrorLogger:  errLogger,
		Compression:  compress.Snappy,
		ReadTimeout:  writerReadTimeout,
		WriteTimeout: writerWriteTimeout,
		Async:        false,
	}
	return w
}
func NewWriter ( brokers [ ] string , errLogger kafka . Logger ) * kafka . Writer { w := & kafka . Writer { Addr : kafka . TCP ( brokers ... ) , Balancer : & kafka . LeastBytes { } , RequiredAcks : writerRequiredAcks , MaxAttempts : writerMaxAttempts , ErrorLogger : errLogger , Compression : compress . Snappy , ReadTimeout : writerReadTimeout , WriteTimeout : writerWriteTimeout , Async : false , } return w }
NewWriter create new configured kafka writer
NewWriter create new configured kafka writer