def __init__(
        self,
        image: str = "rabbitmq:latest",
        port: Optional[int] = None,
        username: Optional[str] = None,
        password: Optional[str] = None,
        vhost: Optional[str] = None,
        **kwargs,
    ) -> None:
        """Initialize the RabbitMQ test container.

        Args:
            image: Docker image from docker hub. Defaults to "rabbitmq:latest".
            port: Port to reach the AMQP API. Defaults to 5672.
            username: RabbitMQ username.
            password: RabbitMQ password.
        """
        super().__init__(image=image, **kwargs)
        self.port = port or int(os.environ.get("RABBITMQ_NODE_PORT", 5672))
        self.username = username or os.environ.get("RABBITMQ_DEFAULT_USER", "guest")
        self.password = password or os.environ.get("RABBITMQ_DEFAULT_PASS", "guest")
        self.vhost = vhost or os.environ.get("RABBITMQ_DEFAULT_VHOST", "/")

        self.with_exposed_ports(self.port)
        self.with_env("RABBITMQ_NODE_PORT", self.port)
        self.with_env("RABBITMQ_DEFAULT_USER", self.username)
        self.with_env("RABBITMQ_DEFAULT_PASS", self.password)
        self.with_env("RABBITMQ_DEFAULT_VHOST", self.vhost)
Initialize the RabbitMQ test container.

        Args:
            image: Docker image from docker hub. Defaults to "rabbitmq:latest".
            port: Port to reach the AMQP API. Defaults to 5672.
            username: RabbitMQ username.
            password: RabbitMQ password.
        
modules/rabbitmq/testcontainers/rabbitmq/__init__.py