Struct batch::ExchangeBuilder
[−]
[src]
pub struct ExchangeBuilder { /* fields omitted */ }
A builder for RabbitMQ
Exchange
.
Methods
impl ExchangeBuilder
[src]
fn new(name: &str) -> ExchangeBuilder
[src]
Create a new ExchangeBuilder
instance from the desired exchange name.
Example
use batch::ExchangeBuilder; let builder = ExchangeBuilder::new("batch.example");
fn bind(self, exchange: &str, routing_key: &str) -> Self
[src]
Binds this exchange to another exchange via a routing key.
All of the messages posted to this exchange associated to the given routing key are automatically sent to the given exchange.
Example
use batch::ExchangeBuilder; let builder = ExchangeBuilder::new("batch.example") .bind("batch.messaging", "hello-world");