diff --git a/example/kafka/kafka.go b/example/kafka/kafka.go index 397284d..6e1e1a5 100644 --- a/example/kafka/kafka.go +++ b/example/kafka/kafka.go @@ -71,14 +71,14 @@ func Shutdown() { } // Subscribe creates a shezmu.Streamer implementation for Kafka messaging queue. -func (s Subscriber) Subscribe(consumer, topic string) shezmu.Streamer { - c, ok := consumers[consumer] +func (s Subscriber) Subscribe(consumerName, topic string) shezmu.Streamer { + c, ok := consumers[consumerName] if !ok { - panic(fmt.Errorf("Consumer %q has no config", consumer)) + panic(fmt.Errorf("Consumer %q has no config", consumerName)) } t, ok := c[topic] if !ok { - panic(fmt.Errorf("Consumer %q has no config for topic %q", consumer, topic)) + panic(fmt.Errorf("Consumer %q has no config for topic %q", consumerName, topic)) } pc, err := kafkaConsumer.ConsumePartition(topic, t.Partition, t.Offset) diff --git a/shezmu.go b/shezmu.go index 6ee5394..854e0c7 100644 --- a/shezmu.go +++ b/shezmu.go @@ -34,7 +34,7 @@ type Actor func() // Subscriber is the interface that is used by daemons to subscribe to messages. type Subscriber interface { - Subscribe(consumer, topic string) Streamer + Subscribe(consumerName, topic string) Streamer } // Streamer is the interface that wraps message consumers. Error handling