Skip to content
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

The NACK handler for incoming messages is not executed when an exception occurs during processing while using a signature method that receives a single payload and produces a stream of payloads #2732

Closed
pawel-boguski-ds opened this issue Aug 20, 2024 · 0 comments
Labels

Comments

@pawel-boguski-ds
Copy link

According to the documentation: https://smallrye.io/smallrye-reactive-messaging/4.24.0/concepts/acknowledgement/#negative-acknowledgement

If your method uses the POST_PROCESSING acknowledgment strategy, and the method fails (either by throwing an exception or by producing a failure), the message is automatically nacked with the caught exception

And later:

For method receiving a single payload and producing a stream of payloads, it defaults to pre-processing acknowledgement. However, in this case, post-processing is supported. It waits for all the produced messages to be acknowledged before acknowledging the received one. If one of the produced message is nacked, the received one is nacked immediately.

So post-processing is supported for method receiving a single payload and producing a stream of payloads. But I observed that exception thrown during processing of a message is not causing the nack of the message but rather the application stops processign the channel.
This behavior makes the signature not useful as it’s not possible to use nack.

@Incoming("in")
@Outgoing("out")
Multi<Payload> process(Payload data) {
   // exception thrown here is not causing the nack of incomming message
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants