|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface QueueDeclaration
Declaration of a queue to consume, and any exchange bindings the queue needs.
Depending on the queue parameters (exclusive, auto_delete, server-named) and exchange bindings, it may or may not be safe to start several consumers in parallel using a given queue declaration. For example, an exclusive named queue bound to an exchange is not safe because only one of the consumers will succeed in declaring the queue; an exclusive server-named queue does not have that problem, but is still probably not safe, because most exchange types will send a copy of every message to every queue bound to them, so you will end up consuming each message several times.
For that reason, to implement this interface you must implement
isParallelConsumable() to indicate whether or not this queue is safe
for parallel consumers.
| Method Summary | |
|---|---|
com.rabbitmq.client.AMQP.Queue.DeclareOk |
declare(com.rabbitmq.client.Channel channel)
Declare the queue, and any exchanges and bindings that it needs. |
boolean |
isParallelConsumable()
Indicate whether this queue is safe for parallel consumers. |
| Method Detail |
|---|
com.rabbitmq.client.AMQP.Queue.DeclareOk declare(com.rabbitmq.client.Channel channel)
throws IOException
channel - An open AMQP channel which can be used to send the
declarations.
IOException - if a declaration fails or the AMQP connection drops.boolean isParallelConsumable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||