Class AmqpConnector

    • Method Detail

      • getPublisherBuilder

        public org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends Message<?>> getPublisherBuilder​(org.eclipse.microprofile.config.Config config)
        Description copied from interface: IncomingConnectorFactory
        Creates a channel for the given configuration. The channel's configuration is associated with a specific connector, using the Connector qualifier's parameter indicating a key to which IncomingConnectorFactory to use.

        Note that the connection to the transport or broker is generally postponed until the subscription occurs.

        Specified by:
        getPublisherBuilder in interface IncomingConnectorFactory
        Parameters:
        config - the configuration, must not be null, must contain the ConnectorFactory.CHANNEL_NAME_ATTRIBUTE attribute.
        Returns:
        the created PublisherBuilder, will not be null.
      • getSubscriberBuilder

        public org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends Message<?>,​Void> getSubscriberBuilder​(org.eclipse.microprofile.config.Config config)
        Description copied from interface: OutgoingConnectorFactory
        Creates a channel for the given configuration. The channel's configuration is associated with a specific connector, using the Connector qualifier's parameter indicating a key to which Outgoing to use.

        Note that the connection to the transport or broker is generally postponed until the subscription.

        Specified by:
        getSubscriberBuilder in interface OutgoingConnectorFactory
        Parameters:
        config - the configuration, never null, must contain the ConnectorFactory.CHANNEL_NAME_ATTRIBUTE attribute.
        Returns:
        the created SubscriberBuilder, must not be null.
      • 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 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 HealthReporter
        Returns:
        the report
      • getLiveness

        public 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 HealthReporter
        Returns:
        the report
      • reportFailure

        public void reportFailure​(String channel,
                                  Throwable reason)