@Incoming is a MicroProfile Reactive Messaging annotation that marks a CDI method as a consumer of messages from a named channel. The method becomes the sink of a reactive messaging flow, receiving payloads produced elsewhere. section 9.10 section 9.3.2
The annotation takes one channel name, such as "channel-name". A channel normally connects one producer to one consumer, with optional processors between them; each processor uses distinct incoming and outgoing channels. Quarkus delegates the flow to SmallRye Reactive Messaging. section 9.3.2 section 9.10
Consume a channel
@Incoming("channel-name") public void consumer(String payload) { System.out.println(payload); } The method receives each channel payload. A method can also combine @Incoming with @Outgoing to transform messages, while a reactive method can receive and return a Mutiny stream.
@Incoming also supports integration testing. A Quarkus test can declare a consumer for the relevant channel, collect or verify received messages, and use Awaitility when broker delivery is asynchronous. Configure test-only channel properties when the test replaces an application sink. section 9.7.1
