public class ClientQueueUtils
extends java.lang.Object
| Constructor and Description |
|---|
ClientQueueUtils(com.rabbitmq.client.Connection connection,
com.rabbitmq.client.Channel channel)
Constructor with connection and channel
|
ClientQueueUtils(ConnectionInf connInf) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindToQueue(java.lang.String queueName,
java.lang.String exchangeName,
java.lang.String routingKey)
Bind to the specified queue
|
boolean |
createResultQueue(java.lang.String uuid,
boolean durable)
Create a queue
|
boolean |
createRoutingQueue(java.lang.String queue,
boolean durable)
Create the routing queue
|
void |
declareExchange(java.lang.String exchange,
java.lang.String exchangeType)
Declare an exchange and exchange type.
|
boolean |
destroy(java.lang.String uuid)
Attempt to destroy the queue
|
public ClientQueueUtils(ConnectionInf connInf)
public ClientQueueUtils(com.rabbitmq.client.Connection connection,
com.rabbitmq.client.Channel channel)
connection - The connection for AMQPchannel - The channel for AMQPpublic void declareExchange(java.lang.String exchange,
java.lang.String exchangeType)
throws java.io.IOException
exchange - The exchange nameexchangeType - The exchange typejava.io.IOException - Exception thrown if queue cannot be declaredpublic void bindToQueue(java.lang.String queueName,
java.lang.String exchangeName,
java.lang.String routingKey)
throws java.io.IOException
queueName - Name of the queueexchangeName - Name of the exchangeroutingKey - Routing key for the bindjava.io.IOExceptionpublic boolean createResultQueue(java.lang.String uuid,
boolean durable)
uuid - The uuid queue namedurable - Whether the queue should persistpublic boolean createRoutingQueue(java.lang.String queue,
boolean durable)
queue - The queue to route withdurable - Whether the queue should persistpublic boolean destroy(java.lang.String uuid)
uuid - The queue uuid name