A Message is a reactive-messaging wrapper around a produced payload. It moves through channels between CDI bean methods and can carry processing control in addition to application data. Most Quarkus messaging code consumes payloads directly, but consuming Message exposes the received payload together with explicit acknowledgement operations. section 9.10 section 9.3.3
Use Message when processing requires control over acknowledgement behavior:
- Read the application value with getPayload(). section 9.3.3
- Call ack() after successful processing to positively acknowledge the received message. section 9.3.3
- Call nack(Throwable) when processing fails and the failure must be propagated. section 9.3.3
- Return a modified message with withPayload(...) when forwarding the message through another channel. section 9.8.2
Manual acknowledgement
A consumer selects MANUAL acknowledgement and decides whether processing succeeds: on success it returns message.ack(); otherwise it returns message.nack(...) with the processing error. The method therefore controls acknowledgement rather than relying on Quarkus's implicit strategy. section 9.3.3
Listing 9.2 A manual acknowledgement example
@Incoming("channel-name")
@Acknowledgment(Acknowledgment.Strategy.MANUAL) #1
public CompletionStage<Void> consumer(Message<String> message) {
if (processMessage(message.getPayload())) {
return message.ack();
} else {
return message.nack(
new IllegalStateException(
"Cannot process message " + message.getPayload()));
}
}
Inspect the complete Java consumer showing @Incoming, @Acknowledgment(MANUAL), payload processing, ack(), and nack(Throwable). section 9.3.3






