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

Function NewConsumer

consumer.go:112–118  ·  view source on GitHub ↗

NewConsumer creates a new consumer using the given broker addresses and configuration.

(addrs []string, config *Config)

Source from the content-addressed store, hash-verified

110
111// NewConsumer creates a new consumer using the given broker addresses and configuration.
112func NewConsumer(addrs []string, config *Config) (Consumer, error) {
113 client, err := NewClient(addrs, config)
114 if err != nil {
115 return nil, err
116 }
117 return newConsumer(client)
118}
119
120// NewConsumerFromClient creates a new consumer using the given client. It is still
121// necessary to call Close() on the underlying client when shutting down this consumer.

Callers 15

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
consumeMsgsFunction · 0.70
TestFuncTxnProduceFunction · 0.70

Calls 2

newConsumerFunction · 0.85
NewClientFunction · 0.70