Browse Source

Merge pull request #621 from Shopify/doc-consumergroup

Put "no consumergroups" in the docs more times
Evan Huus 9 years ago
parent
commit
f26080eb84
3 changed files with 18 additions and 5 deletions
  1. 7 0
      config.go
  2. 4 3
      consumer.go
  3. 7 2
      sarama.go

+ 7 - 0
config.go

@@ -121,6 +121,13 @@ type Config struct {
 
 
 	// Consumer is the namespace for configuration related to consuming messages,
 	// Consumer is the namespace for configuration related to consuming messages,
 	// used by the Consumer.
 	// used by the Consumer.
+	//
+	// Note that Sarama's Consumer type does not currently support automatic
+	// consumer-group rebalancing and offset tracking.  For Zookeeper-based
+	// tracking (Kafka 0.8.2 and earlier), the https://github.com/wvanbergen/kafka
+	// library builds on Sarama to add this support. For Kafka-based tracking
+	// (Kafka 0.9 and later), the https://github.com/bsm/sarama-cluster library
+	// builds on Sarama to add this support.
 	Consumer struct {
 	Consumer struct {
 		Retry struct {
 		Retry struct {
 			// How long to wait after a failing to read from a partition before
 			// How long to wait after a failing to read from a partition before

+ 4 - 3
consumer.go

@@ -41,9 +41,10 @@ func (ce ConsumerErrors) Error() string {
 // on a consumer to avoid leaks, it will not be garbage-collected automatically when it passes out of
 // on a consumer to avoid leaks, it will not be garbage-collected automatically when it passes out of
 // scope.
 // scope.
 //
 //
-// Sarama's Consumer type does not currently support automatic consumer group rebalancing and offset tracking,
-// however the https://github.com/wvanbergen/kafka library builds on Sarama to add this support. We plan
-// to properly integrate this functionality at a later date.
+// Sarama's Consumer type does not currently support automatic consumer-group rebalancing and offset tracking.
+// For Zookeeper-based tracking (Kafka 0.8.2 and earlier), the https://github.com/wvanbergen/kafka library
+// builds on Sarama to add this support. For Kafka-based tracking (Kafka 0.9 and later), the
+// https://github.com/bsm/sarama-cluster library builds on Sarama to add this support.
 type Consumer interface {
 type Consumer interface {
 
 
 	// Topics returns the set of available topics as retrieved from the cluster
 	// Topics returns the set of available topics as retrieved from the cluster

+ 7 - 2
sarama.go

@@ -1,9 +1,14 @@
 /*
 /*
-Package sarama provides client libraries for the Kafka 0.8 protocol. The AsyncProducer object is the high-level
-API for producing messages asynchronously; the SyncProducer provides a blocking API for the same purpose.
+Package sarama provides client libraries for the Kafka protocol (versions 0.8 and later). The AsyncProducer object
+is the high-level API for producing messages asynchronously; the SyncProducer provides a blocking API for the same purpose.
 The Consumer object is the high-level API for consuming messages. The Client object provides metadata
 The Consumer object is the high-level API for consuming messages. The Client object provides metadata
 management functionality that is shared between the higher-level objects.
 management functionality that is shared between the higher-level objects.
 
 
+Note that Sarama's Consumer type does not currently support automatic consumer-group rebalancing and offset tracking.
+For Zookeeper-based tracking (Kafka 0.8.2 and earlier), the https://github.com/wvanbergen/kafka library
+builds on Sarama to add this support. For Kafka-based tracking (Kafka 0.9 and later), the
+https://github.com/bsm/sarama-cluster library builds on Sarama to add this support.
+
 For lower-level needs, the Broker and Request/Response objects permit precise control over each connection
 For lower-level needs, the Broker and Request/Response objects permit precise control over each connection
 and message sent on the wire.
 and message sent on the wire.