Class RabbitMQConnector
java.lang.Object
io.smallrye.reactive.messaging.rabbitmq.RabbitMQConnector
- All Implemented Interfaces:
InboundConnector,OutboundConnector,io.smallrye.reactive.messaging.health.HealthReporter,org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory
@ApplicationScoped
public class RabbitMQConnector
extends Object
implements InboundConnector, OutboundConnector, io.smallrye.reactive.messaging.health.HealthReporter
-
Field Summary
FieldsFields inherited from interface org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory
CHANNEL_NAME_ATTRIBUTE, CONNECTOR_ATTRIBUTE, CONNECTOR_PREFIX, INCOMING_PREFIX, OUTGOING_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidestablishQueue(String channel, RabbitMQConnectorIncomingConfiguration ic) static Stringio.smallrye.reactive.messaging.health.HealthReportgetHealth(boolean strict) io.smallrye.reactive.messaging.health.HealthReportFlow.Publisher<? extends org.eclipse.microprofile.reactive.messaging.Message<?>>getPublisher(org.eclipse.microprofile.config.Config config) Creates a channel for the given configuration.io.smallrye.reactive.messaging.health.HealthReportFlow.Subscriber<? extends org.eclipse.microprofile.reactive.messaging.Message<?>>getSubscriber(org.eclipse.microprofile.config.Config config) Creates a channel for the given configuration.io.vertx.mutiny.core.VertxgetVertx()voidreportIncomingFailure(String channel, Throwable reason) voidApplication shutdown tidy up; cancels all subscriptions and stops clients.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.smallrye.reactive.messaging.health.HealthReporter
getStartup
-
Field Details
-
CONNECTOR_NAME
- See Also:
-
-
Method Details
-
getExchangeName
-
getPublisher
public Flow.Publisher<? extends org.eclipse.microprofile.reactive.messaging.Message<?>> getPublisher(org.eclipse.microprofile.config.Config config) Creates a channel for the given configuration. The channel's configuration is associated with a specificconnector, using theConnectorqualifier's parameter indicating a key to whichIncomingConnectorFactoryto use.Note that the connection to the transport or broker is generally postponed until the subscription occurs.
- Specified by:
getPublisherin interfaceInboundConnector- Parameters:
config- the configuration, must not benull, must contain theConnectorFactory.CHANNEL_NAME_ATTRIBUTEattribute.- Returns:
- the created
Flow.Publisher, will not benull. - Throws:
IllegalArgumentException- if the configuration is invalid.NoSuchElementException- if the configuration does not contain an expected attribute.
-
getSubscriber
public Flow.Subscriber<? extends org.eclipse.microprofile.reactive.messaging.Message<?>> getSubscriber(org.eclipse.microprofile.config.Config config) Creates a channel for the given configuration. The channel's configuration is associated with a specificconnector, using theConnectorqualifier's parameter indicating a key to whichOutgoingto use.Note that the connection to the transport or broker is generally postponed until the subscription.
- Specified by:
getSubscriberin interfaceOutboundConnector- Parameters:
config- the configuration, nevernull, must contain theConnectorFactory.CHANNEL_NAME_ATTRIBUTEattribute.- Returns:
- the created
SubscriberBuilder, must not benull. - Throws:
IllegalArgumentException- if the configuration is invalid.NoSuchElementException- if the configuration does not contain an expected attribute.
-
getReadiness
public io.smallrye.reactive.messaging.health.HealthReport getReadiness()- Specified by:
getReadinessin interfaceio.smallrye.reactive.messaging.health.HealthReporter
-
getLiveness
public io.smallrye.reactive.messaging.health.HealthReport getLiveness()- Specified by:
getLivenessin interfaceio.smallrye.reactive.messaging.health.HealthReporter
-
getHealth
public io.smallrye.reactive.messaging.health.HealthReport getHealth(boolean strict) -
terminate
public void terminate(@Observes(notifyObserver=IF_EXISTS) @Priority(50) @BeforeDestroyed(jakarta.enterprise.context.ApplicationScoped.class) Object ignored) Application shutdown tidy up; cancels all subscriptions and stops clients.- Parameters:
ignored- the incoming event, ignored
-
getVertx
public io.vertx.mutiny.core.Vertx getVertx() -
addClient
-
establishQueue
-
reportIncomingFailure
-
createAckHandler
-