-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: run next middleware of fail (nack) #29
Conversation
@@ -50,6 +53,7 @@ services: | |||
volumes: | |||
- shared_socket:/tmp | |||
image: softonic/hp-pass-middleware:dev | |||
user: root | |||
environment: | |||
IN_SOCKET: "/tmp/res2" | |||
command: ["-stderrthreshold=INFO"] |
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 had to use root in order for docker-compose to work, as the default user for the images is now 1000:1000
@@ -55,7 +55,14 @@ func (ew *Writer) timeout(ackChannel chan<- messages.Message) { | |||
func (ew *Writer) trigger(ackChannel chan<- messages.Message) { | |||
ew.mutex.Lock() | |||
|
|||
ew.WriteAdapter.ProcessMessages(&ew.msgs) | |||
// filter out messages explicitly n-acked |
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.
Interesting new usage for nack/ack that can be done due to the latest change done from @paupm. I didn't realize this possible usage then.
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.
This nack messages come from a failing middleware, right?
It can also be possible that the middleware works but it nack specific messages for some reason?
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.
the middleware itself does not have control over the messages to nack them, does it?
Only the adapters do as far as I can tell 🤔 (elastic)... and now the middleware manager
Fix middleware pattern: unexpected behaviour
Next middleware should be executed correctly of the message is discarded (nack)