diff --git a/examples/consumer_example/consumer_example.go b/examples/consumer_example/consumer_example.go index 60dfdfaef..b3f21f75d 100644 --- a/examples/consumer_example/consumer_example.go +++ b/examples/consumer_example/consumer_example.go @@ -70,6 +70,11 @@ func main() { err = c.SubscribeTopics(topics, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Failed to subscribe to topics: %v\n", err) + os.Exit(1) + } + run := true for run {