Skip to content

Commit

Permalink
docs(rabbitmq): describe functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mervyn-mccreight committed Jul 24, 2023
1 parent ad9f45e commit 1cdee03
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/rabbitmq/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ use testcontainers::{core::WaitFor, Image};
const NAME: &str = "rabbitmq";
const TAG: &str = "3.8.22-management";

/// Module to work with [`RabbitMQ`] inside of tests.
///
/// Starts an instance of RabbitMQ with the [`management-plugin`] started by default,
/// so you are able to use the [`RabbitMQ Management HTTP API`] to manage the configuration if the started [`RabbitMQ`] instance at test runtime.
///
/// This module is based on the officlal [`RabbitMQ docker image`].
///
/// # Example
/// ```
/// use testcontainers::clients;
/// use testcontainers_modules::rabbitmq;
///
/// let docker = clients::Cli::default();
/// let rabbitmq_instance = docker.run(rabbitmq::RabbitMq::default());
///
/// let amqp_url = format!("amqp://127.0.0.1:{}", rabbitmq_instance.get_host_port_ipv4(5672));
///
/// // do something with the started rabbitmq instance..
/// ```
///
/// [`RabbitMQ`]: https://www.rabbitmq.com/
/// [`management-plugin`]: https://www.rabbitmq.com/management.html
/// [`RabbitMQ Management HTTP API`]: https://www.rabbitmq.com/management.html#http-api
/// [`RabbitMQ docker image`]: https://hub.docker.com/_/rabbitmq
#[derive(Debug, Default, Clone)]
pub struct RabbitMq;

Expand Down

0 comments on commit 1cdee03

Please sign in to comment.