Testcontainers::RabbitmqContainer
Inherits Testcontainers::DockerContainer < Reference < Object
RabbitmqContainer provides a pre-configured container for RabbitMQ.
Example:
container = Testcontainers::RabbitmqContainer.new
container.start
url = container.connection_url
# => "amqp://guest:guest@localhost:32768"
container.stop
container.remove
Constants
RABBITMQ_DEFAULT_IMAGE = "rabbitmq:management"
RABBITMQ_DEFAULT_PASSWORD = "guest"
RABBITMQ_DEFAULT_PORT = 5672
RABBITMQ_DEFAULT_USERNAME = "guest"
RABBITMQ_DEFAULT_VHOST = "/"
RABBITMQ_MANAGEMENT_PORT = 15672
Constructors
Instance methods
connection_url(protocol : String = "amqp", username : String | Nil = nil, password : String | Nil = nil, vhost : String | Nil = nil) : String
Returns the AMQP connection URL.
management_port
Sourcepassword
Sourceport
Sourcestart
Starts the container.
This will:
- Pull the image if not present
- Create the container
- Start the container
- Execute the wait strategy (if any)
Returns self for method chaining.
username
Sourcevhost
Source