Interface RabbitMQConnectorService

All Known Implementing Classes:
RabbitMQConnectorServiceImpl

public interface RabbitMQConnectorService
Service interface for managing multiple named RabbitMQ connections.

Connections are discovered from environment variables with the CONNECTOR_RABBITMQ_ prefix. Each connection is identified by a unique name extracted from the environment variable pattern CONNECTOR_RABBITMQ_<NAME>_CONFIG.

Logging contract:

  • INFO — lifecycle events (initialization start, connection count, connection created)
  • WARNING — recoverable failures (missing config when exit-on-failure is disabled)
  • SEVERE — fatal failures that will cause server shutdown
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves a RabbitMQ connection by its identifier.
    void
    Initializes all RabbitMQ connections discovered from environment variables.
    void
    Shuts down all managed RabbitMQ connections, closing channels and connections.
  • Method Details

    • init

      void init() throws ConnectionInitException
      Initializes all RabbitMQ connections discovered from environment variables.
      Throws:
      ConnectionInitException - if a connection with exit-on-failure enabled fails to initialize
    • shutdown

      void shutdown()
      Shuts down all managed RabbitMQ connections, closing channels and connections.
    • getConnection

      Retrieves a RabbitMQ connection by its identifier.
      Parameters:
      id - the connection identifier (case-sensitive, as extracted from environment variables)
      Returns:
      an Optional containing the connection, or empty if no connection exists with that id