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 Details
-
init
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
Optionalcontaining the connection, or empty if no connection exists with that id
-