Class BrokerConnectionProvider

java.lang.Object
com.sap.cds.services.messaging.jms.BrokerConnectionProvider

public abstract class BrokerConnectionProvider extends Object
This class manages the broker connections to the appropriate messaging services. By default there is only one broker connection of each messaging kind. But if any configuration contains the custom client configuration a new broker connection is created for the service.
  • Constructor Details

    • BrokerConnectionProvider

      public BrokerConnectionProvider(String name)
  • Method Details

    • asyncConnectionInitialization

      public void asyncConnectionInitialization(CdsProperties.Messaging.MessagingServiceConfig config, Consumer<BrokerConnection> consumer)
      Initializes asynchronous the broker connection for the specified messaging service. Notifies the consumer asynchronously when the broker connection is ready to use.
      Parameters:
      config - messaging service configuration
      consumer - connection consumer
    • createBrokerConnection

      protected abstract BrokerConnection createBrokerConnection(String name, Map<String,String> clientProperties) throws Exception
      Creates the broker connection corresponding the specified client configuration properties.
      Parameters:
      name - connection name
      clientProperties - client configuration properties
      Returns:
      broker connection
      Throws:
      Exception - when the connection cannot be created