Package io.quarkiverse.rabbitmqclient
Class RabbitMQClients
- java.lang.Object
-
- io.quarkiverse.rabbitmqclient.RabbitMQClients
-
@Singleton public class RabbitMQClients extends Object
This class is sort of a producerRabbitMQClient
instances.It isn't a CDI producer in the literal sense, but it is created by a synthetic bean from
QuarkusRabbitMQClientProcessor
ThecreateRabbitMQClient
method is called at runtime (seeRabbitMQRecorder.rabbitMQClientSupplier(String)
in order to produce the actualRabbitMQClient
objects.- Author:
- b.passon
-
-
Constructor Summary
Constructors Constructor Description RabbitMQClients(RabbitMQClientsConfig rabbitMQClientsConfig, io.quarkus.runtime.TlsConfig tlsConfig, org.eclipse.microprofile.context.ManagedExecutor executorService, io.quarkus.runtime.LaunchMode launchMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroys theRabbitMQClient
and closes all connections.RabbitMQClient
getRabbitMQClient(String name)
Creates a singletonRabbitMQClient
.
-
-
-
Constructor Detail
-
RabbitMQClients
public RabbitMQClients(RabbitMQClientsConfig rabbitMQClientsConfig, io.quarkus.runtime.TlsConfig tlsConfig, org.eclipse.microprofile.context.ManagedExecutor executorService, io.quarkus.runtime.LaunchMode launchMode)
-
-
Method Detail
-
getRabbitMQClient
public RabbitMQClient getRabbitMQClient(String name)
Creates a singletonRabbitMQClient
.- Parameters:
name
- the name of the rabbit mq client, if null the default is assumed.- Returns:
- a configured
RabbitMQClient
.
-
destroy
public void destroy()
Destroys theRabbitMQClient
and closes all connections.Note: This is called by the Quarkus during shutdown through the ShutdownContext, it therefore does not need @PreDestroy
-
-