intermittent Object reference issue occurring while consuming continously
See original GitHub issueDescription
We are getting the below exception intermittently
System.NullReferenceException: Object reference not set to an instance of an object. at Confluent.Kafka.ConsumeResult`2.get_Value() at
How to reproduce
- created two consumer ( running 2 instance ) and subscribed with same topic.
- Running both consumers
- consuming kafka messages continuously
- After sometime both consumer throwing same exception and almost same time
Then i tried with single consumer and got same issue again Checklist
Please provide the following information:
- A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
- Confluent.Kafka nuget version.
- Apache Kafka version.
- Client configuration.
- Operating system.
- Provide logs (with “debug” : “…” as necessary in configuration).
- Provide broker log excerpts.
- Critical issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Tracking down intermittent 'Object reference not set to an ...
An "Object reference not set to an instance of an object" is clearly a run-time error, not a compile-time error. So what that...
Read more >object reference not set to an instance of an object error is ...
After removing then re-adding the account, is this happening after adding a new item? The redacted location could be the clue. Frank_Fazio June ......
Read more >Object Reference Not Set to an Instance of an Object
This infamous and dreaded error message happens when you get a NullReferenceException. This exception is thrown when you try to access a member—for...
Read more >Reference counting
Whenever a reference is destroyed or overwritten, the reference count of the object it references is decremented, and whenever one is created or...
Read more >What Is 'Object reference not set to an instance of ...
The “Object reference not set to an instance of an object” error is a common error message in cloud projects. It typically occurs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
furthering this, we’ve depreciated convenience methods on
ConsumeResult
in v1.4.0 and later, and they’ll be removed in 2.0.@AndrewGumenyuk - yep. the history here is that at one point, the API was such that it wasn’t possible for
Message
to benull
, and this is a hang over from that. The pass-through properties on ConsumeResult just exist as a convenience. This is confusing a lot of people, so I’m becoming more inclined to remove the properties on ConsumeResult that just reference properties in Message as you, and others suggest. However we can’t do this until we version it 2.0 since the change is breaking. The timing of that will depend on other clients too as we’ll want to move all the versions together. The downside is it will impact a lot of people, so there’s a tradeoff here.