Package org.acemq.spring.boot
Class AceMqConnections
java.lang.Object
org.acemq.spring.boot.AceMqConnections
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 Summary
Modifier and TypeMethodDescriptionstatic AceMqConnectionDetailsdetails(AceMqProperties properties) The connection detailsacemq.*describes, used when no service connection supplies others.static org.acemq.amqp.transport.ConnectionConfigfrom(AceMqProperties properties) Builds the connection configuration.static org.acemq.amqp.transport.ConnectionConfigfrom(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.
-
Method Details
-
from
Builds the connection configuration.- Parameters:
properties- theacemq.*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- theacemq.*configuration, for everything but the addressdetails- where the broker is- Returns:
- the configuration the library will connect with
-
details
The connection detailsacemq.*describes, used when no service connection supplies others.- Parameters:
properties- theacemq.*configuration- Returns:
- details read from it, live, so later changes to the properties show through
-