Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we really need the default case in the consumer for loop #1153

Open
1 of 7 tasks
yanmxa opened this issue Mar 17, 2024 · 0 comments
Open
1 of 7 tasks

Do we really need the default case in the consumer for loop #1153

yanmxa opened this issue Mar 17, 2024 · 0 comments

Comments

@yanmxa
Copy link

yanmxa commented Mar 17, 2024

Description

I follow the samples in the repository to create a consumer. But I wonder why we need the default case here? Perhaps we don't need default at all? will the e in the fmt.Printf("Ignored %v\n", e) print the pointer or real value? cause the kafka.Event might be a pointer *kafka.Message or a real value kafka.Error.

How to reproduce

Checklist

Please provide the following information:

  • confluent-kafka-go and librdkafka version (LibraryVersion()):
  • Apache Kafka broker version:
  • Client configuration: ConfigMap{...}
  • Operating system:
  • Provide client logs (with "debug": ".." as necessary)
  • Provide broker log excerpts
  • Critical issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant