public class RabbitSink extends AbstractModuleFixture<RabbitSink>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_ADDRESSES |
static java.lang.String |
DEFAULT_EXCHANGE |
static java.lang.String |
DEFAULT_ROUTING_KEY |
label| Constructor and Description |
|---|
RabbitSink(java.lang.String exchange,
java.lang.String addresses,
java.lang.String routingKey)
Initialize and instance of the RabbitSink
|
| Modifier and Type | Method and Description |
|---|---|
RabbitSink |
addresses(java.lang.String addresses)
Sets the addresses for the fixture
|
RabbitSink |
ensureReady()
Ensure that the each Rabbit broker socket is available by polling it for up to 2 seconds
|
RabbitSink |
exchange(java.lang.String exchange)
Sets the exchange for the fixture
|
RabbitSink |
routingKey(java.lang.String routingKey)
Sets the routing key that will be used to route messages to the appropriate key.
|
protected java.lang.String |
toDSL()
Renders the DSL for this fixture.
|
static RabbitSink |
withDefaults()
Creates an instance of the Rabbit Sink using defaults
|
label, toStringpublic static final java.lang.String DEFAULT_EXCHANGE
public static final java.lang.String DEFAULT_ROUTING_KEY
public static final java.lang.String DEFAULT_ADDRESSES
public RabbitSink(java.lang.String exchange,
java.lang.String addresses,
java.lang.String routingKey)
exchange - The exchange the sink associateaddresses - Comma delimited list of addresses where the brokers are deployedroutingKey - The key that will route the messages to the queueprotected java.lang.String toDSL()
toDSL in class AbstractModuleFixture<RabbitSink>public static RabbitSink withDefaults()
public RabbitSink ensureReady()
java.lang.IllegalStateException - if can not connect in 2 seconds.public RabbitSink addresses(java.lang.String addresses)
addresses - The addresses where the rabbit brokers are deployedpublic RabbitSink routingKey(java.lang.String routingKey)
routingKey - the routing key to be used by the fixture.public RabbitSink exchange(java.lang.String exchange)
exchange - The exchange associated with the Rabbit sink