-
Notifications
You must be signed in to change notification settings - Fork 21
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
Failed CRC check should not panic #368
Comments
Hi @christian-ehmig CRC failure should be a race condition.
|
@hiimjako, Any thoughts on that? |
I agree that the client shouldn't panic. |
Thanks for your quick response on this. I can try to reproduce this locally with a docker-compose setup, producers and consumers. However, in our test case, we use a single consumer on a stream queue via a single connection. I doubt it's related to a race condition. The CRC check fails if we "unplug the cable" (kill the virtual machine) of one RMQ cluster node (3 in total). |
What I had in mind for the .NET client was a policy in case CRC fails.
I need to think a bit about that but I agree that panic is too much |
@christian-ehmig FYI: at the moment, we are focusing on #367 |
We can close the TCP client when the CRC is corrupted, hoping that is a temporary problem. |
The producer is blocked when the limit is reached. It is possible to configure the limit using the producerOption.QueueSize setting. Closes: #373 Close the TCP client connection in case of CRC fail. The panic is removed. Closes: #368 Signed-off-by: Gabriele Santomaggio <[email protected]>
Describe the bug
If a CRC check fails
rabbitmq-stream-go-client/pkg/stream/server_frame.go
Line 359 in ab4d470
Any user of your stream client would need to recover() from such a situation.
We are using the "reliable client" and provoke some crash scenarios like taking down one rmq cluster node. While the reconnect seems to work, an enabled CRC check panics in such situations and therefore stops all consumers.
Reproduction steps
Expected behavior
Log the error - reconnect / reset message buffer etc.
Additional context
No response
The text was updated successfully, but these errors were encountered: