Comments (5)
Nevermind. It appears that it is actually Kafka that is failing to send the response to the metadata request after the fetch request.
from kafka-net.
OK, after more investigation, there is actually a problem with kafka-net. The problem is that a kafka broker (in 0.8.2.1 at least) will not process a produce request while a fetch request is waiting for data. This is a problem with kafka-net because as soon as it yields the results of one fetch request, it sends a new fetch request immediately in another thread. This ultimately makes it impossible to use the BrokerRouter to do any publishes that end up being sent to the same broker.
Note: I think this is really poor behavior by Kafka. Its network protocol is described as though it could work this way (with correlation ids and all) but it does not seem to work that way.
from kafka-net.
In fact, they document that it does not work this way because all requests on a particular socket are ordered:
"The server guarantees that on a single TCP connection, requests will be processed in the order they are sent and responses will return in that order as well. The broker's request processing allows only a single in-flight request per connection in order to guarantee this ordering. Note that clients can (and ideally should) use non-blocking IO to implement request pipelining and achieve higher throughput. i.e., clients can send requests even while awaiting responses for preceding requests since the outstanding requests will be buffered in the underlying OS socket buffer. All requests are initiated by the client, and result in a corresponding response message from the server except where noted."
from kafka-net.
See discussion here: http://www.mail-archive.com/[email protected]/msg27430.html
This reply suggests that Consumers and Producers should actually not reuse the connection used by the BrokerRouter at all, and each instance should create its own connection for fetch/produce requests. The claim by the protocol wiki page that you should only ever need one connection between each broker and a client is no longer true and is going to be removed. The new Java consumers will all maintain their own connections.
from kafka-net.
Thanks warren, ill have a close read of that. Got pretty sick the last several weeks. So I am just getting back into things now.
from kafka-net.
Related Issues (20)
- kafka-net for .NET Core HOT 2
- Max message size 4096 bytes? HOT 1
- OOM error
- Current development status ? HOT 1
- Does this library already contain support for Kafka Streams introduced in Kafka 0.10 HOT 1
- Send producer problem when the service broker is offline HOT 1
- Kafka-net Producer hangs When Sending Inside ArcMap
- Best way to persist and start from a Offset HOT 1
- "This protocol version is not supported." HOT 1
- Is it possible to alter the Whitelist while consuming messages?
- Can i use this library for open tracing using zipkin
- I am getting KafkaNet.Protocol.ResponseTimeoutException when sending data to kafka topic.Is there any way to overcome this issue?
- SendMessageAsync of Producer not completing
- hotspot issue with sendMessageAsync on partition level HOT 1
- It cannot connect to the localhost:9092
- kafka-net .Net Core version HOT 1
- How to List all Topics
- Support of StreamsAPI or connector API
- Buffer underrun. Increasing buffer size
- Kafka Cluster Issue when API Version =1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-net.