liveBook · Manning

Connector

As explained in Quarkus in Action

A connector is a MicroProfile Reactive Messaging service-provider interface implementation that bridges a messaging channel to an external messaging provider.

A connector is a MicroProfile Reactive Messaging service-provider interface implementation that extends application channels to external messaging providers. It forms the boundary between a reactive message flow and services such as Kafka, RabbitMQ, or JMS, while keeping channel code unchanged. section 9.3 section 9.5.1

In Quarkus, SmallRye Reactive Messaging supplies the connector implementation. Application methods still use @Incoming and @Outgoing; per-channel configuration determines whether messages are pushed to or pulled from a remote provider. Changing that configuration can remap a channel without changing reactive messaging code. section 9.10 section 9.5.1

Configure connectors through standard MicroProfile Reactive Messaging properties:

  • Set the connector for each incoming or outgoing channel; a channel used in both directions requires separate directional configuration. section 9.5.2
  • Use implementation-defined names such as smallrye-kafka, smallrye-rabbitmq, or smallrye-jms. section 9.5.1
  • Add provider connection settings, such as a Kafka production endpoint or JMS queue URL; Dev Services can supply development connections. section 9.5.2 section 9.10
  • Remember that unconfigured channels use the in-memory connector by default, and an in-memory channel takes precedence when applicable. section 9.5.2

One reactive pipeline, different brokers

A Billing service can exchange asynchronous messages with a Reservation service through RabbitMQ using AMQP 0-9-1 and communicate with a Rental service through Kafka. The reactive pipeline remains based on @Incoming and @Outgoing, while connector configuration selects each remote provider. section 9.9

Figure 9.7 The connectors architecture
figure

Use the architecture diagram to trace the connector boundary between application channels and remote messaging services. section 9.5.1

How Quarkus in Action covers it

How deep it goes
Defines the SPI, provider abstraction, naming, and directional configuration, but stops short of connector implementation internals.
Examples
Uses Kafka, RabbitMQ, JMS, in-memory channels, and a Billing service communicating with Reservation and Rental services.
What it assumes
Assumes familiarity with CDI beans, @Incoming, @Outgoing, channels, and standard configuration while retaining in-memory defaults.
What you can do after
Operate/configure Quarkus messaging channels against external brokers without rewriting reactive messaging code.
How it connects
Connects MicroProfile Reactive Messaging, SmallRye Reactive Messaging, CDI beans, channels, Kafka, RabbitMQ, JMS, and Dev Services.

Also explained in

Compare how 7 books explain connector →

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.