MCPcopy
hub / github.com/IBM/sarama / NewAsyncProducer

Function NewAsyncProducer

async_producer.go:282–288  ·  view source on GitHub ↗

NewAsyncProducer creates a new AsyncProducer using the given broker addresses and configuration.

(addrs []string, conf *Config)

Source from the content-addressed store, hash-verified

280
281// NewAsyncProducer creates a new AsyncProducer using the given broker addresses and configuration.
282func NewAsyncProducer(addrs []string, conf *Config) (AsyncProducer, error) {
283 client, err := NewClient(addrs, conf)
284 if err != nil {
285 return nil, err
286 }
287 return newAsyncProducer(client)
288}
289
290// NewAsyncProducerFromClient creates a new Producer using the given client. It is still
291// necessary to call Close() on the underlying client when shutting down this producer.

Callers 15

runAsyncProducerFunction · 0.92
mainFunction · 0.92
newProducerProviderFunction · 0.92
newProducerProviderFunction · 0.92
newAccessLogProducerFunction · 0.92
TestFuncTxnProduceFunction · 0.70
TestFuncInitProducerId3Function · 0.70

Calls 2

newAsyncProducerFunction · 0.85
NewClientFunction · 0.70