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

Function NewConsumerGroup

consumer_group.go:116–127  ·  view source on GitHub ↗

NewConsumerGroup creates a new consumer group the given broker addresses and configuration.

(addrs []string, groupID string, config *Config)

Source from the content-addressed store, hash-verified

114
115// NewConsumerGroup creates a new consumer group the given broker addresses and configuration.
116func NewConsumerGroup(addrs []string, groupID string, config *Config) (ConsumerGroup, error) {
117 client, err := NewClient(addrs, config)
118 if err != nil {
119 return nil, err
120 }
121
122 c, err := newConsumerGroup(groupID, client)
123 if err != nil {
124 _ = client.Close()
125 }
126 return c, err
127}
128
129// NewConsumerGroupFromClient creates a new consumer group using the given client. It is still
130// necessary to call Close() on the underlying client when shutting down this consumer.

Callers 10

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
ExampleConsumerGroupFunction · 0.85
TestConsume_RaceTestFunction · 0.85
TestConsumerGroupReasonFunction · 0.85

Calls 3

CloseMethod · 0.95
newConsumerGroupFunction · 0.85
NewClientFunction · 0.70