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
