liveBook · Manning

MutinyEmitter

As explained in Quarkus in Action

MutinyEmitter is a reactive-messaging emitter API that sends messages and represents the result as a Mutiny Uni.

MutinyEmitter sends reactive-messaging messages while representing completion as a Mutiny Uni. This lets message acknowledgment join an existing reactive pipeline instead of being handled separately through CompletionStage. section 9.4

Use MutinyEmitter to coordinate asynchronous message delivery with request processing:

  • Inject MutinyEmitter with a channel such as invoices and send an event containing the persisted reservation and computed price. section 9.4
  • Treat the returned Uni as successful only when the produced message is acknowledged; propagate failures so the request reports the problem. section 9.4
  • Attach onFailure().invoke for logging while returning the same Uni to preserve asynchronous success and failure behavior. section 9.4

Reservation and invoice processing

A reservation endpoint persists a reservation, sends an invoice message, and continues the rental flow only after the Billing service acknowledges it. If invoice creation fails, the failure is logged and propagated to the caller. section 9.4

Figure 9.6 The reactive messaging integration in the Reservation service
figure

Shows how reactive messaging connects the Reservation service with downstream invoice processing. section 9.4

How Quarkus in Action covers it

How deep it goes
Explains Uni-based sending, acknowledgment timing, failure logging, and propagation, but does not detail emitter internals.
Examples
Uses a Reservation service sending Invoice messages to a Billing service before continuing rental processing.
What it assumes
Assumes familiarity with reactive endpoints and messaging channels while contrasting Mutiny Uni with CompletionStage.
What you can do after
Apply MutinyEmitter to propagate message acknowledgment and failure through a reactive endpoint pipeline.
How it connects
Connects Mutiny Uni, Emitter, CompletionStage, reactive messaging, acknowledgment, and failure handling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.