func NewWriter(w KafkaWriter, buffSize int) *Writer {
	return &Writer{
		client:           w,
		bufferSize:       buffSize,
		bufferedMessages: make([]kafka.Message, 0),
	}
}
NewWriter returns a instance for writer used over kafka client
package meta
import (
	"context"
	"fmt"
	"github.com/segmentio/kafka-go"
)
type KafkaWriter interface {
	WriteMessages(context.Context, ...kafka.Message) error
	Close() error
	Stats() kafka.WriterStats
}
type Writer struct {
	client           KafkaWriter
	bufferSize       int
	bufferedMessages []kafka.Message
}