Class RabbitMQConnector

    • Method Detail

      • getPublisherBuilder

        public org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends Message<?>> getPublisherBuilder​(org.eclipse.microprofile.config.Config config)
        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.
        Throws:
        IllegalArgumentException - if the configuration is invalid.
        NoSuchElementException - if the configuration does not contain an expected attribute.
      • getSubscriberBuilder

        public org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? extends Message<?>,​Void> getSubscriberBuilder​(org.eclipse.microprofile.config.Config config)
        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.
        Throws:
        IllegalArgumentException - if the configuration is invalid.
        NoSuchElementException - if the configuration does not contain an expected attribute.
      • getHealth

        public HealthReport getHealth​(boolean strict)
      • terminate

        public void terminate​(@Observes(notifyObserver=IF_EXISTS) @Priority(50) @BeforeDestroyed(javax.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

        public void addClient​(io.vertx.mutiny.rabbitmq.RabbitMQClient client)
      • reportIncomingFailure

        public void reportIncomingFailure​(String channel,
                                          Throwable reason)