-
Notifications
You must be signed in to change notification settings - Fork 234
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
Losing Messages Between Producer and Consumer #1031
Comments
Whats strange is if I put a small
I wouldnt expect that sending messages quickly would be an issue. I tried this because in the same app, we are processing all messages, and sending them through another kafka topic, and we never lose a single message in that case. Since it takes some times for records to be processed thats the only difference I could think of (rate of sending messages) and I added the |
Some more info it does seem that all 10k are being sent if the
|
Another note is that the first queue which we lose messages in somehow, we consumer messages at a much slower rate than the second queue in which we lose none. Not sure if that would make any difference either just trying to think of anything at this point. |
One more thing to note - if I send the 10k records to |
@hakan458 : Was this issue resolved? |
@shravan20 No it was not. Worked around it but never solved the issue itself |
Describe the bug
Somehow messages are being lost between the Producer and Consumer.
I have an app in FastAPI which has an endpoint
submit_batch
which uses an aiokafka Producer to send messages to a certain topic. Looks like this:On the other end is a aiokafka Consumer which reads messages until a timeout is reached.
When I send 10000 tasks using the
submit_batch
endpoint, on the consumer side I only end up getting 7000-8000 range usually. Occasionally, maybe 1/10 runs I will get all 10000. I have confirmed that all 10000 are being sent to the endpoint, and keeping a counter there yields 10000. Maybe they are not being sent successfully? But I figuredsend_and_wait
would raise an exception if not? Is there a more deterministic way to check?Expected behaviour
I expect all 10000 messages sent by the Producer to be received by the Consumer
Environment (please complete the following information):
Reproducible example
docker-compose.yml
Have not broken out the problem into its own script.
The text was updated successfully, but these errors were encountered: