{"action":"closed","issue":{"url":"https://api.github.com/repos/bsm/sarama-cluster/issues/47","repository_url":"https://api.github.com/repos/bsm/sarama-cluster","labels_url":"https://api.github.com/repos/bsm/sarama-cluster/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/bsm/sarama-cluster/issues/47/comments","events_url":"https://api.github.com/repos/bsm/sarama-cluster/issues/47/events","html_url":"https://github.com/bsm/sarama-cluster/issues/47","id":161976822,"number":47,"title":"Consumer API not working","user":{"login":"manavgarg","id":1832892,"avatar_url":"https://avatars.githubusercontent.com/u/1832892?v=3","gravatar_id":"","url":"https://api.github.com/users/manavgarg","html_url":"https://github.com/manavgarg","followers_url":"https://api.github.com/users/manavgarg/followers","following_url":"https://api.github.com/users/manavgarg/following{/other_user}","gists_url":"https://api.github.com/users/manavgarg/gists{/gist_id}","starred_url":"https://api.github.com/users/manavgarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manavgarg/subscriptions","organizations_url":"https://api.github.com/users/manavgarg/orgs","repos_url":"https://api.github.com/users/manavgarg/repos","events_url":"https://api.github.com/users/manavgarg/events{/privacy}","received_events_url":"https://api.github.com/users/manavgarg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-23T17:20:43Z","updated_at":"2016-06-24T17:15:58Z","closed_at":"2016-06-24T17:15:58Z","body":"Hey,\r\n\r\nI was using the sarama-cluster high level consumer API. However, I am not getting any messages. The consumer is not consuming anything. Can you please have a look. Here is my code (it is very similiar to one of the examples):\r\n\r\n```\r\n  config := cluster.NewConfig()\r\n  config.Consumer.Return.Errors = true\r\n  consumer, err := cluster.NewConsumer([]string{\"localhost:9092\"}, \"CG1\", []string{\"my_topic2\"}, config)\r\n  if err != nil {\r\n      panic(err)\r\n  }\r\n\r\n  defer func() {\r\n      if err := consumer.Close(); err != nil {\r\n          log.Fatalln(err)\r\n      }\r\n  }()\r\n\r\n  // Trap SIGINT to trigger a shutdown.\r\n  signals := make(chan os.Signal, 1)\r\n  signal.Notify(signals, os.Interrupt)\r\n  consumed := 0\r\n  ConsumerLoop:\r\n  for {\r\n      select {\r\n      case msg := <-consumer.Messages():\r\n          log.Printf(\"Consumed message offset %d, %s\\n\", msg.Offset, string(msg.Value[:]))\r\n          consumed++\r\n      case <-signals:\r\n          break ConsumerLoop\r\n      }\r\n  }\r\n\r\n  log.Printf(\"Consumed: %d\\n\", consumed)\r\n```\r\n\r\n\r\n\r\nPS: The sarama API's for consumer is working for me with a similiar code fragment (I am using partionerconsumer to consume).\r\n\r\n"}}
{"actor":{"display_login":"dim"}}