Class AmqpConnector

  • All Implemented Interfaces:
    io.smallrye.reactive.messaging.health.HealthReporter, org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory, org.eclipse.microprofile.reactive.messaging.spi.IncomingConnectorFactory, org.eclipse.microprofile.reactive.messaging.spi.OutgoingConnectorFactory

    @ApplicationScoped
    public class AmqpConnector
    extends Object
    implements org.eclipse.microprofile.reactive.messaging.spi.IncomingConnectorFactory, org.eclipse.microprofile.reactive.messaging.spi.OutgoingConnectorFactory, io.smallrye.reactive.messaging.health.HealthReporter
    • Method Detail

      • getPublisherBuilder

        public org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends org.eclipse.microprofile.reactive.messaging.Message<?>> getPublisherBuilder​(org.eclipse.microprofile.config.Config config)
        Specified by:
        getPublisherBuilder in interface org.eclipse.microprofile.reactive.messaging.spi.IncomingConnectorFactory
      • getSubscriberBuilder

        public org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends org.eclipse.microprofile.reactive.messaging.Message<?>,​Void> getSubscriberBuilder​(org.eclipse.microprofile.config.Config config)
        Specified by:
        getSubscriberBuilder in interface org.eclipse.microprofile.reactive.messaging.spi.OutgoingConnectorFactory
      • terminate

        public void terminate​(@Observes(notifyObserver=IF_EXISTS) @Priority(50) @BeforeDestroyed(javax.enterprise.context.ApplicationScoped.class)
                              Object event)
      • getVertx

        public io.vertx.mutiny.core.Vertx getVertx()
      • addClient

        public void addClient​(io.vertx.mutiny.amqp.AmqpClient client)
      • getClients

        public List<io.vertx.mutiny.amqp.AmqpClient> getClients()
      • getReadiness

        public io.smallrye.reactive.messaging.health.HealthReport getReadiness()
        Readiness verify that we have an established connection with the broker. If the connection is disconnected, readiness is set to false. However, liveness may still be true because of the retry.
        Specified by:
        getReadiness in interface io.smallrye.reactive.messaging.health.HealthReporter
        Returns:
        the report
      • getLiveness

        public io.smallrye.reactive.messaging.health.HealthReport getLiveness()
        Liveness checks if a connection is established with the broker. Liveness is set to false after all the retry attempt have been re-attempted.
        Specified by:
        getLiveness in interface io.smallrye.reactive.messaging.health.HealthReporter
        Returns:
        the report
      • getStartup

        public io.smallrye.reactive.messaging.health.HealthReport getStartup()
        Specified by:
        getStartup in interface io.smallrye.reactive.messaging.health.HealthReporter
      • reportFailure

        public void reportFailure​(String channel,
                                  Throwable reason)