-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Batch Consumer breaks when Consumer Timeout is reached #5387
Comments
First, a few points:
MassTransit is like a sharp pair of scissors, if you aren't careful, you can cut yourself. That stated, it's an interesting way to simulate these failures (broker closing channel). |
Also, maybe there should be other type of BatchConsumer, that doesn't fetch messages from the queue until there are enough messages to fill the batch or if time limit is exceeded. |
Messages are pushed from the broker, not pulled, so an "other type of batch consumer" isn't even feasible. |
Ah, ok, I see. Though I don't agree about feasibility, at least with RabbitMQ as a transport. Something like this could be done by starting/stopping the consumer with BasicConsume/BasicCancel, but I guess the solution will be messy because of the possible concurrency issues. |
…ed from the batch. Empty batches should be "ignored."
I kept this issue open to give myself a reminder to add cancellation to batch consumers, now that's done and this will be closed. |
Contact Details
No response
Version
8.x (develop, pre-release), 8.x
On which operating system(s) are you experiencing the issue?
Windows
Using which broker(s) did you encounter the issue?
RabbitMQ
What are the steps required to reproduce the issue?
What is the expected behavior?
What actually happened?
Connection is broken due to timeout, then it is restored and messages are processed right away, but they are not acknowledged. After a few more minutes connection is broken once again, then it recovers and again starts processing same messages without acknowledging them.
Related log output, including any exceptions
Link to repository that demonstrates/reproduces the issue
https://github.com/Sirozha1337/rabbitmq-masstransit-batch-timeout-repro
The text was updated successfully, but these errors were encountered: