liveBook · Manning

Quarkus-messaging-kafka extension

As explained in Quarkus in Action

A Quarkus extension that integrates Quarkus applications with Kafka messaging.

The quarkus-messaging-kafka extension connects Quarkus applications to Kafka through the SmallRye Kafka connector. Add it when an application needs to publish or consume messages through Kafka topics. section 9.6.1

Use the extension to:

  • Find Kafka-related integrations by listing installable extensions in the messaging category. section 2.7.3
  • Install the extension with quarkus extension add or declare its Maven dependency directly in pom.xml. section 2.7.3
  • Develop locally with packaged Kafka Dev Services, which automatically share a broker among Quarkus applications running in Dev mode. section 9.6.1
  • Bind a reactive messaging channel to SmallRye Kafka and emit typed objects that receive generated Jackson serialization. section 9.6.1

Publishing rental invoice adjustments

A Rental service injects an Emitter<InvoiceAdjust> on the invoices-adjust channel and publishes adjustment messages when a rental ends earlier or later than reserved. A Billing service can consume the same Kafka topic. section 9.6.1

Listing 2.23 quarkus-messaging-kafka extension in the pom.xml dependency
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-messaging-kafka</artifactId>
</dependency>

Shows the Maven dependency added by the Quarkus CLI installation command. section 2.7.3

How Quarkus in Action covers it

How deep it goes
Covers discovery, installation, Dev Services, channel binding, and typed emission, but not broader Kafka operations.
Examples
Uses the invoices-adjust topic and InvoiceAdjust messages between Rental and Billing services.
What it assumes
Assumes a Quarkus application and introduces extension discovery through the CLI; Dev mode supplies the Kafka-compatible broker.
What you can do after
Builds Kafka integration by adding the extension and emitting typed InvoiceAdjust messages on a configured channel.
How it connects
Connects the Quarkus CLI, Maven dependencies, SmallRye Reactive Messaging, Kafka topics, and Dev Services.

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.