Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Id string *sarama.Config Pool struct { NumOfWorkers int } BootstrapServers []string RequiredAcks RequiredAcks Partitioner Partitioner Logger log.PrefixedLogger MetricsReporter metrics.Reporter }
type Pool ¶
type Pool struct { NumOfWorkers int64 // contains filtered or unexported fields }
type Producer ¶
type Producer interface { Produce(ctx context.Context, message *consumer.Record) (partition int32, offset int64, err error) ProduceBatch(ctx context.Context, messages []*consumer.Record) error Close() error }
func NewProducer ¶
type RequiredAcks ¶
type RequiredAcks int
const ( // NoResponse doesn't send any response, the TCP ACK is all you get. NoResponse RequiredAcks = 0 // WaitForLeader waits for only the local commit to succeed before responding. WaitForLeader RequiredAcks = 1 // WaitForAll waits for all in-sync replicas to commit before responding. // The minimum number of in-sync replicas is configured on the broker via // the `min.insync.replicas` configuration key. WaitForAll RequiredAcks = -1 )
func (RequiredAcks) String ¶
func (ack RequiredAcks) String() string
Click to show internal directories.
Click to hide internal directories.