func NewConsumer(addrs []string, groupID string, topics []string, config *Config) (*Consumer, error) {
	client, err := NewClient(addrs, config)
	if err != nil {
		return nil, err
	}
	consumer, err := NewConsumerFromClient(client, groupID, topics)
	if err != nil {
		return nil, err
	}
	consumer.ownClient = true
	return consumer, nil
}
NewConsumer initializes a new consumer
package cluster
import (
	"sort"
	"sync"
	"sync/atomic"
	"time"
	"github.com/Shopify/sarama"
)
type Consumer struct {
	client    *Client
	ownClient bool
	consumer sarama.Consumer
	subs     *partitionMap
	consumerID string
	groupID    string
	memberID     string
	generationID int32
	membershipMu sync.RWMutex
	coreTopics  []string
	extraTopics []string
	dying, dead chan none
	closeOnce   sync.Once
	consuming     int32
	messages      chan *sarama.ConsumerMessage
	errors        chan error
	partitions    chan PartitionConsumer
	notifications chan *Notification
	commitMu sync.Mutex
}