Class AceMqConnections

java.lang.Object
org.acemq.spring.boot.AceMqConnections

public final class AceMqConnections extends Object
Turns AceMqProperties into a ConnectionConfig.

Separate from the auto-configuration, and static, so the mapping can be tested without a broker. Every other part of this starter needs a connection to prove anything; this part is pure, and it is the part where a misspelled property silently becomes a default.

  • Method Details

    • from

      public static org.acemq.amqp.transport.ConnectionConfig from(AceMqProperties properties)
      Builds the connection configuration.
      Parameters:
      properties - the acemq.* configuration
      Returns:
      the configuration the library will connect with
    • from

      public static org.acemq.amqp.transport.ConnectionConfig from(AceMqProperties properties, AceMqConnectionDetails details)
      Builds the connection configuration with the broker's address taken from connection details, which is how Docker Compose and Testcontainers supply it.
      Parameters:
      properties - the acemq.* configuration, for everything but the address
      details - where the broker is
      Returns:
      the configuration the library will connect with
    • details

      public static AceMqConnectionDetails details(AceMqProperties properties)
      The connection details acemq.* describes, used when no service connection supplies others.
      Parameters:
      properties - the acemq.* configuration
      Returns:
      details read from it, live, so later changes to the properties show through