-
Notifications
You must be signed in to change notification settings - Fork 206
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
reject a faulty delivery logic #147
Conversation
Lines Of Code
|
Go API Changes# summary Inferred base version: v5.1.2 Suggested version: v5.1.3 |
eventuallyUnacked(t, queue, 0) | ||
eventuallyRejected(t, queue, 6) | ||
|
||
require.Len(t, consumer.Deliveries(), 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if it's correct. I want to figure out why we have no deliveries. They should be rejected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I double-checked. This is an expected behaviour, we don't push those deliveries into the delivery channel.
Unit Test Coveragetotal: (statements) 71.8% Coverage of changed lines
Coverage diff with base branch
|
Benchmark ResultBenchmark diff with base branch
Benchmark result
|
queue.go
Outdated
} | ||
|
||
rejectErr := rd.Reject() | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if err != nil { | |
if rejectErr != nil { |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thank you! It was a bug!
Co-authored-by: Christian Wellenbrock <christian.wellenbrock@gmail.com>
Messages with broken headers (for example, without a separator) has never been rejected and stayed forever in unack.
This PR fixes the bug. If there is an error creating a delivery, we will reject it.