Package org.acemq.spring.boot
Interface AceMqConnectionDetails
- All Superinterfaces:
org.springframework.boot.autoconfigure.service.connection.ConnectionDetails
public interface AceMqConnectionDetails
extends org.springframework.boot.autoconfigure.service.connection.ConnectionDetails
Where the broker is: the part of
acemq.* that a service connection can supply.
By default it is read from acemq.url, acemq.username,
acemq.password and acemq.virtual-host. Spring Boot's Docker Compose support
and a Testcontainers @ServiceConnection replace it with the address of the
rabbitmq service or container they started, and an application can define its own
bean of this type to take the address from anywhere else. Everything not here -- TLS,
timeouts, the codec -- still comes from acemq.*.
Its own type rather than Spring Boot's RabbitConnectionDetails: that one belongs to
Spring AMQP's auto-configuration, lives in a different package on each Boot line, and is
bound to spring.rabbitmq.*, so reusing it would have made acemq.url lose to
a property this starter never documented.
-
Method Details
-
getUrl
String getUrl()The broker URL, such asamqp://localhost:5672. Credentials and a virtual host may be in it; the getters below override them when they return a value.- Returns:
- the URL
-
getUsername
- Returns:
- the user, or
nullto use the URL's
-
getPassword
- Returns:
- the password, or
nullto use the URL's
-
getVirtualHost
- Returns:
- the virtual host, or
nullto use the URL's
-