Package org.springframework.amqp.core
Interface AmqpAdmin
- All Known Implementing Classes:
RabbitAdmin
public interface AmqpAdmin
Specifies a basic set of portable AMQP administrative operations for AMQP > 0.9.
- Author:
- Mark Pollack, Dave Syer, Gary Russell, Artem Bilan
-
Method Summary
Modifier and TypeMethodDescriptionvoid
declareBinding
(Binding binding) Declare a binding of a queue to an exchange.void
declareExchange
(Exchange exchange) Declare an exchange.Declare a queue whose name is automatically named.declareQueue
(Queue queue) Declare the given queue.boolean
deleteExchange
(String exchangeName) Delete an exchange.boolean
deleteQueue
(String queueName) Delete a queue, without regard for whether it is in use or has messages on it.void
deleteQueue
(String queueName, boolean unused, boolean empty) Delete a queue.default Map<String,
Declarable> Deprecated.default Set<Declarable>
Return the manually declared AMQP objects.getQueueInfo
(String queueName) Returns information about the queue, if it exists.getQueueProperties
(String queueName) Returns an implementation-specific Map of properties if the queue exists.default void
Initialize the admin.int
purgeQueue
(String queueName) Purges the contents of the given queue.void
purgeQueue
(String queueName, boolean noWait) Purges the contents of the given queue.void
removeBinding
(Binding binding) Remove a binding of a queue to an exchange.
-
Method Details
-
declareExchange
Declare an exchange.- Parameters:
exchange
- the exchange to declare.
-
deleteExchange
Delete an exchange. Look at implementation specific subclass for implementation specific behavior, for example for RabbitMQ this will delete the exchange without regard for whether it is in use or not.- Parameters:
exchangeName
- the name of the exchange- Returns:
- true if the exchange existed and was deleted
-
declareQueue
Declare a queue whose name is automatically named. It is created with exclusive = true, autoDelete=true, and durable = false.- Returns:
- The queue.
-
declareQueue
Declare the given queue.- Parameters:
queue
- the queue to declare.- Returns:
- the name of the queue.
-
deleteQueue
Delete a queue, without regard for whether it is in use or has messages on it.- Parameters:
queueName
- the name of the queue.- Returns:
- true if the queue existed and was deleted.
-
deleteQueue
Delete a queue.- Parameters:
queueName
- the name of the queue.unused
- true if the queue should be deleted only if not in use.empty
- true if the queue should be deleted only if empty.
-
purgeQueue
Purges the contents of the given queue.- Parameters:
queueName
- the name of the queue.noWait
- true to not await completion of the purge.
-
purgeQueue
Purges the contents of the given queue.- Parameters:
queueName
- the name of the queue.- Returns:
- the number of messages purged.
- Since:
- 2.1
-
declareBinding
Declare a binding of a queue to an exchange.- Parameters:
binding
- a description of the binding to declare.
-
removeBinding
Remove a binding of a queue to an exchange. Note unbindQueue/removeBinding was not introduced until 0.9 of the specification.- Parameters:
binding
- a description of the binding to remove.
-
getQueueProperties
Returns an implementation-specific Map of properties if the queue exists.- Parameters:
queueName
- the name of the queue.- Returns:
- the properties or null if the queue doesn't exist.
-
getQueueInfo
Returns information about the queue, if it exists.- Parameters:
queueName
- the name of the queue.- Returns:
- the information or null if the queue doesn't exist.
-
getManualDeclarables
Deprecated.in favor ofgetManualDeclarableSet()
.Return the manually declared AMQP objects.- Returns:
- the manually declared AMQP objects.
- Since:
- 2.4.13
-
getManualDeclarableSet
Return the manually declared AMQP objects.- Returns:
- the manually declared AMQP objects.
- Since:
- 2.4.15
-
initialize
default void initialize()Initialize the admin.- Since:
- 2.1
-
getManualDeclarableSet()
.