Class BasicConnectionFactoryBuilder


@ComponentProfile(summary="Basic RabbitMQ Connection Builder", since="4.3.0") public class BasicConnectionFactoryBuilder extends SimpleConnectionFactoryBuilder
A basic connection factory for RabbitMQ.

Extends SimpleConnectionFactoryBuilder and provides obfuscated password support. Both fields are entirely optional and you may still override the username and password via the URL. If the username and password are not explicitly specified then it may well default to guest/guest which appears to be the RabbitMQ SDK defaults.

  • Constructor Details

    • BasicConnectionFactoryBuilder

      public BasicConnectionFactoryBuilder()
  • Method Details

    • build

      public com.rabbitmq.client.ConnectionFactory build() throws Exception
      Description copied from class: ConnectionFactoryBuilder
      Build the connection factory.
      Overrides:
      build in class SimpleConnectionFactoryBuilder
      Throws:
      Exception
    • withCredentials

      public <T extends BasicConnectionFactoryBuilder> T withCredentials(String u, String p)
    • setUsername

      public void setUsername(String username)
      The username used to connection to the broker.

      If you do not explicitly override the user then it is likely to default to guest which appears to be the RabbitMQ SDK default.

    • getUsername

      public String getUsername()
      The username used to connection to the broker.

      If you do not explicitly override the user then it is likely to default to guest which appears to be the RabbitMQ SDK default.

    • setPassword

      public void setPassword(String password)
      The password.

      If you do not explicitly override the password then it is likely to default to guest which appears to be the RabbitMQ SDK default.

    • getPassword

      public String getPassword()
      The password.

      If you do not explicitly override the password then it is likely to default to guest which appears to be the RabbitMQ SDK default.