Dev Services for Pulsar
With Quarkus Smallrye Reactive Messaging Pulsar extension (
Dev Services for Pulsar automatically starts a Pulsar broker in dev mode and when running tests.
So, you don’t have to start a broker manually.
The application is configured automatically.
Dev Services for Pulsar is automatically enabled unless:
quarkus.pulsar.devservices.enabledis set to
all the Reactive Messaging Pulsar channels have the
Dev Services for Pulsar relies on Docker to start the broker.
If your environment does not support Docker, you will need to start the broker manually, or connect to an already running broker.
You can configure the broker address using
Most of the time you need to share the broker between applications. Dev Services for Pulsar implements a service discovery mechanism for your multiple Quarkus applications running in dev mode to share a single broker.
Dev Services for Pulsar starts the container with the
quarkus-dev-service-pulsar label which is used to identify the container.
If you need multiple (shared) brokers, you can configure the
quarkus.pulsar.devservices.service-name attribute and indicate the broker name.
It looks for a container with the same value, or starts a new one if none can be found.
The default service name is
Sharing is enabled by default in dev mode, but disabled in test mode.
You can disable the sharing with
By default, Dev Services for Pulsar picks a random port and configures the application.
You can set the port by configuring the
Note that the Pulsar advertised address is automatically configured with the chosen port.
Dev Services for Pulsar supports the official Apache Pulsar image.
A custom image name can be configured as such:
You can configure the Dev Services for Pulsar with custom broker configuration.
The following example enables transaction support: